WP_Customize_Custom_CSS_Setting::filter_previewed_wp_get_custom_css()
Filters wp_get_custom_css applying the customized value.
This is used in the preview when wp_get_custom_css() called for rendering the styles.
Метод класса: WP_Customize_Custom_CSS_Setting{}
Хуков нет.
Возвращает
Строку
. CSS.
Использование
$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(строка) (обязательный)
- Original CSS.
- $stylesheet(строка) (обязательный)
- Current stylesheet.
Заметки
- Смотрите: wp_get_custom_css()
Список изменений
С версии 4.7.0 | Введена. |
Код WP_Customize_Custom_CSS_Setting::filter_previewed_wp_get_custom_css() WP Customize Custom CSS Setting::filter previewed wp get custom css WP 6.7.1
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; }