@@ -24,13 +24,13 @@ |
||
24 | 24 | // Add backup font |
25 | 25 | if ( Kirki_Fonts::is_google_font( $this->value ) ) { |
26 | 26 | |
27 | - if ( isset( $google_fonts_array[ $this->value ] ) && isset( $google_fonts_array[ $this->value ]['category'] ) ) { |
|
28 | - if ( isset( $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ] ) ) { |
|
27 | + if ( isset( $google_fonts_array[$this->value] ) && isset( $google_fonts_array[$this->value]['category'] ) ) { |
|
28 | + if ( isset( $backup_fonts[$google_fonts_array[$this->value]['category']] ) ) { |
|
29 | 29 | // Add double quotes if needed |
30 | 30 | if ( false !== strpos( $this->value, ' ' ) && false === strpos( $this->value, '"' ) ) { |
31 | - $this->value = '"' . $this->value . '", ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ]; |
|
31 | + $this->value = '"' . $this->value . '", ' . $backup_fonts[$google_fonts_array[$this->value]['category']]; |
|
32 | 32 | } else { |
33 | - $this->value .= ', ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ]; |
|
33 | + $this->value .= ', ' . $backup_fonts[$google_fonts_array[$this->value]['category']]; |
|
34 | 34 | } |
35 | 35 | } |
36 | 36 | } |
@@ -160,8 +160,8 @@ |
||
160 | 160 | |
161 | 161 | // Sanitize the font-size. |
162 | 162 | if ( 'font-size' === $key || 'letter-spacing' === $key || 'word-spacing' === $key ) { |
163 | - $value[ $key ] = Kirki_Sanitize_Values::css_dimension( $value[ $key ] ); |
|
164 | - if ( is_numeric( $value[ $key ] ) ) { |
|
163 | + $value[$key] = Kirki_Sanitize_Values::css_dimension( $value[$key] ); |
|
164 | + if ( is_numeric( $value[$key] ) ) { |
|
165 | 165 | $value['font-size'] .= 'px'; |
166 | 166 | } |
167 | 167 | } elseif ( 'line-height' === $key ) { |
@@ -48,7 +48,7 @@ |
||
48 | 48 | } |
49 | 49 | } |
50 | 50 | if ( $process_field && isset( $field['required'] ) && ! empty( $field['required'] ) ) { |
51 | - $field_dependencies[ $field['id'] ] = $field['required']; |
|
51 | + $field_dependencies[$field['id']] = $field['required']; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | wp_localize_script( 'kirki_field_dependencies', 'fieldDependencies', $field_dependencies ); |
@@ -104,14 +104,14 @@ discard block |
||
104 | 104 | $available_variants = array(); |
105 | 105 | foreach ( $variants as $variant ) { |
106 | 106 | if ( array_key_exists( $variant, $all_variants ) ) { |
107 | - $available_variants[] = array( 'id' => $variant, 'label' => $all_variants[ $variant ] ); |
|
107 | + $available_variants[] = array( 'id' => $variant, 'label' => $all_variants[$variant] ); |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 | |
111 | 111 | $available_subsets = array(); |
112 | 112 | foreach ( $subsets as $subset ) { |
113 | 113 | if ( array_key_exists( $subset, $all_subsets ) ) { |
114 | - $available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[ $subset ] ); |
|
114 | + $available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[$subset] ); |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
@@ -388,6 +388,6 @@ discard block |
||
388 | 388 | if ( false === $id ) { |
389 | 389 | return $translation_strings; |
390 | 390 | } |
391 | - return $translation_strings[ $id ]; |
|
391 | + return $translation_strings[$id]; |
|
392 | 392 | } |
393 | 393 | } |