@@ -52,12 +52,12 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | if ( is_array( $this->json['value'] ) ) { |
| 54 | 54 | foreach ( array_keys( $this->json['value'] ) as $key ) { |
| 55 | - if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ), true ) && ! isset( $this->json['default'][ $key ] ) ) { |
|
| 56 | - unset( $this->json['value'][ $key ] ); |
|
| 55 | + if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ), true ) && ! isset( $this->json['default'][$key] ) ) { |
|
| 56 | + unset( $this->json['value'][$key] ); |
|
| 57 | 57 | } |
| 58 | 58 | // Fix for https://github.com/aristath/kirki/issues/1405. |
| 59 | - if ( isset( $this->json['default'][ $key ] ) && false === $this->json['default'][ $key ] ) { |
|
| 60 | - unset( $this->json['value'][ $key ] ); |
|
| 59 | + if ( isset( $this->json['default'][$key] ) && false === $this->json['default'][$key] ) { |
|
| 60 | + unset( $this->json['value'][$key] ); |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | if ( is_string( $variant ) ) { |
| 258 | 258 | $final_variants[] = array( |
| 259 | 259 | 'id' => $variant, |
| 260 | - 'label' => isset( $all_variants[ $variant ] ) ? $all_variants[ $variant ] : $variant, |
|
| 260 | + 'label' => isset( $all_variants[$variant] ) ? $all_variants[$variant] : $variant, |
|
| 261 | 261 | ); |
| 262 | 262 | } elseif ( is_array( $variant ) && isset( $variant['id'] ) && isset( $variant['label'] ) ) { |
| 263 | 263 | $final_variants[] = $variant; |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | if ( array_key_exists( $variant, $all_variants ) ) { |
| 339 | 339 | $available_variants[] = array( |
| 340 | 340 | 'id' => $variant, |
| 341 | - 'label' => $all_variants[ $variant ], |
|
| 341 | + 'label' => $all_variants[$variant], |
|
| 342 | 342 | ); |
| 343 | 343 | } |
| 344 | 344 | } |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | if ( array_key_exists( $subset, $all_subsets ) ) { |
| 351 | 351 | $available_subsets[] = array( |
| 352 | 352 | 'id' => $subset, |
| 353 | - 'label' => $all_subsets[ $subset ], |
|
| 353 | + 'label' => $all_subsets[$subset], |
|
| 354 | 354 | ); |
| 355 | 355 | } |
| 356 | 356 | } |