@@ -36,14 +36,14 @@ |
||
| 36 | 36 | // Add backup font. |
| 37 | 37 | if ( Kirki_Fonts::is_google_font( $this->value ) ) { |
| 38 | 38 | |
| 39 | - if ( isset( $google_fonts_array[ $this->value ] ) && isset( $google_fonts_array[ $this->value ]['category'] ) ) { |
|
| 40 | - if ( isset( $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ] ) ) { |
|
| 39 | + if ( isset( $google_fonts_array[$this->value] ) && isset( $google_fonts_array[$this->value]['category'] ) ) { |
|
| 40 | + if ( isset( $backup_fonts[$google_fonts_array[$this->value]['category']] ) ) { |
|
| 41 | 41 | |
| 42 | 42 | // Add double quotes if needed. |
| 43 | 43 | if ( false !== strpos( $this->value, ' ' ) && false === strpos( $this->value, '"' ) ) { |
| 44 | - $this->value = '"' . $this->value . '", ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ]; |
|
| 44 | + $this->value = '"' . $this->value . '", ' . $backup_fonts[$google_fonts_array[$this->value]['category']]; |
|
| 45 | 45 | } else { |
| 46 | - $this->value .= ', ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ]; |
|
| 46 | + $this->value .= ', ' . $backup_fonts[$google_fonts_array[$this->value]['category']]; |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * @access public |
| 38 | 38 | * @var null|string|array |
| 39 | 39 | */ |
| 40 | - public static $settings = null; |
|
| 40 | + public static $settings = null; |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * Output. |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @access public |
| 47 | 47 | * @var array |
| 48 | 48 | */ |
| 49 | - public static $output = array(); |
|
| 49 | + public static $output = array(); |
|
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | 52 | * Callback. |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * @access public |
| 56 | 56 | * @var null|string|array |
| 57 | 57 | */ |
| 58 | - public static $callback = null; |
|
| 58 | + public static $callback = null; |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * Option Name. |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * @access public |
| 74 | 74 | * @var string |
| 75 | 75 | */ |
| 76 | - public static $field_type = null; |
|
| 76 | + public static $field_type = null; |
|
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * Google Fonts |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | 'kirki-multicolor' => 'Kirki_Output_Field_Multicolor', |
| 172 | 172 | ) ); |
| 173 | 173 | if ( array_key_exists( self::$field_type, $field_output_classes ) ) { |
| 174 | - $classname = $field_output_classes[ self::$field_type ]; |
|
| 174 | + $classname = $field_output_classes[self::$field_type]; |
|
| 175 | 175 | } |
| 176 | 176 | $obj = new $classname( $field['kirki_config'], self::$output, self::$value ); |
| 177 | 177 | return $obj->get_styles(); |
@@ -235,10 +235,10 @@ discard block |
||
| 235 | 235 | 'transition', |
| 236 | 236 | 'transition-property', |
| 237 | 237 | ) ) ) { |
| 238 | - unset( $css[ $media_query ][ $element ][ $property ] ); |
|
| 239 | - $css[ $media_query ][ $element ][ '-webkit-' . $property ] = $value; |
|
| 240 | - $css[ $media_query ][ $element ][ '-moz-' . $property ] = $value; |
|
| 241 | - $css[ $media_query ][ $element ][ $property ] = $value; |
|
| 238 | + unset( $css[$media_query][$element][$property] ); |
|
| 239 | + $css[$media_query][$element]['-webkit-' . $property] = $value; |
|
| 240 | + $css[$media_query][$element]['-moz-' . $property] = $value; |
|
| 241 | + $css[$media_query][$element][$property] = $value; |
|
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | // Add -ms-* and -o-*. |
@@ -248,10 +248,10 @@ discard block |
||
| 248 | 248 | 'transition', |
| 249 | 249 | 'transition-property', |
| 250 | 250 | ) ) ) { |
| 251 | - unset( $css[ $media_query ][ $element ][ $property ] ); |
|
| 252 | - $css[ $media_query ][ $element ][ '-ms-' . $property ] = $value; |
|
| 253 | - $css[ $media_query ][ $element ][ '-o-' . $property ] = $value; |
|
| 254 | - $css[ $media_query ][ $element ][ $property ] = $value; |
|
| 251 | + unset( $css[$media_query][$element][$property] ); |
|
| 252 | + $css[$media_query][$element]['-ms-' . $property] = $value; |
|
| 253 | + $css[$media_query][$element]['-o-' . $property] = $value; |
|
| 254 | + $css[$media_query][$element][$property] = $value; |
|
| 255 | 255 | } |
| 256 | 256 | } |
| 257 | 257 | } |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | $configs = Kirki::$config; |
| 104 | 104 | foreach ( $configs as $config_id => $args ) { |
| 105 | 105 | // Get the CSS we want to write. |
| 106 | - $css[ $config_id ] = apply_filters( "kirki/{$config_id}/dynamic_css", Kirki_Modules_CSS::loop_controls( $config_id ) ); |
|
| 106 | + $css[$config_id] = apply_filters( "kirki/{$config_id}/dynamic_css", Kirki_Modules_CSS::loop_controls( $config_id ) ); |
|
| 107 | 107 | } |
| 108 | 108 | $css = implode( $css, '' ); |
| 109 | 109 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | |
| 70 | 70 | // Make sure start & end values are arrays. |
| 71 | 71 | $value['start'] = ( ! isset( $value['start'] ) ) ? array() : $value['start']; |
| 72 | - $value['end'] = ( ! isset( $value['end'] ) ) ? array() : $value['end']; |
|
| 72 | + $value['end'] = ( ! isset( $value['end'] ) ) ? array() : $value['end']; |
|
| 73 | 73 | |
| 74 | 74 | // Sanitie colors. |
| 75 | 75 | $value['start']['color'] = ( ! isset( $value['start']['color'] ) ) ? '' : esc_attr( $value['start']['color'] ); |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $fields = Kirki::$fields; |
| 43 | 43 | foreach ( $fields as $field ) { |
| 44 | 44 | if ( isset( $field['required'] ) && is_array( $field['required'] ) && ! empty( $field['required'] ) ) { |
| 45 | - $field_dependencies[ $field['id'] ] = $field['required']; |
|
| 45 | + $field_dependencies[$field['id']] = $field['required']; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | wp_localize_script( 'kirki_field_dependencies', 'fieldDependencies', $field_dependencies ); |