← All changes
|
build/scripts/style-engine/class-wp-style-engine-processor-gutenberg.php
+2
-16
23.6.2
→
22.7.0
View file →
| @@ -141,25 +141,11 @@ | ||
| 141 | 141 | private function combine_rules_selectors() { |
| 142 | 142 | // Build an array of selectors along with the JSON-ified styles to make comparisons easier. |
| 143 | 143 | $selectors_json = array(); |
| 144 | 144 | foreach ( $this->css_rules as $rule ) { |
| 145 | - $declarations = $rule->get_declarations()->get_declarations(); | |
| 146 | - $declaration_options = $rule->get_declarations()->get_declaration_options(); | |
| 145 | + $declarations = $rule->get_declarations()->get_declarations(); | |
| 147 | 146 | ksort( $declarations ); |
| 148 | - // Declaration options are keyed by property and are part of the rule identity. | |
| 149 | - ksort( $declaration_options ); | |
| 150 | - foreach ( $declaration_options as $property => $options ) { | |
| 151 | - if ( is_array( $options ) ) { | |
| 152 | - ksort( $options ); | |
| 153 | - $declaration_options[ $property ] = $options; | |
| 154 | - } | |
| 155 | - } | |
| 156 | - $selectors_json[ $rule->get_selector() ] = wp_json_encode( | |
| 157 | - array( | |
| 158 | - 'declarations' => $declarations, | |
| 159 | - 'declaration_options' => $declaration_options, | |
| 160 | - ) | |
| 161 | - ); | |
| 147 | + $selectors_json[ $rule->get_selector() ] = wp_json_encode( $declarations ); | |
| 162 | 148 | } |
| 163 | 149 | |
| 164 | 150 | // Combine selectors that have the same styles. |
| 165 | 151 | foreach ( $selectors_json as $selector => $json ) { |