wp_style_engine_get_stylesheet_from_context()
Returns compiled CSS from a store, if found.
No Hooks.
Returns
String. A compiled CSS string.
Usage
wp_style_engine_get_stylesheet_from_context( $context, $options );
- $context(string) (required)
- A valid context name, corresponding to an existing store key.
- $options(array)
An array of options.
Default:
empty array-
optimize(true|false)
Whether to optimize the CSS output, e.g. combine rules.
Default: false - prettify(true|false)
Whether to add new lines and indents to output.
Default: whether theSCRIPT_DEBUGconstant is defined
-
Changelog
| Since 6.1.0 | Introduced. |
wp_style_engine_get_stylesheet_from_context() wp style engine get stylesheet from context code WP 6.9.1
function wp_style_engine_get_stylesheet_from_context( $context, $options = array() ) {
return WP_Style_Engine::compile_stylesheet_from_css_rules( WP_Style_Engine::get_store( $context )->get_all_rules(), $options );
}