PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/style-engine/class-wp-style-engine-css-rule-gutenberg.php +10 -2 23.5.1 → 24.1.0 View file →
@@ -76,8 +76,9 @@
76 76 */
77 77 public function add_declarations( $declarations ) {
78 78 $is_declarations_object = ! is_array( $declarations );
79 79 $declarations_array = $is_declarations_object ? $declarations->get_declarations() : $declarations;
80 + $declaration_options = $is_declarations_object ? $declarations->get_declaration_options() : array();
80 81
81 82 if ( null === $this->declarations ) {
82 83 if ( $is_declarations_object ) {
83 84 $this->declarations = $declarations;
@@ -82,11 +83,18 @@
82 83 if ( $is_declarations_object ) {
83 84 $this->declarations = $declarations;
84 85 return $this;
85 86 }
86 - $this->declarations = new WP_Style_Engine_CSS_Declarations_Gutenberg( $declarations_array );
87 + $this->declarations = new WP_Style_Engine_CSS_Declarations_Gutenberg();
87 88 }
88 - $this->declarations->add_declarations( $declarations_array );
89 +
90 + foreach ( $declarations_array as $property => $value ) {
91 + $this->declarations->add_declaration(
92 + $property,
93 + $value,
94 + $declaration_options[ $property ] ?? array()
95 + );
96 + }
89 97
90 98 return $this;
91 99 }
92 100