@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * select2 Customizer Control. |
|
4 | - * |
|
5 | - * @package Kirki |
|
6 | - * @subpackage Controls |
|
7 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
8 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
9 | - * @since 1.0 |
|
10 | - */ |
|
3 | + * select2 Customizer Control. |
|
4 | + * |
|
5 | + * @package Kirki |
|
6 | + * @subpackage Controls |
|
7 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
8 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
9 | + * @since 1.0 |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | // Exit if accessed directly |
13 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -87,7 +87,7 @@ |
||
87 | 87 | * |
88 | 88 | * @param string $handle |
89 | 89 | * @param string $file |
90 | - * @param array $deps |
|
90 | + * @param string[] $deps |
|
91 | 91 | */ |
92 | 92 | public static function enqueue_customizer_control_script( $handle, $file = null, $deps = array(), $in_footer = false ) { |
93 | 93 | if ( ( false !== strpos( $file, 'controls/' ) && Kirki_Toolkit::kirki_debug() ) || false === strpos( $file, 'controls/' ) ) { |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Changes the styling of the customizer |
|
4 | - * based on the settings set using the kirki/config filter. |
|
5 | - * For documentation please see |
|
6 | - * https://github.com/aristath/kirki/wiki/Styling-the-Customizer |
|
7 | - * |
|
8 | - * @package Kirki |
|
9 | - * @category Core |
|
10 | - * @author Aristeides Stathopoulos |
|
11 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
12 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
13 | - * @since 1.0 |
|
14 | - */ |
|
3 | + * Changes the styling of the customizer |
|
4 | + * based on the settings set using the kirki/config filter. |
|
5 | + * For documentation please see |
|
6 | + * https://github.com/aristath/kirki/wiki/Styling-the-Customizer |
|
7 | + * |
|
8 | + * @package Kirki |
|
9 | + * @category Core |
|
10 | + * @author Aristeides Stathopoulos |
|
11 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
12 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
13 | + * @since 1.0 |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | // Exit if accessed directly |
17 | 17 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Generates the styles for the frontend. |
|
4 | - * Handles the 'output' argument of fields. |
|
5 | - * Usage instructions on https://github.com/aristath/kirki/wiki/output |
|
6 | - * |
|
7 | - * @package Kirki |
|
8 | - * @category Core |
|
9 | - * @author Aristeides Stathopoulos |
|
10 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
11 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
12 | - * @since 1.0 |
|
13 | - */ |
|
3 | + * Generates the styles for the frontend. |
|
4 | + * Handles the 'output' argument of fields. |
|
5 | + * Usage instructions on https://github.com/aristath/kirki/wiki/output |
|
6 | + * |
|
7 | + * @package Kirki |
|
8 | + * @category Core |
|
9 | + * @author Aristeides Stathopoulos |
|
10 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
11 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
12 | + * @since 1.0 |
|
13 | + */ |
|
14 | 14 | |
15 | 15 | // Exit if accessed directly |
16 | 16 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Generates the styles for the frontend. |
|
4 | - * Handles the 'output' argument of fields |
|
5 | - * |
|
6 | - * @package Kirki |
|
7 | - * @category Core |
|
8 | - * @author Aristeides Stathopoulos |
|
9 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
10 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
11 | - * @since 1.0 |
|
12 | - */ |
|
3 | + * Generates the styles for the frontend. |
|
4 | + * Handles the 'output' argument of fields |
|
5 | + * |
|
6 | + * @package Kirki |
|
7 | + * @category Core |
|
8 | + * @author Aristeides Stathopoulos |
|
9 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
10 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
11 | + * @since 1.0 |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | // Exit if accessed directly |
15 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -215,59 +215,59 @@ discard block |
||
215 | 215 | if ( 'font-family' == $output['property'] ) { |
216 | 216 | // Add backup font |
217 | 217 | if ( Kirki_Fonts::is_google_font( $value ) ) { |
218 | - if ( isset( $google_fonts_array[ $value ] ) && isset( $google_fonts_array[ $value ]['category'] ) ) { |
|
219 | - if ( isset( $backup_fonts[ $google_fonts_array[ $value ]['category'] ] ) ) { |
|
218 | + if ( isset( $google_fonts_array[$value] ) && isset( $google_fonts_array[$value]['category'] ) ) { |
|
219 | + if ( isset( $backup_fonts[$google_fonts_array[$value]['category']] ) ) { |
|
220 | 220 | // add double quotes if needed |
221 | 221 | if ( false !== strpos( $value, ' ' ) && false === strpos( $value, '"' ) ) { |
222 | - $value = '"' . $value . '", ' . $backup_fonts[ $google_fonts_array[ $value ]['category'] ]; |
|
222 | + $value = '"' . $value . '", ' . $backup_fonts[$google_fonts_array[$value]['category']]; |
|
223 | 223 | } else { |
224 | - $value .= ', ' . $backup_fonts[ $google_fonts_array[ $value ]['category'] ]; |
|
224 | + $value .= ', ' . $backup_fonts[$google_fonts_array[$value]['category']]; |
|
225 | 225 | } |
226 | 226 | } |
227 | 227 | } |
228 | 228 | } |
229 | 229 | } |
230 | - $styles[ $output['media_query'] ][ $element ][ $output['property'] ] = $prefix . $value . $units . $suffix; |
|
230 | + $styles[$output['media_query']][$element][$output['property']] = $prefix . $value . $units . $suffix; |
|
231 | 231 | } else { |
232 | 232 | /** |
233 | 233 | * Take care of typography controls output |
234 | 234 | */ |
235 | 235 | if ( 'typography' == self::$field_type ) { |
236 | 236 | if ( isset( $value['bold'] ) && $value['bold'] ) { |
237 | - $styles[ $output['media_query'] ][ $element ]['font-weight'] = 'bold'; |
|
237 | + $styles[$output['media_query']][$element]['font-weight'] = 'bold'; |
|
238 | 238 | } |
239 | 239 | if ( isset( $value['italic'] ) && $value['italic'] ) { |
240 | - $styles[ $output['media_query'] ][ $element ]['font-style'] = 'italic'; |
|
240 | + $styles[$output['media_query']][$element]['font-style'] = 'italic'; |
|
241 | 241 | } |
242 | 242 | if ( isset( $value['underline'] ) && $value['underline'] ) { |
243 | - $styles[ $output['media_query'] ][ $element ]['text-decoration'] = 'underline'; |
|
243 | + $styles[$output['media_query']][$element]['text-decoration'] = 'underline'; |
|
244 | 244 | } |
245 | 245 | if ( isset( $value['strikethrough'] ) && $value['strikethrough'] ) { |
246 | - $styles[ $output['media_query'] ][ $element ]['text-decoration'] = 'strikethrough'; |
|
246 | + $styles[$output['media_query']][$element]['text-decoration'] = 'strikethrough'; |
|
247 | 247 | } |
248 | 248 | if ( isset( $value['font-family'] ) ) { |
249 | 249 | // add double quotes if needed |
250 | 250 | if ( false !== strpos( $value['font-family'], ' ' ) && false === strpos( $value['font-family'], '"' ) ) { |
251 | - $styles[ $output['media_query'] ][ $element ]['font-family'] = '"' . $value['font-family'] . '"'; |
|
251 | + $styles[$output['media_query']][$element]['font-family'] = '"' . $value['font-family'] . '"'; |
|
252 | 252 | } else { |
253 | - $styles[ $output['media_query'] ][ $element ]['font-family'] = $value['font-family']; |
|
253 | + $styles[$output['media_query']][$element]['font-family'] = $value['font-family']; |
|
254 | 254 | } |
255 | 255 | // Add backup font |
256 | 256 | if ( Kirki_Fonts::is_google_font( $value['font-family'] ) ) { |
257 | - if ( isset( $google_fonts_array[ $value['font-family'] ] ) && isset( $google_fonts_array[ $value['font-family'] ]['category'] ) ) { |
|
258 | - if ( isset( $backup_fonts[ $google_fonts_array[ $value['font-family'] ]['category'] ] ) ) { |
|
257 | + if ( isset( $google_fonts_array[$value['font-family']] ) && isset( $google_fonts_array[$value['font-family']]['category'] ) ) { |
|
258 | + if ( isset( $backup_fonts[$google_fonts_array[$value['font-family']]['category']] ) ) { |
|
259 | 259 | // add double quotes if needed |
260 | 260 | if ( false !== strpos( $value['font-family'], ' ' ) && false === strpos( $value['font-family'], '"' ) ) { |
261 | - $styles[ $output['media_query'] ][ $element ]['font-family'] = '"' . $value['font-family'] . '", ' . $backup_fonts[ $google_fonts_array[ $value['font-family'] ]['category'] ]; |
|
261 | + $styles[$output['media_query']][$element]['font-family'] = '"' . $value['font-family'] . '", ' . $backup_fonts[$google_fonts_array[$value['font-family']]['category']]; |
|
262 | 262 | } else { |
263 | - $styles[ $output['media_query'] ][ $element ]['font-family'] = $value['font-family'] . ', ' . $backup_fonts[ $google_fonts_array[ $value['font-family'] ]['category'] ]; |
|
263 | + $styles[$output['media_query']][$element]['font-family'] = $value['font-family'] . ', ' . $backup_fonts[$google_fonts_array[$value['font-family']]['category']]; |
|
264 | 264 | } |
265 | 265 | } |
266 | 266 | } |
267 | 267 | } |
268 | 268 | } |
269 | 269 | foreach ( $value as $key => $sub_value ) { |
270 | - $styles[ $output['media_query'] ][ $element ][ $key ] = $sub_value; |
|
270 | + $styles[$output['media_query']][$element][$key] = $sub_value; |
|
271 | 271 | } |
272 | 272 | } |
273 | 273 | /** |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | } else { |
281 | 281 | $property = $output['property'] . '-' . $key; |
282 | 282 | } |
283 | - $styles[ $output['media_query'] ][ $element ][ $property ] = $sub_value; |
|
283 | + $styles[$output['media_query']][$element][$property] = $sub_value; |
|
284 | 284 | } |
285 | 285 | } |
286 | 286 | } |
@@ -306,65 +306,65 @@ discard block |
||
306 | 306 | * border-radius |
307 | 307 | */ |
308 | 308 | if ( 'border-radius' == $property ) { |
309 | - $css[ $media_query ][ $element ]['-webkit-border-radius'] = $value; |
|
310 | - $css[ $media_query ][ $element ]['-moz-border-radius'] = $value; |
|
309 | + $css[$media_query][$element]['-webkit-border-radius'] = $value; |
|
310 | + $css[$media_query][$element]['-moz-border-radius'] = $value; |
|
311 | 311 | } |
312 | 312 | /** |
313 | 313 | * box-shadow |
314 | 314 | */ |
315 | 315 | if ( 'box-shadow' == $property ) { |
316 | - $css[ $media_query ][ $element ]['-webkit-box-shadow'] = $value; |
|
317 | - $css[ $media_query ][ $element ]['-moz-box-shadow'] = $value; |
|
316 | + $css[$media_query][$element]['-webkit-box-shadow'] = $value; |
|
317 | + $css[$media_query][$element]['-moz-box-shadow'] = $value; |
|
318 | 318 | } |
319 | 319 | /** |
320 | 320 | * box-sizing |
321 | 321 | */ |
322 | 322 | elseif ( 'box-sizing' == $property ) { |
323 | - $css[ $media_query ][ $element ]['-webkit-box-sizing'] = $value; |
|
324 | - $css[ $media_query ][ $element ]['-moz-box-sizing'] = $value; |
|
323 | + $css[$media_query][$element]['-webkit-box-sizing'] = $value; |
|
324 | + $css[$media_query][$element]['-moz-box-sizing'] = $value; |
|
325 | 325 | } |
326 | 326 | /** |
327 | 327 | * text-shadow |
328 | 328 | */ |
329 | 329 | elseif ( 'text-shadow' == $property ) { |
330 | - $css[ $media_query ][ $element ]['-webkit-text-shadow'] = $value; |
|
331 | - $css[ $media_query ][ $element ]['-moz-text-shadow'] = $value; |
|
330 | + $css[$media_query][$element]['-webkit-text-shadow'] = $value; |
|
331 | + $css[$media_query][$element]['-moz-text-shadow'] = $value; |
|
332 | 332 | } |
333 | 333 | /** |
334 | 334 | * transform |
335 | 335 | */ |
336 | 336 | elseif ( 'transform' == $property ) { |
337 | - $css[ $media_query ][ $element ]['-webkit-transform'] = $value; |
|
338 | - $css[ $media_query ][ $element ]['-moz-transform'] = $value; |
|
339 | - $css[ $media_query ][ $element ]['-ms-transform'] = $value; |
|
340 | - $css[ $media_query ][ $element ]['-o-transform'] = $value; |
|
337 | + $css[$media_query][$element]['-webkit-transform'] = $value; |
|
338 | + $css[$media_query][$element]['-moz-transform'] = $value; |
|
339 | + $css[$media_query][$element]['-ms-transform'] = $value; |
|
340 | + $css[$media_query][$element]['-o-transform'] = $value; |
|
341 | 341 | } |
342 | 342 | /** |
343 | 343 | * background-size |
344 | 344 | */ |
345 | 345 | elseif ( 'background-size' == $property ) { |
346 | - $css[ $media_query ][ $element ]['-webkit-background-size'] = $value; |
|
347 | - $css[ $media_query ][ $element ]['-moz-background-size'] = $value; |
|
348 | - $css[ $media_query ][ $element ]['-ms-background-size'] = $value; |
|
349 | - $css[ $media_query ][ $element ]['-o-background-size'] = $value; |
|
346 | + $css[$media_query][$element]['-webkit-background-size'] = $value; |
|
347 | + $css[$media_query][$element]['-moz-background-size'] = $value; |
|
348 | + $css[$media_query][$element]['-ms-background-size'] = $value; |
|
349 | + $css[$media_query][$element]['-o-background-size'] = $value; |
|
350 | 350 | } |
351 | 351 | /** |
352 | 352 | * transition |
353 | 353 | */ |
354 | 354 | elseif ( 'transition' == $property ) { |
355 | - $css[ $media_query ][ $element ]['-webkit-transition'] = $value; |
|
356 | - $css[ $media_query ][ $element ]['-moz-transition'] = $value; |
|
357 | - $css[ $media_query ][ $element ]['-ms-transition'] = $value; |
|
358 | - $css[ $media_query ][ $element ]['-o-transition'] = $value; |
|
355 | + $css[$media_query][$element]['-webkit-transition'] = $value; |
|
356 | + $css[$media_query][$element]['-moz-transition'] = $value; |
|
357 | + $css[$media_query][$element]['-ms-transition'] = $value; |
|
358 | + $css[$media_query][$element]['-o-transition'] = $value; |
|
359 | 359 | } |
360 | 360 | /** |
361 | 361 | * transition-property |
362 | 362 | */ |
363 | 363 | elseif ( 'transition-property' == $property ) { |
364 | - $css[ $media_query ][ $element ]['-webkit-transition-property'] = $value; |
|
365 | - $css[ $media_query ][ $element ]['-moz-transition-property'] = $value; |
|
366 | - $css[ $media_query ][ $element ]['-ms-transition-property'] = $value; |
|
367 | - $css[ $media_query ][ $element ]['-o-transition-property'] = $value; |
|
364 | + $css[$media_query][$element]['-webkit-transition-property'] = $value; |
|
365 | + $css[$media_query][$element]['-moz-transition-property'] = $value; |
|
366 | + $css[$media_query][$element]['-ms-transition-property'] = $value; |
|
367 | + $css[$media_query][$element]['-o-transition-property'] = $value; |
|
368 | 368 | } |
369 | 369 | } |
370 | 370 | } |
@@ -1,14 +1,14 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Try to automatically generate the script necessary for adding icons to panels & section |
|
4 | - * |
|
5 | - * @package Kirki |
|
6 | - * @category Core |
|
7 | - * @author Aristeides Stathopoulos |
|
8 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
9 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
10 | - * @since 1.0 |
|
11 | - */ |
|
3 | + * Try to automatically generate the script necessary for adding icons to panels & section |
|
4 | + * |
|
5 | + * @package Kirki |
|
6 | + * @category Core |
|
7 | + * @author Aristeides Stathopoulos |
|
8 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
9 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
10 | + * @since 1.0 |
|
11 | + */ |
|
12 | 12 | |
13 | 13 | // Exit if accessed directly |
14 | 14 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Try to automatically generate the script necessary for postMessage to work. |
|
4 | - * for documentation see https://github.com/aristath/kirki/wiki/required |
|
5 | - * |
|
6 | - * @package Kirki |
|
7 | - * @category Core |
|
8 | - * @author Aristeides Stathopoulos |
|
9 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
10 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
11 | - * @since 1.0 |
|
12 | - */ |
|
3 | + * Try to automatically generate the script necessary for postMessage to work. |
|
4 | + * for documentation see https://github.com/aristath/kirki/wiki/required |
|
5 | + * |
|
6 | + * @package Kirki |
|
7 | + * @category Core |
|
8 | + * @author Aristeides Stathopoulos |
|
9 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
10 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
11 | + * @since 1.0 |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | // Exit if accessed directly |
15 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -53,7 +53,7 @@ |
||
53 | 53 | * then use the 'output' argument to auto-generate the js_vars |
54 | 54 | */ |
55 | 55 | $config_id = ( isset( $args['kirki_config'] ) ) ? $args['kirki_config'] : 'global'; |
56 | - if ( isset( Kirki::$config[ $config_id ]['postMessage'] ) && 'auto' == Kirki::$config[ $config_id ]['postMessage'] ) { |
|
56 | + if ( isset( Kirki::$config[$config_id]['postMessage'] ) && 'auto' == Kirki::$config[$config_id]['postMessage'] ) { |
|
57 | 57 | if ( ! isset( $args['js_vars'] ) || empty( $args['js_vars'] ) ) { |
58 | 58 | if ( isset( $args['output'] ) ) { |
59 | 59 | $args['js_vars'] = $args['output']; |
@@ -1,14 +1,14 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Injects tooltips to controls when the 'tooltip' argument is used. |
|
4 | - * |
|
5 | - * @package Kirki |
|
6 | - * @category Core |
|
7 | - * @author Aristeides Stathopoulos |
|
8 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
9 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
10 | - * @since 1.0 |
|
11 | - */ |
|
3 | + * Injects tooltips to controls when the 'tooltip' argument is used. |
|
4 | + * |
|
5 | + * @package Kirki |
|
6 | + * @category Core |
|
7 | + * @author Aristeides Stathopoulos |
|
8 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
9 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
10 | + * @since 1.0 |
|
11 | + */ |
|
12 | 12 | |
13 | 13 | // Exit if accessed directly |
14 | 14 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -21,8 +21,8 @@ |
||
21 | 21 | |
22 | 22 | $previous_path = ''; |
23 | 23 | for ( $i = 0; $i < $levels; $i++ ) { |
24 | - $paths[] = $path . $previous_path . strtolower( $exploded[ $i ] ) . '/' . $filename; |
|
25 | - $previous_path .= strtolower( $exploded[ $i ] ) . '/'; |
|
24 | + $paths[] = $path . $previous_path . strtolower( $exploded[$i] ) . '/' . $filename; |
|
25 | + $previous_path .= strtolower( $exploded[$i] ) . '/'; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | foreach ( $paths as $path ) { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | /** |
53 | 53 | * Get the config arguments |
54 | 54 | */ |
55 | - $config = Kirki::$config[ $config_id ]; |
|
55 | + $config = Kirki::$config[$config_id]; |
|
56 | 56 | /** |
57 | 57 | * Sanitize option_name |
58 | 58 | */ |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | /** |
153 | 153 | * Add the field to the static $fields variable properly indexed |
154 | 154 | */ |
155 | - Kirki::$fields[ $args['settings'] ] = $args; |
|
155 | + Kirki::$fields[$args['settings']] = $args; |
|
156 | 156 | |
157 | 157 | if ( 'background' == $args['type'] ) { |
158 | 158 | /** |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | /** |
197 | 197 | * If the defined config does not exist, use global. |
198 | 198 | */ |
199 | - if ( ! isset( Kirki::$config[ $config_id ] ) ) { |
|
199 | + if ( ! isset( Kirki::$config[$config_id] ) ) { |
|
200 | 200 | $config_id = 'global'; |
201 | 201 | } |
202 | 202 | return esc_attr( $config_id ); |
@@ -221,8 +221,8 @@ discard block |
||
221 | 221 | /** |
222 | 222 | * Try to get the option_name from the config |
223 | 223 | */ |
224 | - if ( isset( Kirki::$config[ $config_id ]['option_name'] ) ) { |
|
225 | - return esc_attr( Kirki::$config[ $config_id ]['option_name'] ); |
|
224 | + if ( isset( Kirki::$config[$config_id]['option_name'] ) ) { |
|
225 | + return esc_attr( Kirki::$config[$config_id]['option_name'] ); |
|
226 | 226 | } |
227 | 227 | /** |
228 | 228 | * If all else fails, return empty. |
@@ -250,8 +250,8 @@ discard block |
||
250 | 250 | /** |
251 | 251 | * Try to get the capability from the config |
252 | 252 | */ |
253 | - if ( isset( Kirki::$config[ $config_id ]['capability'] ) ) { |
|
254 | - return esc_attr( Kirki::$config[ $config_id ]['capability'] ); |
|
253 | + if ( isset( Kirki::$config[$config_id]['capability'] ) ) { |
|
254 | + return esc_attr( Kirki::$config[$config_id]['capability'] ); |
|
255 | 255 | } |
256 | 256 | /** |
257 | 257 | * If all else fails, return edit_theme_options. |
@@ -279,8 +279,8 @@ discard block |
||
279 | 279 | /** |
280 | 280 | * Try to get the option_type from the config |
281 | 281 | */ |
282 | - if ( isset( Kirki::$config[ $config_id ]['option_type'] ) ) { |
|
283 | - return esc_attr( Kirki::$config[ $config_id ]['option_type'] ); |
|
282 | + if ( isset( Kirki::$config[$config_id]['option_type'] ) ) { |
|
283 | + return esc_attr( Kirki::$config[$config_id]['option_type'] ); |
|
284 | 284 | } |
285 | 285 | /** |
286 | 286 | * If all else fails, return option_type. |
@@ -313,12 +313,12 @@ discard block |
||
313 | 313 | if ( is_array( $args['settings'] ) ) { |
314 | 314 | $settings = array(); |
315 | 315 | foreach ( $args['settings'] as $setting_key => $setting_value ) { |
316 | - $settings[ sanitize_key( $setting_key ) ] = esc_attr( $setting_value ); |
|
316 | + $settings[sanitize_key( $setting_key )] = esc_attr( $setting_value ); |
|
317 | 317 | /** |
318 | 318 | * If we're using serialized options then we may need to modify things a bit |
319 | 319 | */ |
320 | 320 | if ( 'option' == $args['option_type'] && '' != $args['option_name'] && ( false === strpos( $setting_key, '[' ) ) ) { |
321 | - $settings[ sanitize_key( $setting_key ) ] = esc_attr( $args['option_name'] ).'['.esc_attr( $setting_value ).']'; |
|
321 | + $settings[sanitize_key( $setting_key )] = esc_attr( $args['option_name'] ) . '[' . esc_attr( $setting_value ) . ']'; |
|
322 | 322 | } |
323 | 323 | } |
324 | 324 | return $settings; |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | ); |
527 | 527 | |
528 | 528 | if ( array_key_exists( $args['type'], $default_callbacks ) ) { |
529 | - return $default_callbacks[ $args['type'] ]; |
|
529 | + return $default_callbacks[$args['type']]; |
|
530 | 530 | } else { |
531 | 531 | return array( 'Kirki_Sanitize_Values', 'unfiltered' ); |
532 | 532 | } |