Completed
Push — develop ( 486960...a7aa6b )
by Aristeides
02:02
created
modules/postmessage/class-kirki-modules-postmessage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
 			$js_var['index_key'] = $key;
143 143
 			$callback = $this->get_callback( $args );
144 144
 			if ( is_callable( $callback ) ) {
145
-				$field['scripts'][ $key ] = call_user_func_array( $callback, array( $js_var, $args ) );
145
+				$field['scripts'][$key] = call_user_func_array( $callback, array( $js_var, $args ) );
146 146
 				continue;
147 147
 			}
148
-			$field['scripts'][ $key ] = $this->script_var( $js_var );
148
+			$field['scripts'][$key] = $this->script_var( $js_var );
149 149
 		}
150 150
 		$combo_extra_script = '';
151 151
 		$combo_css_script   = '';
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	protected function script_html_var( $args ) {
179 179
 
180
-		$script  = ( isset( $args['choice'] ) ) ? "newval=newval['{$args['choice']}'];" : '';
180
+		$script = ( isset( $args['choice'] ) ) ? "newval=newval['{$args['choice']}'];" : '';
181 181
 
182 182
 		// Apply the value_pattern.
183 183
 		if ( isset( $args['value_pattern'] ) && '' !== $args['value_pattern'] ) {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 		$property_script = '';
252 252
 
253 253
 		// Define choice.
254
-		$choice  = ( isset( $args['choice'] ) && '' !== $args['choice'] ) ? $args['choice'] : '';
254
+		$choice = ( isset( $args['choice'] ) && '' !== $args['choice'] ) ? $args['choice'] : '';
255 255
 
256 256
 		$value_key = 'newval' . $args['index_key'];
257 257
 		$property_script .= $value_key . '=newval;';
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 			'font-weight'     => 'fontWeight',
346 346
 			'font-style'      => 'fontStyle',
347 347
 		);
348
-		$choice_condition = ( isset( $args['choice'] ) && '' !== $args['choice'] && isset( $css_build_array[ $args['choice'] ] ) );
348
+		$choice_condition = ( isset( $args['choice'] ) && '' !== $args['choice'] && isset( $css_build_array[$args['choice']] ) );
349 349
 		$script .= ( ! $choice_condition ) ? $webfont_loader : '';
350 350
 		foreach ( $css_build_array as $property => $var ) {
351 351
 			if ( $choice_condition && $property !== $args['choice'] ) {
Please login to merge, or discard this patch.