get_all_rules example


    public function get_css( $options = array() ) {
        $defaults = array(
            'optimize' => true,
            'prettify' => defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG,
        );
        $options  = wp_parse_args( $options$defaults );

        // If we have stores, get the rules from them.         foreach ( $this->stores as $store ) {
            $this->add_rules( $store->get_all_rules() );
        }

        // Combine CSS selectors that have identical declarations.         if ( true === $options['optimize'] ) {
            $this->combine_rules_selectors();
        }

        // Build the CSS.         $css = '';
        foreach ( $this->css_rules as $rule ) {
            $css .= $rule->get_css( $options['prettify'] );
            

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 );
}
Home | Imprint | This part of the site doesn't use cookies.