Passed
Push — develop ( 526d41...4a3f4b )
by Aristeides
03:57 queued 26s
created
controls/php/class-kirki-control-base.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -158,41 +158,41 @@
 block discarded – undo
158 158
 		// Get the basics from the parent class.
159 159
 		parent::to_json();
160 160
 		// Default.
161
-		$this->json['default'] = $this->setting->default;
161
+		$this->json[ 'default' ] = $this->setting->default;
162 162
 		if ( isset( $this->default ) ) {
163
-			$this->json['default'] = $this->default;
163
+			$this->json[ 'default' ] = $this->default;
164 164
 		}
165 165
 		// Required.
166
-		$this->json['required'] = $this->required;
166
+		$this->json[ 'required' ] = $this->required;
167 167
 		// Output.
168
-		$this->json['output'] = $this->output;
168
+		$this->json[ 'output' ] = $this->output;
169 169
 		// Value.
170
-		$this->json['value'] = $this->value();
170
+		$this->json[ 'value' ] = $this->value();
171 171
 		// Choices.
172
-		$this->json['choices'] = $this->choices;
172
+		$this->json[ 'choices' ] = $this->choices;
173 173
 		// The link.
174
-		$this->json['link'] = $this->get_link();
174
+		$this->json[ 'link' ] = $this->get_link();
175 175
 		// The ID.
176
-		$this->json['id'] = $this->id;
176
+		$this->json[ 'id' ] = $this->id;
177 177
 		// Translation strings.
178
-		$this->json['l10n'] = $this->l10n();
178
+		$this->json[ 'l10n' ] = $this->l10n();
179 179
 		// The ajaxurl in case we need it.
180
-		$this->json['ajaxurl'] = admin_url( 'admin-ajax.php' );
180
+		$this->json[ 'ajaxurl' ] = admin_url( 'admin-ajax.php' );
181 181
 		// Input attributes.
182
-		$this->json['inputAttrs'] = '';
182
+		$this->json[ 'inputAttrs' ] = '';
183 183
 		foreach ( $this->input_attrs as $attr => $value ) {
184
-			$this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" ';
184
+			$this->json[ 'inputAttrs' ] .= $attr . '="' . esc_attr( $value ) . '" ';
185 185
 		}
186 186
 		// The kirki-config.
187
-		$this->json['kirkiConfig'] = $this->kirki_config;
187
+		$this->json[ 'kirkiConfig' ] = $this->kirki_config;
188 188
 		// The option-type.
189
-		$this->json['kirkiOptionType'] = $this->option_type;
189
+		$this->json[ 'kirkiOptionType' ] = $this->option_type;
190 190
 		// The option-name.
191
-		$this->json['kirkiOptionName'] = $this->option_name;
191
+		$this->json[ 'kirkiOptionName' ] = $this->option_name;
192 192
 		// The preset.
193
-		$this->json['preset'] = $this->preset;
193
+		$this->json[ 'preset' ] = $this->preset;
194 194
 		// The CSS-Variables.
195
-		$this->json['css-var'] = $this->css_var;
195
+		$this->json[ 'css-var' ] = $this->css_var;
196 196
 	}
197 197
 
198 198
 	/**
Please login to merge, or discard this patch.
modules/css-vars/class-kirki-modules-css-vars.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,17 +75,17 @@
 block discarded – undo
75 75
 		echo '<style id="kirki-css-vars">';
76 76
 		echo ':root{';
77 77
 		foreach ( $fields as $id => $args ) {
78
-			if ( ! isset( $args['css_var'] ) || empty( $args['css_var'] ) ) {
78
+			if ( ! isset( $args[ 'css_var' ] ) || empty( $args[ 'css_var' ] ) ) {
79 79
 				continue;
80 80
 			}
81
-			if ( is_string( $args['css_var'] ) ) {
82
-				$args['css_var'] = array( $args['css_var'], '$' );
81
+			if ( is_string( $args[ 'css_var' ] ) ) {
82
+				$args[ 'css_var' ] = array( $args[ 'css_var' ], '$' );
83 83
 			}
84
-			$val = Kirki_Values::get_value( $args['kirki_config'], $id );
85
-			if ( isset( $args['css_var'][2] ) && is_array( $val ) && isset( $val[ $args['css_var'][2] ] ) ) {
86
-				$val = $val[ $args['css_var'][2] ];
84
+			$val = Kirki_Values::get_value( $args[ 'kirki_config' ], $id );
85
+			if ( isset( $args[ 'css_var' ][ 2 ] ) && is_array( $val ) && isset( $val[ $args[ 'css_var' ][ 2 ] ] ) ) {
86
+				$val = $val[ $args[ 'css_var' ][ 2 ] ];
87 87
 			}
88
-			echo esc_attr( $args['css_var'][0] ) . ':' . esc_attr( str_replace( '$', $val, $args['css_var'][1] ) ) . ';';
88
+			echo esc_attr( $args[ 'css_var' ][ 0 ] ) . ':' . esc_attr( str_replace( '$', $val, $args[ 'css_var' ][ 1 ] ) ) . ';';
89 89
 		}
90 90
 		echo '}';
91 91
 		echo '</style>';
Please login to merge, or discard this patch.