WordPress at a glance
function is not described

WP_Customize_Custom_CSS_Setting::filter_previewed_wp_get_custom_css() public WP 4.7.0

Filters wp_get_custom_css applying the customized value.

This is used in the preview when wp_get_custom_css() is called for rendering the styles.

{} It's a method of the class: WP_Customize_Custom_CSS_Setting{}

No Hooks.

Return

String. CSS.

Usage

$WP_Customize_Custom_CSS_Setting = new WP_Customize_Custom_CSS_Setting();
$WP_Customize_Custom_CSS_Setting->filter_previewed_wp_get_custom_css( $css, $stylesheet );
$css(string) (required)
Original CSS.
$stylesheet(string) (required)
Current stylesheet.

Notes

  • See: wp_get_custom_css()

Changelog

Since 4.7.0 Introduced.

Code of WP_Customize_Custom_CSS_Setting::filter_previewed_wp_get_custom_css() WP 5.7.2

<?php
public function filter_previewed_wp_get_custom_css( $css, $stylesheet ) {
	if ( $stylesheet === $this->stylesheet ) {
		$customized_value = $this->post_value( null );
		if ( ! is_null( $customized_value ) ) {
			$css = $customized_value;
		}
	}
	return $css;
}