@@ -51,15 +51,15 @@ discard block |
||
51 | 51 | parent::to_json(); |
52 | 52 | |
53 | 53 | foreach ( array_keys( $this->json['value'] ) as $key ) { |
54 | - if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ), true ) && ! isset( $this->json['default'][ $key ] ) ) { |
|
55 | - unset( $this->json['value'][ $key ] ); |
|
54 | + if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ), true ) && ! isset( $this->json['default'][$key] ) ) { |
|
55 | + unset( $this->json['value'][$key] ); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | 59 | // Fix for https://github.com/aristath/kirki/issues/1405. |
60 | 60 | foreach ( array_keys( $this->json['value'] ) as $key ) { |
61 | - if ( isset( $this->json['default'][ $key ] ) && false === $this->json['default'][ $key ] ) { |
|
62 | - unset( $this->json['value'][ $key ] ); |
|
61 | + if ( isset( $this->json['default'][$key] ) && false === $this->json['default'][$key] ) { |
|
62 | + unset( $this->json['value'][$key] ); |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 | $this->json['show_variants'] = ( true === Kirki_Fonts_Google::$force_load_all_variants ) ? false : true; |
@@ -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 | } |