wp_get_custom_css
Filters the custom CSS output into the head element.
Использование
add_filter( 'wp_get_custom_css', 'wp_kama_get_custom_css_filter', 10, 2 ); /** * Function for `wp_get_custom_css` filter-hook. * * @param string $css CSS pulled in from the Custom CSS post type. * @param string $stylesheet The theme stylesheet name. * * @return string */ function wp_kama_get_custom_css_filter( $css, $stylesheet ){ // filter... return $css; }
- $css(строка)
- CSS pulled in from the Custom CSS post type.
- $stylesheet(строка)
- The theme stylesheet name.
Список изменений
С версии 4.7.0 | Введена. |
Где вызывается хук
wp_get_custom_css
wp-includes/theme.php 1974
$css = apply_filters( 'wp_get_custom_css', $css, $stylesheet );
Где используется хук в WordPress
wp-includes/customize/class-wp-customize-custom-css-setting.php 88
add_filter( 'wp_get_custom_css', array( $this, 'filter_previewed_wp_get_custom_css' ), 9, 2 );
wp-includes/default-filters.php 235
add_filter( 'wp_get_custom_css', 'wp_replace_insecure_home_url' );