@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | * @return mixed show_on key or false |
28 | 28 | */ |
29 | 29 | private static function get_show_on_key( $meta_box_args ) { |
30 | - $show_on = isset( $meta_box_args['show_on'] ) ? (array) $meta_box_args['show_on'] : false; |
|
30 | + $show_on = isset( $meta_box_args[ 'show_on' ] ) ? (array) $meta_box_args[ 'show_on' ] : false; |
|
31 | 31 | if ( $show_on && is_array( $show_on ) ) { |
32 | 32 | |
33 | 33 | if ( array_key_exists( 'key', $show_on ) ) { |
34 | - return $show_on['key']; |
|
34 | + return $show_on[ 'key' ]; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | $keys = array_keys( $show_on ); |
38 | - return $keys[0]; |
|
38 | + return $keys[ 0 ]; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return false; |
@@ -51,17 +51,17 @@ discard block |
||
51 | 51 | * @return mixed show_on value or false |
52 | 52 | */ |
53 | 53 | private static function get_show_on_value( $meta_box_args ) { |
54 | - $show_on = isset( $meta_box_args['show_on'] ) ? (array) $meta_box_args['show_on'] : false; |
|
54 | + $show_on = isset( $meta_box_args[ 'show_on' ] ) ? (array) $meta_box_args[ 'show_on' ] : false; |
|
55 | 55 | |
56 | 56 | if ( $show_on && is_array( $show_on ) ) { |
57 | 57 | |
58 | 58 | if ( array_key_exists( 'value', $show_on ) ) { |
59 | - return $show_on['value']; |
|
59 | + return $show_on[ 'value' ]; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | $keys = array_keys( $show_on ); |
63 | 63 | |
64 | - return $show_on[ $keys[0] ]; |
|
64 | + return $show_on[ $keys[ 0 ] ]; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | return array(); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | if ( is_admin() ) { |
143 | 143 | |
144 | 144 | // If there is no 'page' query var, our filter isn't applicable |
145 | - if ( ! isset( $_GET['page'] ) ) { |
|
145 | + if ( ! isset( $_GET[ 'page' ] ) ) { |
|
146 | 146 | return $display; |
147 | 147 | } |
148 | 148 | |
@@ -154,12 +154,12 @@ discard block |
||
154 | 154 | |
155 | 155 | if ( is_array( $show_on ) ) { |
156 | 156 | foreach ( $show_on as $page ) { |
157 | - if ( $_GET['page'] == $page ) { |
|
157 | + if ( $_GET[ 'page' ] == $page ) { |
|
158 | 158 | return true; |
159 | 159 | } |
160 | 160 | } |
161 | 161 | } else { |
162 | - if ( $_GET['page'] == $show_on ) { |
|
162 | + if ( $_GET[ 'page' ] == $show_on ) { |
|
163 | 163 | return true; |
164 | 164 | } |
165 | 165 | } |
@@ -131,7 +131,7 @@ |
||
131 | 131 | |
132 | 132 | if ( ! $single ) { |
133 | 133 | // If multiple, add to array |
134 | - $this->options[ $field_id ][] = $value; |
|
134 | + $this->options[ $field_id ][ ] = $value; |
|
135 | 135 | } else { |
136 | 136 | $this->options[ $field_id ] = $value; |
137 | 137 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | if ( is_array( $this->field->value ) ) { |
123 | 123 | |
124 | 124 | // Then loop and output. |
125 | - echo '<ul class="cmb2-'. str_replace( '_', '-', $this->field->type() ) .'">'; |
|
125 | + echo '<ul class="cmb2-' . str_replace( '_', '-', $this->field->type() ) . '">'; |
|
126 | 126 | foreach ( $this->field->value as $val ) { |
127 | 127 | $this->value = $val; |
128 | 128 | echo '<li>', $this->_display(), '</li>'; |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | $options = $this->field->options(); |
196 | 196 | |
197 | 197 | $fallback = $this->field->args( 'show_option_none' ); |
198 | - if ( ! $fallback && isset( $options[''] ) ) { |
|
199 | - $fallback = $options['']; |
|
198 | + if ( ! $fallback && isset( $options[ '' ] ) ) { |
|
199 | + $fallback = $options[ '' ]; |
|
200 | 200 | } |
201 | 201 | if ( ! $this->value && $fallback ) { |
202 | 202 | echo $fallback; |
@@ -223,9 +223,9 @@ discard block |
||
223 | 223 | $output = array(); |
224 | 224 | foreach ( $this->value as $val ) { |
225 | 225 | if ( isset( $options[ $val ] ) ) { |
226 | - $output[] = $options[ $val ]; |
|
226 | + $output[ ] = $options[ $val ]; |
|
227 | 227 | } else { |
228 | - $output[] = esc_attr( $val ); |
|
228 | + $output[ ] = esc_attr( $val ); |
|
229 | 229 | } |
230 | 230 | } |
231 | 231 | |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | * @since 2.2.2 |
250 | 250 | */ |
251 | 251 | protected function _display() { |
252 | - echo '<xmp class="cmb2-code">'. print_r( $this->value, true ) .'</xmp>'; |
|
252 | + echo '<xmp class="cmb2-code">' . print_r( $this->value, true ) . '</xmp>'; |
|
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | if ( $datetime && $datetime instanceof DateTime ) { |
292 | 292 | $tz = $datetime->getTimezone(); |
293 | 293 | $tzstring = $tz->getName(); |
294 | - $this->value = $datetime->getTimestamp(); |
|
294 | + $this->value = $datetime->getTimestamp(); |
|
295 | 295 | } |
296 | 296 | |
297 | 297 | $date = $this->field->get_timestamp_format( 'date_format', $this->value ); |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | if ( is_wp_error( $terms ) || empty( $terms ) && ( $default = $this->field->get_default() ) ) { |
316 | 316 | $term = get_term_by( 'slug', $default, $taxonomy ); |
317 | 317 | } elseif ( ! empty( $terms ) ) { |
318 | - $term = $terms[key( $terms )]; |
|
318 | + $term = $terms[ key( $terms ) ]; |
|
319 | 319 | } |
320 | 320 | |
321 | 321 | if ( $term ) { |
@@ -339,10 +339,10 @@ discard block |
||
339 | 339 | $terms = array(); |
340 | 340 | if ( is_array( $default ) ) { |
341 | 341 | foreach ( $default as $slug ) { |
342 | - $terms[] = get_term_by( 'slug', $slug, $taxonomy ); |
|
342 | + $terms[ ] = get_term_by( 'slug', $slug, $taxonomy ); |
|
343 | 343 | } |
344 | 344 | } else { |
345 | - $terms[] = get_term_by( 'slug', $default, $taxonomy ); |
|
345 | + $terms[ ] = get_term_by( 'slug', $default, $taxonomy ); |
|
346 | 346 | } |
347 | 347 | } |
348 | 348 | |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | $links = array(); |
352 | 352 | foreach ( $terms as $term ) { |
353 | 353 | $link = get_edit_term_link( $term->term_id, $taxonomy ); |
354 | - $links[] = '<a href="'. esc_url( $link ) .'">'. esc_html( $term->name ) .'</a>'; |
|
354 | + $links[ ] = '<a href="' . esc_url( $link ) . '">' . esc_html( $term->name ) . '</a>'; |
|
355 | 355 | } |
356 | 356 | // Then loop and output. |
357 | 357 | echo '<div class="cmb2-taxonomy-terms-', esc_attr( $taxonomy ), '">'; |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | if ( $id ) { |
395 | 395 | $image = wp_get_attachment_image( $id, $img_size, null, array( 'class' => 'cmb-image-display' ) ); |
396 | 396 | } else { |
397 | - $size = is_array( $img_size ) ? $img_size[0] : 200; |
|
397 | + $size = is_array( $img_size ) ? $img_size[ 0 ] : 200; |
|
398 | 398 | $image = '<img class="cmb-image-display" style="max-width: ' . absint( $size ) . 'px; width: 100%; height: auto;" src="' . $url_value . '" alt="" />'; |
399 | 399 | } |
400 | 400 |
@@ -52,9 +52,9 @@ |
||
52 | 52 | |
53 | 53 | // Get object hash.. This bypasses issues with serializing closures. |
54 | 54 | if ( is_object( $hook ) ) { |
55 | - $args[1] = spl_object_hash( $args[1] ); |
|
56 | - } elseif ( is_array( $hook ) && is_object( $hook[0] ) ) { |
|
57 | - $args[1][0] = spl_object_hash( $hook[0] ); |
|
55 | + $args[ 1 ] = spl_object_hash( $args[ 1 ] ); |
|
56 | + } elseif ( is_array( $hook ) && is_object( $hook[ 0 ] ) ) { |
|
57 | + $args[ 1 ][ 0 ] = spl_object_hash( $hook[ 0 ] ); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $key = md5( serialize( $args ) ); |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | public function oembed_handler() { |
60 | 60 | |
61 | 61 | // Verify our nonce |
62 | - if ( ! ( isset( $_REQUEST['cmb2_ajax_nonce'], $_REQUEST['oembed_url'] ) && wp_verify_nonce( $_REQUEST['cmb2_ajax_nonce'], 'ajax_nonce' ) ) ) { |
|
62 | + if ( ! ( isset( $_REQUEST[ 'cmb2_ajax_nonce' ], $_REQUEST[ 'oembed_url' ] ) && wp_verify_nonce( $_REQUEST[ 'cmb2_ajax_nonce' ], 'ajax_nonce' ) ) ) { |
|
63 | 63 | die(); |
64 | 64 | } |
65 | 65 | |
66 | 66 | // Sanitize our search string |
67 | - $oembed_string = sanitize_text_field( $_REQUEST['oembed_url'] ); |
|
67 | + $oembed_string = sanitize_text_field( $_REQUEST[ 'oembed_url' ] ); |
|
68 | 68 | |
69 | 69 | // Send back error if empty |
70 | 70 | if ( empty( $oembed_string ) ) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | // Set width of embed |
75 | - $embed_width = isset( $_REQUEST['oembed_width'] ) && intval( $_REQUEST['oembed_width'] ) < 640 ? intval( $_REQUEST['oembed_width'] ) : '640'; |
|
75 | + $embed_width = isset( $_REQUEST[ 'oembed_width' ] ) && intval( $_REQUEST[ 'oembed_width' ] ) < 640 ? intval( $_REQUEST[ 'oembed_width' ] ) : '640'; |
|
76 | 76 | |
77 | 77 | // Set url |
78 | 78 | $oembed_url = esc_url( $oembed_string ); |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | // Get embed code (or fallback link) |
86 | 86 | $html = $this->get_oembed( array( |
87 | 87 | 'url' => $oembed_url, |
88 | - 'object_id' => $_REQUEST['object_id'], |
|
89 | - 'object_type' => isset( $_REQUEST['object_type'] ) ? $_REQUEST['object_type'] : 'post', |
|
88 | + 'object_id' => $_REQUEST[ 'object_id' ], |
|
89 | + 'object_type' => isset( $_REQUEST[ 'object_type' ] ) ? $_REQUEST[ 'object_type' ] : 'post', |
|
90 | 90 | 'oembed_args' => $embed_args, |
91 | - 'field_id' => $_REQUEST['field_id'], |
|
91 | + 'field_id' => $_REQUEST[ 'field_id' ], |
|
92 | 92 | ) ); |
93 | 93 | |
94 | 94 | wp_send_json_success( $html ); |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | public function get_oembed_no_edit( $args ) { |
104 | 104 | global $wp_embed; |
105 | 105 | |
106 | - $oembed_url = esc_url( $args['url'] ); |
|
106 | + $oembed_url = esc_url( $args[ 'url' ] ); |
|
107 | 107 | |
108 | 108 | // Sanitize object_id |
109 | - $this->object_id = is_numeric( $args['object_id'] ) ? absint( $args['object_id'] ) : sanitize_text_field( $args['object_id'] ); |
|
109 | + $this->object_id = is_numeric( $args[ 'object_id' ] ) ? absint( $args[ 'object_id' ] ) : sanitize_text_field( $args[ 'object_id' ] ); |
|
110 | 110 | |
111 | 111 | $args = wp_parse_args( $args, array( |
112 | 112 | 'object_type' => 'post', |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | 'wp_error' => false, |
116 | 116 | ) ); |
117 | 117 | |
118 | - $this->embed_args =& $args; |
|
118 | + $this->embed_args = & $args; |
|
119 | 119 | |
120 | 120 | /** |
121 | 121 | * Set the post_ID so oEmbed won't fail |
@@ -124,9 +124,9 @@ discard block |
||
124 | 124 | $wp_embed->post_ID = $this->object_id; |
125 | 125 | |
126 | 126 | // Special scenario if NOT a post object |
127 | - if ( isset( $args['object_type'] ) && 'post' != $args['object_type'] ) { |
|
127 | + if ( isset( $args[ 'object_type' ] ) && 'post' != $args[ 'object_type' ] ) { |
|
128 | 128 | |
129 | - if ( 'options-page' == $args['object_type'] ) { |
|
129 | + if ( 'options-page' == $args[ 'object_type' ] ) { |
|
130 | 130 | |
131 | 131 | // Bogus id to pass some numeric checks. Issue with a VERY large WP install? |
132 | 132 | $wp_embed->post_ID = 1987645321; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | // Ok, we need to hijack the oembed cache system |
136 | 136 | $this->hijack = true; |
137 | - $this->object_type = $args['object_type']; |
|
137 | + $this->object_type = $args[ 'object_type' ]; |
|
138 | 138 | |
139 | 139 | // Gets ombed cache from our object's meta (vs postmeta) |
140 | 140 | add_filter( 'get_post_metadata', array( $this, 'hijack_oembed_cache_get' ), 10, 3 ); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | $embed_args = ''; |
148 | 148 | |
149 | - foreach ( $args['oembed_args'] as $key => $val ) { |
|
149 | + foreach ( $args[ 'oembed_args' ] as $key => $val ) { |
|
150 | 150 | $embed_args .= " $key=\"$val\""; |
151 | 151 | } |
152 | 152 | |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | $oembed = $this->get_oembed_no_edit( $args ); |
170 | 170 | |
171 | 171 | // Send back our embed |
172 | - if ( $oembed['embed'] && $oembed['embed'] != $oembed['fallback'] ) { |
|
173 | - return '<div class="cmb2-oembed embed-status">' . $oembed['embed'] . '<p class="cmb2-remove-wrapper"><a href="#" class="cmb2-remove-file-button" rel="' . $oembed['args']['field_id'] . '">' . esc_html__( 'Remove Embed', 'cmb2' ) . '</a></p></div>'; |
|
172 | + if ( $oembed[ 'embed' ] && $oembed[ 'embed' ] != $oembed[ 'fallback' ] ) { |
|
173 | + return '<div class="cmb2-oembed embed-status">' . $oembed[ 'embed' ] . '<p class="cmb2-remove-wrapper"><a href="#" class="cmb2-remove-file-button" rel="' . $oembed[ 'args' ][ 'field_id' ] . '">' . esc_html__( 'Remove Embed', 'cmb2' ) . '</a></p></div>'; |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | // Otherwise, send back error info that no oEmbeds were found |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | sprintf( |
180 | 180 | /* translators: 1: results for. 2: link to codex.wordpress.org/Embeds */ |
181 | 181 | esc_html__( 'No oEmbed Results Found for %1$s. View more info at %2$s.', 'cmb2' ), |
182 | - $oembed['fallback'], |
|
182 | + $oembed[ 'fallback' ], |
|
183 | 183 | '<a href="https://codex.wordpress.org/Embeds" target="_blank">codex.wordpress.org/Embeds</a>' |
184 | 184 | ) |
185 | 185 | ); |
@@ -243,15 +243,15 @@ discard block |
||
243 | 243 | */ |
244 | 244 | protected function cache_action( $meta_key ) { |
245 | 245 | $func_args = func_get_args(); |
246 | - $action = isset( $func_args[1] ) ? 'update' : 'get'; |
|
246 | + $action = isset( $func_args[ 1 ] ) ? 'update' : 'get'; |
|
247 | 247 | |
248 | 248 | if ( 'options-page' === $this->object_type ) { |
249 | 249 | |
250 | 250 | $args = array( $meta_key ); |
251 | 251 | |
252 | 252 | if ( 'update' === $action ) { |
253 | - $args[] = $func_args[1]; |
|
254 | - $args[] = true; |
|
253 | + $args[ ] = $func_args[ 1 ]; |
|
254 | + $args[ ] = true; |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | // Cache the result to our options |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | } else { |
260 | 260 | |
261 | 261 | $args = array( $this->object_type, $this->object_id, $meta_key ); |
262 | - $args[] = 'update' === $action ? $func_args : true; |
|
262 | + $args[ ] = 'update' === $action ? $func_args : true; |
|
263 | 263 | |
264 | 264 | // Cache the result to our metadata |
265 | 265 | $status = call_user_func_array( $action . '_metadata', $args ); |
@@ -391,8 +391,8 @@ |
||
391 | 391 | 'class' => 'cmb2-hidden', |
392 | 392 | ); |
393 | 393 | if ( $this->field->group ) { |
394 | - $args['data-groupid'] = $this->field->group->id(); |
|
395 | - $args['data-iterator'] = $this->iterator; |
|
394 | + $args[ 'data-groupid' ] = $this->field->group->id(); |
|
395 | + $args[ 'data-iterator' ] = $this->iterator; |
|
396 | 396 | } |
397 | 397 | return $this->input( $args ); |
398 | 398 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | protected function ul( $a ) { |
49 | - return sprintf( '<ul class="%s">%s</ul>%s', $a['class'], $a['options'], $a['desc'] ); |
|
49 | + return sprintf( '<ul class="%s">%s</ul>%s', $a[ 'class' ], $a[ 'options' ], $a[ 'desc' ] ); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $field = $this->field; |
17 | 17 | $names = $this->get_object_terms(); |
18 | 18 | |
19 | - $saved_term = is_wp_error( $names ) || empty( $names ) ? $field->get_default() : $names[key( $names )]->slug; |
|
19 | + $saved_term = is_wp_error( $names ) || empty( $names ) ? $field->get_default() : $names[ key( $names ) ]->slug; |
|
20 | 20 | $terms = $this->get_terms(); |
21 | 21 | $options = ''; |
22 | 22 | $i = 1; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | if ( ! $terms ) { |
25 | 25 | $options .= sprintf( '<li><label>%s</label></li>', esc_html( $this->_text( 'no_terms_text', esc_html__( 'No terms', 'cmb2' ) ) ) ); |
26 | 26 | } else { |
27 | - $option_none = $field->args( 'show_option_none' ); |
|
27 | + $option_none = $field->args( 'show_option_none' ); |
|
28 | 28 | if ( ! empty( $option_none ) ) { |
29 | 29 | |
30 | 30 | $field_id = $this->_id(); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'label' => $option_none, |
55 | 55 | ); |
56 | 56 | if ( $saved_term == $option_none_value ) { |
57 | - $args['checked'] = 'checked'; |
|
57 | + $args[ 'checked' ] = 'checked'; |
|
58 | 58 | } |
59 | 59 | $options .= $this->list_input( $args, $i ); |
60 | 60 | $i++; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | ); |
68 | 68 | |
69 | 69 | if ( $saved_term == $term->slug ) { |
70 | - $args['checked'] = 'checked'; |
|
70 | + $args[ 'checked' ] = 'checked'; |
|
71 | 71 | } |
72 | 72 | $options .= $this->list_input( $args, $i ); |
73 | 73 | $i++; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @return string Generated option element html |
20 | 20 | */ |
21 | 21 | public function select_option( $args = array() ) { |
22 | - return sprintf( "\t" . '<option value="%s" %s>%s</option>', $args['value'], selected( isset( $args['checked'] ) && $args['checked'], true, false ), $args['label'] ) . "\n"; |
|
22 | + return sprintf( "\t" . '<option value="%s" %s>%s</option>', $args[ 'value' ], selected( isset( $args[ 'checked' ] ) && $args[ 'checked' ], true, false ), $args[ 'label' ] ) . "\n"; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'label' => '', |
40 | 40 | ), $args ); |
41 | 41 | |
42 | - return sprintf( "\t" . '<li><input%s/> <label for="%s">%s</label></li>' . "\n", $this->concat_attrs( $a, array( 'label' ) ), $a['id'], $a['label'] ); |
|
42 | + return sprintf( "\t" . '<li><input%s/> <label for="%s">%s</label></li>' . "\n", $this->concat_attrs( $a, array( 'label' ) ), $a[ 'id' ], $a[ 'label' ] ); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function list_input_checkbox( $args, $i ) { |
53 | 53 | $saved_value = $this->field->escaped_value(); |
54 | - if ( is_array( $saved_value ) && in_array( $args['value'], $saved_value ) ) { |
|
55 | - $args['checked'] = 'checked'; |
|
54 | + if ( is_array( $saved_value ) && in_array( $args[ 'value' ], $saved_value ) ) { |
|
55 | + $args[ 'checked' ] = 'checked'; |
|
56 | 56 | } |
57 | - $args['type'] = 'checkbox'; |
|
57 | + $args[ 'type' ] = 'checkbox'; |
|
58 | 58 | return $this->list_input( $args, $i ); |
59 | 59 | } |
60 | 60 | |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | public function concat_items( $args = array() ) { |
68 | 68 | $field = $this->field; |
69 | 69 | |
70 | - $method = isset( $args['method'] ) ? $args['method'] : 'select_option'; |
|
71 | - unset( $args['method'] ); |
|
70 | + $method = isset( $args[ 'method' ] ) ? $args[ 'method' ] : 'select_option'; |
|
71 | + unset( $args[ 'method' ] ); |
|
72 | 72 | |
73 | 73 | $value = null !== $field->escaped_value() |
74 | 74 | ? $field->escaped_value() |
@@ -90,12 +90,12 @@ discard block |
||
90 | 90 | // Clone args & modify for just this item |
91 | 91 | $a = $args; |
92 | 92 | |
93 | - $a['value'] = $opt_value; |
|
94 | - $a['label'] = $opt_label; |
|
93 | + $a[ 'value' ] = $opt_value; |
|
94 | + $a[ 'label' ] = $opt_label; |
|
95 | 95 | |
96 | 96 | // Check if this option is the value of the input |
97 | 97 | if ( $value === $opt_value ) { |
98 | - $a['checked'] = 'checked'; |
|
98 | + $a[ 'checked' ] = 'checked'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | $concatenated_items .= $this->$method( $a, $i++ ); |