@@ -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' ) ) { |
@@ -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' ) ) { |
@@ -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' ) ) { |
@@ -54,8 +54,8 @@ |
||
| 54 | 54 | * |
| 55 | 55 | * These files are only enqueued when debugging Kirki |
| 56 | 56 | * |
| 57 | - * @param $handle string |
|
| 58 | - * @param $file string|null |
|
| 57 | + * @param string $handle string |
|
| 58 | + * @param string $file string|null |
|
| 59 | 59 | * @param $deps array |
| 60 | 60 | * @param $in_footer bool |
| 61 | 61 | */ |
@@ -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' ) ) { |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | 'typography' => 'Kirki_Output_Control_Typography', |
| 97 | 97 | ) ); |
| 98 | 98 | if ( array_key_exists( self::$field_type, $field_output_classes ) ) { |
| 99 | - $classname = $field_output_classes[ self::$field_type ]; |
|
| 99 | + $classname = $field_output_classes[self::$field_type]; |
|
| 100 | 100 | } |
| 101 | 101 | $obj = new $classname( $field['kirki_config'], self::$output, self::$value ); |
| 102 | 102 | return $obj->get_styles(); |
@@ -172,8 +172,8 @@ discard block |
||
| 172 | 172 | 'transition', |
| 173 | 173 | 'transition-property', |
| 174 | 174 | ) ) ) { |
| 175 | - $css[ $media_query ][ $element ][ '-webkit-' . $property ] = $value; |
|
| 176 | - $css[ $media_query ][ $element ][ '-moz-' . $property ] = $value; |
|
| 175 | + $css[$media_query][$element]['-webkit-' . $property] = $value; |
|
| 176 | + $css[$media_query][$element]['-moz-' . $property] = $value; |
|
| 177 | 177 | } |
| 178 | 178 | /** |
| 179 | 179 | * Add -ms-* and -o-* |
@@ -184,8 +184,8 @@ discard block |
||
| 184 | 184 | 'transition', |
| 185 | 185 | 'transition-property', |
| 186 | 186 | ) ) ) { |
| 187 | - $css[ $media_query ][ $element ][ '-ms-' . $property ] = $value; |
|
| 188 | - $css[ $media_query ][ $element ][ '-o-' . $property ] = $value; |
|
| 187 | + $css[$media_query][$element]['-ms-' . $property] = $value; |
|
| 188 | + $css[$media_query][$element]['-o-' . $property] = $value; |
|
| 189 | 189 | } |
| 190 | 190 | } |
| 191 | 191 | } |
@@ -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 ) { |
@@ -34,13 +34,13 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | foreach ( $args['fields'] as $key => $value ) { |
| 36 | 36 | if ( ! isset( $value['default'] ) ) { |
| 37 | - $args['fields'][ $key ]['default'] = ''; |
|
| 37 | + $args['fields'][$key]['default'] = ''; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | if ( ! isset( $value['label'] ) ) { |
| 41 | - $args['fields'][ $key ]['label'] = ''; |
|
| 41 | + $args['fields'][$key]['label'] = ''; |
|
| 42 | 42 | } |
| 43 | - $args['fields'][ $key ]['id'] = $key; |
|
| 43 | + $args['fields'][$key]['id'] = $key; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $this->fields = $args['fields']; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | continue; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - $fields[ $key ]['buttonLabels'] = $default_image_button_labels; |
|
| 66 | + $fields[$key]['buttonLabels'] = $default_image_button_labels; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | $this->json['fields'] = $fields; |
@@ -26,15 +26,15 @@ |
||
| 26 | 26 | if ( is_array( $this->choices ) ) { |
| 27 | 27 | foreach ( $this->choices as $choice => $value ) { |
| 28 | 28 | if ( true === $value ) { |
| 29 | - $this->json['choices'][ $choice ] = true; |
|
| 29 | + $this->json['choices'][$choice] = true; |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | if ( is_array( $this->json['default'] ) ) { |
| 35 | 35 | foreach ( $this->json['default'] as $key => $value ) { |
| 36 | - if ( isset( $this->json['choices'][ $key ] ) && ! isset( $this->json['value'][ $key ] ) ) { |
|
| 37 | - $this->json['value'][ $key ] = $value; |
|
| 36 | + if ( isset( $this->json['choices'][$key] ) && ! isset( $this->json['value'][$key] ) ) { |
|
| 37 | + $this->json['value'][$key] = $value; |
|
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -189,7 +189,7 @@ |
||
| 189 | 189 | return 'auto'; |
| 190 | 190 | } |
| 191 | 191 | // Return empty if there are no numbers in the value. |
| 192 | - if ( ! preg_match( '#[0-9]#' , $value ) ) { |
|
| 192 | + if ( ! preg_match( '#[0-9]#', $value ) ) { |
|
| 193 | 193 | return ''; |
| 194 | 194 | } |
| 195 | 195 | // The raw value without the units |
@@ -9,13 +9,13 @@ |
||
| 9 | 9 | // Add backup font |
| 10 | 10 | if ( Kirki_Fonts::is_google_font( $this->value ) ) { |
| 11 | 11 | |
| 12 | - if ( isset( $google_fonts_array[ $this->value ] ) && isset( $google_fonts_array[ $this->value ]['category'] ) ) { |
|
| 13 | - if ( isset( $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ] ) ) { |
|
| 12 | + if ( isset( $google_fonts_array[$this->value] ) && isset( $google_fonts_array[$this->value]['category'] ) ) { |
|
| 13 | + if ( isset( $backup_fonts[$google_fonts_array[$this->value]['category']] ) ) { |
|
| 14 | 14 | // add double quotes if needed |
| 15 | 15 | if ( false !== strpos( $this->value, ' ' ) && false === strpos( $this->value, '"' ) ) { |
| 16 | - $this->value = '"' . $this->value . '", ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ]; |
|
| 16 | + $this->value = '"' . $this->value . '", ' . $backup_fonts[$google_fonts_array[$this->value]['category']]; |
|
| 17 | 17 | } else { |
| 18 | - $this->value .= ', ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ]; |
|
| 18 | + $this->value .= ', ' . $backup_fonts[$google_fonts_array[$this->value]['category']]; |
|
| 19 | 19 | } |
| 20 | 20 | } |
| 21 | 21 | } |