wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_get_custom_css › WordPress Function
Seit4.7.0
Veraltetn/v
› wp_get_custom_css ( $stylesheet = '' )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Fetches the saved Custom CSS content for rendering.
Ähnliche Funktionen: wp_get_custom_css_post, wp_custom_css_cb, wp_get_post_cats, wp_get_global_styles_custom_css, wp_update_custom_css_post
Quellcode
function wp_get_custom_css( $stylesheet = '' ) {
$css = '';
if ( empty( $stylesheet ) ) {
$stylesheet = get_stylesheet();
}
$post = wp_get_custom_css_post( $stylesheet );
if ( $post ) {
$css = $post->post_content;
}
/**
* Filters the custom CSS output into the head element.
*
* @since 4.7.0
*
* @param string $css CSS pulled in from the Custom CSS post type.
* @param string $stylesheet The theme stylesheet name.
*/
$css = apply_filters( 'wp_get_custom_css', $css, $stylesheet );
return $css;
}