@@ -56,16 +56,16 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | if ( is_array( $this->json['value'] ) ) { |
| 58 | 58 | foreach ( array_keys( $this->json['value'] ) as $key ) { |
| 59 | - if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ), true ) && ! isset( $this->json['default'][ $key ] ) ) { |
|
| 60 | - unset( $this->json['value'][ $key ] ); |
|
| 59 | + if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ), true ) && ! isset( $this->json['default'][$key] ) ) { |
|
| 60 | + unset( $this->json['value'][$key] ); |
|
| 61 | 61 | } |
| 62 | 62 | // Fix for https://wordpress.org/support/topic/white-font-after-updateing-to-3-0-16. |
| 63 | - if ( ! isset( $this->json['default'][ $key ] ) ) { |
|
| 64 | - unset( $this->json['value'][ $key ] ); |
|
| 63 | + if ( ! isset( $this->json['default'][$key] ) ) { |
|
| 64 | + unset( $this->json['value'][$key] ); |
|
| 65 | 65 | } |
| 66 | 66 | // Fix for https://github.com/aristath/kirki/issues/1405. |
| 67 | - if ( isset( $this->json['default'][ $key ] ) && false === $this->json['default'][ $key ] ) { |
|
| 68 | - unset( $this->json['value'][ $key ] ); |
|
| 67 | + if ( isset( $this->json['default'][$key] ) && false === $this->json['default'][$key] ) { |
|
| 68 | + unset( $this->json['value'][$key] ); |
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | if ( is_string( $variant ) ) { |
| 282 | 282 | $final_variants[] = array( |
| 283 | 283 | 'id' => $variant, |
| 284 | - 'label' => isset( $all_variants[ $variant ] ) ? $all_variants[ $variant ] : $variant, |
|
| 284 | + 'label' => isset( $all_variants[$variant] ) ? $all_variants[$variant] : $variant, |
|
| 285 | 285 | ); |
| 286 | 286 | } elseif ( is_array( $variant ) && isset( $variant['id'] ) && isset( $variant['label'] ) ) { |
| 287 | 287 | $final_variants[] = $variant; |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | if ( array_key_exists( $variant, $all_variants ) ) { |
| 365 | 365 | $available_variants[] = array( |
| 366 | 366 | 'id' => $variant, |
| 367 | - 'label' => $all_variants[ $variant ], |
|
| 367 | + 'label' => $all_variants[$variant], |
|
| 368 | 368 | ); |
| 369 | 369 | } |
| 370 | 370 | } |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | if ( array_key_exists( $subset, $all_subsets ) ) { |
| 377 | 377 | $available_subsets[] = array( |
| 378 | 378 | 'id' => $subset, |
| 379 | - 'label' => $all_subsets[ $subset ], |
|
| 379 | + 'label' => $all_subsets[$subset], |
|
| 380 | 380 | ); |
| 381 | 381 | } |
| 382 | 382 | } |