rebase on oct-10-2023
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* WP_Style_Engine_Processor
|
||||
*
|
||||
* Compiles styles from stores or collection of CSS rules.
|
||||
* Style Engine: WP_Style_Engine_Processor class
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage StyleEngine
|
||||
@@ -10,9 +8,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WP_Style_Engine_Processor.
|
||||
*
|
||||
* Compiles styles from stores or collection of CSS rules.
|
||||
* Core class used to compile styles from stores or collection of CSS rules.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*/
|
||||
@@ -41,7 +37,6 @@ class WP_Style_Engine_Processor {
|
||||
* @since 6.1.0
|
||||
*
|
||||
* @param WP_Style_Engine_CSS_Rules_Store $store The store to add.
|
||||
*
|
||||
* @return WP_Style_Engine_Processor Returns the object to allow chaining methods.
|
||||
*/
|
||||
public function add_store( $store ) {
|
||||
@@ -64,8 +59,9 @@ class WP_Style_Engine_Processor {
|
||||
*
|
||||
* @since 6.1.0
|
||||
*
|
||||
* @param WP_Style_Engine_CSS_Rule|WP_Style_Engine_CSS_Rule[] $css_rules A single, or an array of, WP_Style_Engine_CSS_Rule objects from a store or otherwise.
|
||||
*
|
||||
* @param WP_Style_Engine_CSS_Rule|WP_Style_Engine_CSS_Rule[] $css_rules A single, or an array of,
|
||||
* WP_Style_Engine_CSS_Rule objects
|
||||
* from a store or otherwise.
|
||||
* @return WP_Style_Engine_Processor Returns the object to allow chaining methods.
|
||||
*/
|
||||
public function add_rules( $css_rules ) {
|
||||
@@ -93,10 +89,11 @@ class WP_Style_Engine_Processor {
|
||||
* @param array $options {
|
||||
* Optional. An array of options. Default empty array.
|
||||
*
|
||||
* @type bool $optimize Whether to optimize the CSS output, e.g., combine rules. Default is `false`.
|
||||
* @type bool $prettify Whether to add new lines and indents to output. Default is the test of whether the global constant `SCRIPT_DEBUG` is defined.
|
||||
* @type bool $optimize Whether to optimize the CSS output, e.g. combine rules.
|
||||
* Default true.
|
||||
* @type bool $prettify Whether to add new lines and indents to output.
|
||||
* Defaults to whether the `SCRIPT_DEBUG` constant is defined.
|
||||
* }
|
||||
*
|
||||
* @return string The computed CSS.
|
||||
*/
|
||||
public function get_css( $options = array() ) {
|
||||
@@ -129,8 +126,6 @@ class WP_Style_Engine_Processor {
|
||||
* Combines selectors from the rules store when they have the same styles.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function combine_rules_selectors() {
|
||||
// Build an array of selectors along with the JSON-ified styles to make comparisons easier.
|
||||
|
||||
Reference in New Issue
Block a user