@@ -118,9 +118,9 @@ |
||
| 118 | 118 | // If we have a variable_callback defined then get the value of the option |
| 119 | 119 | // and run it through the callback function. |
| 120 | 120 | // If no callback is defined (false) then just get the value. |
| 121 | - $variables[ $variable_name ] = Kirki_Values::get_value( $field['settings'] ); |
|
| 121 | + $variables[$variable_name] = Kirki_Values::get_value( $field['settings'] ); |
|
| 122 | 122 | if ( $variable_callback ) { |
| 123 | - $variables[ $variable_name ] = call_user_func( $field_variable['callback'], Kirki_Values::get_value( $field['settings'] ) ); |
|
| 123 | + $variables[$variable_name] = call_user_func( $field_variable['callback'], Kirki_Values::get_value( $field['settings'] ) ); |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | } |
@@ -147,15 +147,15 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | foreach ( array_keys( $this->json['value'] ) as $key ) { |
| 150 | - if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ) ) && ! isset( $this->json['default'][ $key ] ) ) { |
|
| 151 | - unset( $this->json['value'][ $key ] ); |
|
| 150 | + if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ) ) && ! isset( $this->json['default'][$key] ) ) { |
|
| 151 | + unset( $this->json['value'][$key] ); |
|
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | // Fix for https://github.com/aristath/kirki/issues/1405. |
| 156 | 156 | foreach ( array_keys( $this->json['value'] ) as $key ) { |
| 157 | - if ( isset( $this->json['default'][ $key ] ) && false === $this->json['default'][ $key ] ) { |
|
| 158 | - unset( $this->json['value'][ $key ] ); |
|
| 157 | + if ( isset( $this->json['default'][$key] ) && false === $this->json['default'][$key] ) { |
|
| 158 | + unset( $this->json['value'][$key] ); |
|
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | $this->json['show_variants'] = ( true === Kirki_Fonts_Google::$force_load_all_variants ) ? false : true; |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | if ( is_string( $variant ) ) { |
| 339 | 339 | $final_variants[] = array( |
| 340 | 340 | 'id' => $variant, |
| 341 | - 'label' => isset( $all_variants[ $variant ] ) ? $all_variants[ $variant ] : $variant, |
|
| 341 | + 'label' => isset( $all_variants[$variant] ) ? $all_variants[$variant] : $variant, |
|
| 342 | 342 | ); |
| 343 | 343 | } elseif ( is_array( $variant ) && isset( $variant['id'] ) && isset( $variant['label'] ) ) { |
| 344 | 344 | $final_variants[] = $variant; |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | if ( array_key_exists( $variant, $all_variants ) ) { |
| 420 | 420 | $available_variants[] = array( |
| 421 | 421 | 'id' => $variant, |
| 422 | - 'label' => $all_variants[ $variant ], |
|
| 422 | + 'label' => $all_variants[$variant], |
|
| 423 | 423 | ); |
| 424 | 424 | } |
| 425 | 425 | } |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | if ( array_key_exists( $subset, $all_subsets ) ) { |
| 432 | 432 | $available_subsets[] = array( |
| 433 | 433 | 'id' => $subset, |
| 434 | - 'label' => $all_subsets[ $subset ], |
|
| 434 | + 'label' => $all_subsets[$subset], |
|
| 435 | 435 | ); |
| 436 | 436 | } |
| 437 | 437 | } |