@@ -87,8 +87,8 @@ |
||
87 | 87 | 'monokai' => 'monokai', |
88 | 88 | 'material' => 'material', |
89 | 89 | ); |
90 | - if ( isset( $valid_themes[ $this->choices['theme'] ] ) ) { |
|
91 | - $this->choices['theme'] = $valid_themes[ $this->choices['theme'] ]; |
|
90 | + if ( isset( $valid_themes[$this->choices['theme']] ) ) { |
|
91 | + $this->choices['theme'] = $valid_themes[$this->choices['theme']]; |
|
92 | 92 | } else { |
93 | 93 | $this->choices['theme'] = 'elegant'; |
94 | 94 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | foreach ( $args as $key => $value ) { |
105 | 105 | // Is this property whitelisted? |
106 | 106 | if ( property_exists( $this, $key ) ) { |
107 | - $args[ $key ] = $value; |
|
107 | + $args[$key] = $value; |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 | |
@@ -141,10 +141,10 @@ discard block |
||
141 | 141 | $id = ( '' === $id ) ? 'global' : $id; |
142 | 142 | |
143 | 143 | $id_md5 = md5( $id ); |
144 | - if ( ! isset( self::$instances[ $id_md5 ] ) ) { |
|
145 | - self::$instances[ $id_md5 ] = new self( $id, $args ); |
|
144 | + if ( ! isset( self::$instances[$id_md5] ) ) { |
|
145 | + self::$instances[$id_md5] = new self( $id, $args ); |
|
146 | 146 | } |
147 | - return self::$instances[ $id_md5 ]; |
|
147 | + return self::$instances[$id_md5]; |
|
148 | 148 | |
149 | 149 | } |
150 | 150 |
@@ -26,11 +26,11 @@ |
||
26 | 26 | $fields = Kirki::$fields; |
27 | 27 | |
28 | 28 | // Make sure the current object matches a registered field. |
29 | - if ( ! isset( $object->setting->id ) || ! isset( $fields[ $object->setting->id ] ) ) { |
|
29 | + if ( ! isset( $object->setting->id ) || ! isset( $fields[$object->setting->id] ) ) { |
|
30 | 30 | return true; |
31 | 31 | } |
32 | 32 | |
33 | - $field = $fields[ $object->setting->id ]; |
|
33 | + $field = $fields[$object->setting->id]; |
|
34 | 34 | |
35 | 35 | if ( isset( $field['required'] ) ) { |
36 | 36 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | // Sanitize each sub-value separately. |
54 | 54 | foreach ( $value as $key => $sub_value ) { |
55 | - $value[ $key ] = Kirki_Sanitize_Values::css_dimension( $sub_value ); |
|
55 | + $value[$key] = Kirki_Sanitize_Values::css_dimension( $sub_value ); |
|
56 | 56 | } |
57 | 57 | return $value; |
58 | 58 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $this->choices['controls'] = array(); |
70 | 70 | if ( is_array( $this->default ) ) { |
71 | 71 | foreach ( $this->default as $key => $value ) { |
72 | - $this->choices['controls'][ $key ] = true; |
|
72 | + $this->choices['controls'][$key] = true; |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | */ |
50 | 50 | public function add_icon( $id, $icon, $context = 'section' ) { |
51 | 51 | |
52 | - self::$icons[ $context ][ $id ] = trim( $icon ); |
|
52 | + self::$icons[$context][$id] = trim( $icon ); |
|
53 | 53 | |
54 | 54 | } |
55 | 55 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | foreach ( $fields as $field ) { |
55 | 55 | if ( isset( $field['tooltip'] ) && ! empty( $field['tooltip'] ) ) { |
56 | 56 | $id = str_replace( '[', '-', str_replace( ']', '', $field['settings'] ) ); |
57 | - $this->tooltips_content[ $id ] = array( |
|
57 | + $this->tooltips_content[$id] = array( |
|
58 | 58 | 'id' => $id, |
59 | 59 | 'content' => wp_kses_post( $field['tooltip'] ), |
60 | 60 | ); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function add_tooltip( $field_id, $tooltip ) { |
74 | 74 | |
75 | - $this->tooltips_content[ $field_id ] = array( |
|
75 | + $this->tooltips_content[$field_id] = array( |
|
76 | 76 | 'id' => sanitize_key( $field_id ), |
77 | 77 | 'content' => wp_kses_post( $tooltip ), |
78 | 78 | ); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $class_name = 'WP_Customize_Control'; |
68 | 68 | // Get the classname from the array of control classnames. |
69 | 69 | if ( array_key_exists( $args['type'], self::$control_types ) ) { |
70 | - $class_name = self::$control_types[ $args['type'] ]; |
|
70 | + $class_name = self::$control_types[$args['type']]; |
|
71 | 71 | } |
72 | 72 | return $class_name; |
73 | 73 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | foreach ( self::$control_types as $key => $classname ) { |
142 | 142 | |
143 | 143 | if ( ! class_exists( $classname ) ) { |
144 | - unset( self::$control_types[ $key ] ); |
|
144 | + unset( self::$control_types[$key] ); |
|
145 | 145 | } |
146 | 146 | } |
147 | 147 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | // Sanitize each sub-value separately. |
54 | 54 | foreach ( $value as $key => $sub_value ) { |
55 | - $value[ $key ] = Kirki_Sanitize_Values::css_dimension( $sub_value ); |
|
55 | + $value[$key] = Kirki_Sanitize_Values::css_dimension( $sub_value ); |
|
56 | 56 | } |
57 | 57 | return $value; |
58 | 58 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $section_classname = 'WP_Customize_Section'; |
51 | 51 | |
52 | 52 | if ( isset( $args['type'] ) && array_key_exists( $args['type'], $this->section_types ) ) { |
53 | - $section_classname = $this->section_types[ $args['type'] ]; |
|
53 | + $section_classname = $this->section_types[$args['type']]; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | // Add the section. |