wp_style_engine_get_stylesheet_from_context( string $context, array $options = array() ): string

Returns compiled CSS from a store, if found.


$context string Required
A valid context name, corresponding to an existing store key.
$options array Optional
An array of options.
  • optimize bool
    Whether to optimize the CSS output, e.g., combine rules. Default is false.
  • prettify bool
    Whether to add new lines and indents to output. Default is the test of whether the global constant SCRIPT_DEBUG is defined.

Default: array()

Top ↑


string A compiled CSS string.

Top ↑


File: wp-includes/style-engine.php. View all references

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 );

Top ↑


Version Description
6.1.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.