0 */ private function combine_rules_selectors() { // Build an array of selectors along with the JSON-ified styles to make comparisons easier. $selectors_json = array(); foreach ( $this->css_rules as $rule ) { $declarations = $rule->get_declarations()->get_declarations(); ksort( $declarations ); $selectors_json[ $rule->get_selector() ] = wp_json_encode( $declarations ); } // Combine selectors that have the same styles. foreach ( $selectors_json as $selector => $json ) { // Get selectors that use the same styles. $duplicates = array_keys( $selectors_json, $json, true ); // Skip if there are no duplicates. if ( 1 >= count( $duplicates ) ) { continue; } $declarations = $this->css_rules[ $selector ]->get_declarations(); foreach ( $duplicates as $key ) { // Unset the duplicates from the $selectors_json array to avoid looping through them as well. unset( $selectors_json[ $key ] ); // Remove the rules from the rules collection. unset( $this->css_rules[ $key ] ); } // Create a new rule with the combined selectors. $duplicate_selectors = implode( ',', $duplicates ); $this->css_rules[ $duplicate_selectors ] = new WP_Style_Engine_CSS_Rule( $duplicate_selectors, $declarations ); } } } juin 2014 - Guineeprgres
Home 2014 juin

Monthly Archives: juin 2014


Fatal error: Uncaught Error: Class "WP_Style_Engine_Processor" not found in /htdocs/wp-includes/style-engine/class-wp-style-engine.php:743 Stack trace: #0 /htdocs/wp-includes/style-engine.php(192): WP_Style_Engine::compile_stylesheet_from_css_rules(Array, '') #1 /htdocs/wp-includes/script-loader.php(3271): wp_style_engine_get_stylesheet_from_context('block-supports', '') #2 /htdocs/wp-includes/class-wp-hook.php(341): wp_enqueue_stored_styles('') #3 /htdocs/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #4 /htdocs/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #5 /htdocs/wp-includes/general-template.php(3213): do_action('wp_footer') #6 /htdocs/wp-content/plugins/td-standard-pack/Newspaper/footer.php(194): wp_footer() #7 /htdocs/wp-content/plugins/td-composer/td-composer.php(247): require_once('/htdocs/wp-cont...') #8 /htdocs/wp-includes/class-wp-hook.php(341): {closure}('') #9 /htdocs/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters('', Array) #10 /htdocs/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #11 /htdocs/wp-content/themes/Guineeprogres/footer.php(2): do_action('tdc_footer') #12 /htdocs/wp-includes/template.php(814): require_once('/htdocs/wp-cont...') #13 /htdocs/wp-includes/template.php(749): load_template('/htdocs/wp-cont...', true, Array) #14 /htdocs/wp-includes/general-template.php(92): locate_template(Array, true, true, Array) #15 /htdocs/wp-content/plugins/td-standard-pack/Newspaper/archive.php(116): get_footer() #16 /htdocs/wp-includes/template-loader.php(125): include('/htdocs/wp-cont...') #17 /htdocs/wp-blog-header.php(19): require_once('/htdocs/wp-incl...') #18 /htdocs/index.php(17): require('/htdocs/wp-blog...') #19 {main} thrown in /htdocs/wp-includes/style-engine/class-wp-style-engine.php on line 743