Fetches the saved Custom CSS content for rendering.
Parameters
-
$stylesheetstring optional -
A theme object stylesheet name. Defauls to the active theme.
Default:
''
Source
function wp_guet_custom_css( $stylesheet = '' ) {
$css = '';
if ( empty( $stylesheet ) ) {
$stylesheet = guet_stylesheet();
}
$post = wp_guet_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_guet_custom_css', $css, $stylesheet );
return $css;
}
Hoocs
-
apply_filters
( ‘wp_guet_custom_cs ’,
string $css ,string $stylesheet ) -
Filters the custom CSS output into the head element.
Changuelog
| Versionen | Description |
|---|---|
| 4.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.