@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | parent::__construct( array( |
| 23 | 23 | 'singular' => 'feed', // singular name of the listed records |
| 24 | 24 | 'plural' => 'feeds', // plural name of the listed records |
| 25 | - 'ajax' => false, // does this table support ajax? |
|
| 25 | + 'ajax' => false, // does this table support ajax? |
|
| 26 | 26 | ) ); |
| 27 | 27 | |
| 28 | 28 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | return sprintf( '%1$s %2$s', |
| 42 | 42 | /*$1%s*/ |
| 43 | - '<p><b>'.$button->title . '</b></p><code class="' . $target . '">[podlove-subscribe-button button="' . $button->name . '"]</code>', |
|
| 43 | + '<p><b>' . $button->title . '</b></p><code class="' . $target . '">[podlove-subscribe-button button="' . $button->name . '"]</code>', |
|
| 44 | 44 | /*$3%s*/ |
| 45 | 45 | $this->row_actions( $actions ) |
| 46 | 46 | ); |
@@ -59,14 +59,14 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | $preview = "<div class='podlove-button-preview-container'>"; |
| 61 | 61 | $preview .= $button->render( |
| 62 | - $options['size'], |
|
| 63 | - $options['autowidth'], |
|
| 64 | - $options['style'], |
|
| 65 | - $options['format'], |
|
| 66 | - $options['color'], |
|
| 62 | + $options[ 'size' ], |
|
| 63 | + $options[ 'autowidth' ], |
|
| 64 | + $options[ 'style' ], |
|
| 65 | + $options[ 'format' ], |
|
| 66 | + $options[ 'color' ], |
|
| 67 | 67 | false, |
| 68 | 68 | false, |
| 69 | - $options['language'] |
|
| 69 | + $options[ 'language' ] |
|
| 70 | 70 | ); |
| 71 | 71 | $preview .= "</div>"; |
| 72 | 72 | |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | public static function admin_inline_js() { |
| 140 | - echo "<script type=\"text/javascript\">var clipboard = new ClipboardJS('.copy-btn');</script>"; |
|
| 140 | + echo "<script type=\"text/javascript\">var clipboard = new ClipboardJS('.copy-btn');</script>"; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | public static function admin_menu() { |
@@ -199,15 +199,15 @@ discard block |
||
| 199 | 199 | * @return string|void |
| 200 | 200 | */ |
| 201 | 201 | public static function shortcode( $args ) { |
| 202 | - if ( ! $args || ! isset( $args['button'] ) ) { |
|
| 202 | + if ( ! $args || ! isset( $args[ 'button' ] ) ) { |
|
| 203 | 203 | return __( 'You need to create a Button first and provide its ID.', 'podlove-subscribe-button' ); |
| 204 | 204 | } else { |
| 205 | - $buttonid = $args['button']; |
|
| 205 | + $buttonid = $args[ 'button' ]; |
|
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | // Fetch the (network)button by it's name |
| 209 | - if ( ! $button = \PodloveSubscribeButton\Model\Button::get_button_by_name( $args['button'] ) ) { |
|
| 210 | - return sprintf( __( 'Oops. There is no button with the ID "%s".', 'podlove-subscribe-button' ), $args['button'] ); |
|
| 209 | + if ( ! $button = \PodloveSubscribeButton\Model\Button::get_button_by_name( $args[ 'button' ] ) ) { |
|
| 210 | + return sprintf( __( 'Oops. There is no button with the ID "%s".', 'podlove-subscribe-button' ), $args[ 'button' ] ); |
|
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | // Get button styling and options |
@@ -216,19 +216,19 @@ discard block |
||
| 216 | 216 | $style = self::get_attribute( 'style', self::get_array_value_with_fallback( $args, 'style' ) ); |
| 217 | 217 | $format = self::get_attribute( 'format', self::get_array_value_with_fallback( $args, 'format' ) ); |
| 218 | 218 | |
| 219 | - if ( isset( $args['language'] ) ) { |
|
| 220 | - $language = $args['language']; |
|
| 219 | + if ( isset( $args[ 'language' ] ) ) { |
|
| 220 | + $language = $args[ 'language' ]; |
|
| 221 | 221 | } else { |
| 222 | 222 | $language = self::get_attribute( 'language', self::get_array_value_with_fallback( $args, 'language' ) ); |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | - if ( isset( $args['color'] ) ) { |
|
| 226 | - $color = $args['color']; |
|
| 225 | + if ( isset( $args[ 'color' ] ) ) { |
|
| 226 | + $color = $args[ 'color' ]; |
|
| 227 | 227 | } else { |
| 228 | 228 | $color = self::get_attribute( 'color', self::get_array_value_with_fallback( $args, 'color' ) ); |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | - if ( isset( $args['hide'] ) && $args['hide'] == 'true' ) { |
|
| 231 | + if ( isset( $args[ 'hide' ] ) && $args[ 'hide' ] == 'true' ) { |
|
| 232 | 232 | $hide = true; |
| 233 | 233 | } else { |
| 234 | 234 | $hide = false; |