type ); $unit = isset( $this->field['choices'] ) && isset( $this->field['choices']['unit'] ) ? $this->field['choices']['unit'] : 'px'; $output = wp_parse_args( $output, array( 'media_query' => 'global', 'element' => '', ) ); // Stop if the value is not an array. if ( ! is_array( $value ) ) { return; } foreach ( $value as $position => $value ) { if ( '' !== $value ) { $value = is_numeric( $value ) ? $value . $unit : $value; $css_property = $property . '-' . $position; $this->styles[ $output['media_query'] ][ $output['element'] ][ $css_property ] = $value; } } if ( 'kirki_pro_demo_responsive_margin[desktop]' === $this->field['settings'] ) { // error_log( print_r( get_theme_mod( 'kirki_pro_demo_responsive_margin[desktop]' ), true ) ); // error_log( print_r( $this->styles, true ) ); // error_log( print_r( $value, true ) ); } } }