WP_Style_Engine::compile_stylesheet_from_css_rules() – Returns a compiled stylesheet from stored CSS rules.
You appear to be a bot. Output may be restricted
Description
Returns a compiled stylesheet from stored CSS rules.
Usage
$string = WP_Style_Engine::compile_stylesheet_from_css_rules( $css_rules, $options );
Parameters
- $css_rules
- ( WP_Style_Engine_CSS_Rule[] ) required – An array of WP_Style_Engine_CSS_Rule objects from a store or otherwise.
- $options
- ( array ) optional – { Optional. An array of options. Default empty array.
- $optimize
- ( bool ) optional – Whether to optimize the CSS output, e.g., combine rules. Default is `false`.
- $prettify
- ( bool ) optional – Whether to add new lines and indents to output. Default is the test of whether the global constant
SCRIPT_DEBUG
is defined. }
Returns
string A compiled stylesheet from stored CSS rules.
Source
File name: wordpress/wp-includes/style-engine/class-wp-style-engine.php
Lines:
1 to 5 of 5
public static function compile_stylesheet_from_css_rules( $css_rules, $options = array() ) { $processor = new WP_Style_Engine_Processor(); $processor->add_rules( $css_rules ); return $processor->get_css( $options ); }