@@ -79,10 +79,10 @@ discard block |
||
| 79 | 79 | $func_name = 'script_var_' . str_replace( array( 'kirki-', '-' ), array( '', '_' ), $args['type'] ); |
| 80 | 80 | $callback = $this->get_callback( $args ); |
| 81 | 81 | if ( is_callable( $callback ) ) { |
| 82 | - $field['scripts'][ $key ] = call_user_func_array( $callback, array( $js_var, $args ) ); |
|
| 82 | + $field['scripts'][$key] = call_user_func_array( $callback, array( $js_var, $args ) ); |
|
| 83 | 83 | continue; |
| 84 | 84 | } |
| 85 | - $field['scripts'][ $key ] = $this->script_var( $js_var, $args ); |
|
| 85 | + $field['scripts'][$key] = $this->script_var( $js_var, $args ); |
|
| 86 | 86 | } |
| 87 | 87 | $combo_extra_script = ''; |
| 88 | 88 | $combo_css_script = ''; |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | 'font-weight' => 'fontWeight', |
| 246 | 246 | 'font-style' => 'fontStyle', |
| 247 | 247 | ); |
| 248 | - $choice_condition = ( isset( $args['choice'] ) && '' !== $args['choice'] && isset( $css_build_array[ $args['choice'] ] ) ); |
|
| 248 | + $choice_condition = ( isset( $args['choice'] ) && '' !== $args['choice'] && isset( $css_build_array[$args['choice']] ) ); |
|
| 249 | 249 | foreach ( $css_build_array as $property => $var ) { |
| 250 | 250 | $css .= ( $choice_condition ) ? 'if(\'\'!==choice&&\'' . $property . '\'===choice){' : ''; |
| 251 | 251 | $css .= 'css+=(\'\'!==' . $var . ')?element+\'{' . $property . ':\'+' . $var . '+\'}\':\'\';'; |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | 'units' => '', |
| 279 | 279 | 'js_callback' => array( '', '' ), |
| 280 | 280 | 'value_pattern' => '', |
| 281 | - )); |
|
| 281 | + ) ); |
|
| 282 | 282 | |
| 283 | 283 | // Element should be a string. |
| 284 | 284 | if ( is_array( $args['element'] ) ) { |