Completed
Push — develop ( 2502ea...31483a )
by Aristeides
02:39
created
modules/postmessage/class-kirki-modules-postmessage.php 1 patch
Spacing   +7 added lines, -7 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   = '';
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 		if ( isset( $js_var['exclude'] ) ) {
161 161
 			$script .= 'if(true===exclude){cssContent="";}';
162 162
 		}
163
-		if ( $add_css) {
163
+		if ( $add_css ) {
164 164
 			$script .= "jQuery('#{$style_id}').text(cssContent);";
165 165
 			$script .= "jQuery('#{$style_id}').appendTo('head');";
166 166
 		}
@@ -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 ( '' !== $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;';
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 			'font-weight'    => 'fontWeight',
343 343
 			'font-style'     => 'fontStyle',
344 344
 		);
345
-		$choice_condition = ( isset( $args['choice'] ) && '' !== $args['choice'] && isset( $css_build_array[ $args['choice'] ] ) );
345
+		$choice_condition = ( isset( $args['choice'] ) && '' !== $args['choice'] && isset( $css_build_array[$args['choice']] ) );
346 346
 		$script .= ( ! $choice_condition ) ? $webfont_loader : '';
347 347
 		foreach ( $css_build_array as $property => $var ) {
348 348
 			if ( $choice_condition && $property !== $args['choice'] ) {
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 			'units'         => '',
454 454
 			'js_callback'   => array( '', '' ),
455 455
 			'value_pattern' => '',
456
-		));
456
+		) );
457 457
 
458 458
 		// Element should be a string.
459 459
 		if ( is_array( $args['element'] ) ) {
Please login to merge, or discard this patch.