@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | $defaults = isset( $args['default'] ) ? $args['default'] : array(); |
18 | 18 | $sanitize_callback = $args['sanitize_callback']; |
19 | 19 | foreach ( $settings as $setting_key => $setting_value ) { |
20 | - $default = ( isset( $defaults[ $setting_key ] ) ) ? $defaults[ $setting_key ] : ''; |
|
20 | + $default = ( isset( $defaults[$setting_key] ) ) ? $defaults[$setting_key] : ''; |
|
21 | 21 | $transport = isset( $args['transport'] ) ? $args['transport'] : 'refresh'; |
22 | 22 | |
23 | 23 | if ( isset( $args['sanitize_callback'] ) && is_array( $args['sanitize_callback'] ) ) { |
24 | - if ( isset( $args['sanitize_callback'][ $setting_key ] ) ) { |
|
25 | - $sanitize_callback = Kirki_Field::sanitize_callback( '', array( 'sanitize_callback' => $args['sanitize_callback'][ $setting_key ] ) ); |
|
24 | + if ( isset( $args['sanitize_callback'][$setting_key] ) ) { |
|
25 | + $sanitize_callback = Kirki_Field::sanitize_callback( '', array( 'sanitize_callback' => $args['sanitize_callback'][$setting_key] ) ); |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | $this->wp_customize->add_setting( $setting_value, array( |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | if ( isset( $args['type'] ) && array_key_exists( $args['type'], Kirki_Control::$setting_types ) ) { |
39 | 39 | // We must instantiate a custom class for the setting |
40 | - $setting_classname = Kirki_Control::$setting_types[ $args['type'] ]; |
|
40 | + $setting_classname = Kirki_Control::$setting_types[$args['type']]; |
|
41 | 41 | $this->wp_customize->add_setting( new $setting_classname( $this->wp_customize, $args['settings'], array( |
42 | 42 | 'default' => isset( $args['default'] ) ? $args['default'] : '', |
43 | 43 | 'type' => $args['option_type'], |
@@ -63,7 +63,7 @@ |
||
63 | 63 | if ( isset( $field['output'] ) && is_array( $field['output'] ) ) { |
64 | 64 | foreach ( $field['output'] as $output ) { |
65 | 65 | // If we don't have a typography-related output argument we can skip this. |
66 | - if ( ! isset( $output['property'] ) || ! in_array( $output['property'], array( 'font-family', 'font-weight', 'font-subset', 'subset', 'font-style' ) ) ) { |
|
66 | + if ( ! isset( $output['property'] ) || ! in_array( $output['property'], array( 'font-family', 'font-weight', 'font-subset', 'subset', 'font-style' ) ) ) { |
|
67 | 67 | continue; |
68 | 68 | } |
69 | 69 | // Get the value |
@@ -56,7 +56,7 @@ |
||
56 | 56 | self::$link = 'https://fonts.googleapis.com/css?family='; |
57 | 57 | self::$link .= implode( '|', $link_fonts ); |
58 | 58 | if ( ! empty( $all_subsets ) ) { |
59 | - self::$link .= '&subset=' . implode( ',', $all_subsets ); |
|
59 | + self::$link .= '&subset=' . implode( ',', $all_subsets ); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | } |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | |
67 | 67 | // Get all valid font variants for this font |
68 | 68 | $font_variants = array(); |
69 | - if ( isset( $google_fonts[ $family ]['variants'] ) ) { |
|
70 | - $font_variants = $google_fonts[ $family ]['variants']; |
|
69 | + if ( isset( $google_fonts[$family]['variants'] ) ) { |
|
70 | + $font_variants = $google_fonts[$family]['variants']; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | // format the requested variant |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | |
82 | 82 | // Get all available subsets for this font |
83 | 83 | $font_subsets = array(); |
84 | - if ( isset( $google_fonts[ $family ]['subsets'] ) ) { |
|
85 | - $font_subsets = $google_fonts[ $family ]['subsets']; |
|
84 | + if ( isset( $google_fonts[$family]['subsets'] ) ) { |
|
85 | + $font_subsets = $google_fonts[$family]['subsets']; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | // Get the valid subsets for this font |
@@ -93,14 +93,14 @@ discard block |
||
93 | 93 | $requested_subsets = $font_subsets; |
94 | 94 | } |
95 | 95 | |
96 | - self::$fonts[ $family ] = array( |
|
96 | + self::$fonts[$family] = array( |
|
97 | 97 | 'subsets' => $requested_subsets, |
98 | 98 | ); |
99 | - if ( ! isset( self::$fonts[ $family ]['variants'] ) ) { |
|
100 | - self::$fonts[ $family ]['variants'] = array(); |
|
99 | + if ( ! isset( self::$fonts[$family]['variants'] ) ) { |
|
100 | + self::$fonts[$family]['variants'] = array(); |
|
101 | 101 | } |
102 | 102 | if ( $variant_is_valid ) { |
103 | - self::$fonts[ $family ]['variants'][] =$requested_variant; |
|
103 | + self::$fonts[$family]['variants'][] = $requested_variant; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | } |