|
14 | 14 | *
|
15 | 15 | * The Style Engine aims to provide a consistent API for rendering styling for blocks across both client-side and server-side applications.
|
16 | 16 | *
|
| 17 | + * This class is final and should not be extended. |
17 | 18 | * This class is for internal Core usage and is not supposed to be used by extenders (plugins and/or themes).
|
18 | 19 | * This is a low-level API that may need to do breaking changes. Please, use wp_style_engine_get_styles instead.
|
19 | 20 | *
|
20 | 21 | * @access private
|
21 | 22 | * @since 6.1.0
|
22 | 23 | */
|
23 |
| -class WP_Style_Engine { |
| 24 | +final class WP_Style_Engine { |
24 | 25 | /**
|
25 | 26 | * Style definitions that contain the instructions to
|
26 | 27 | * parse/output valid Gutenberg styles from a block's attributes.
|
@@ -107,28 +108,28 @@ class WP_Style_Engine {
|
107 | 108 | 'path' => array( 'border', 'width' ),
|
108 | 109 | ),
|
109 | 110 | 'top' => array(
|
110 |
| - 'value_func' => 'static::get_individual_property_css_declarations', |
| 111 | + 'value_func' => array( self::class, 'get_individual_property_css_declarations' ), |
111 | 112 | 'path' => array( 'border', 'top' ),
|
112 | 113 | 'css_vars' => array(
|
113 | 114 | 'color' => '--wp--preset--color--$slug',
|
114 | 115 | ),
|
115 | 116 | ),
|
116 | 117 | 'right' => array(
|
117 |
| - 'value_func' => 'static::get_individual_property_css_declarations', |
| 118 | + 'value_func' => array( self::class, 'get_individual_property_css_declarations' ), |
118 | 119 | 'path' => array( 'border', 'right' ),
|
119 | 120 | 'css_vars' => array(
|
120 | 121 | 'color' => '--wp--preset--color--$slug',
|
121 | 122 | ),
|
122 | 123 | ),
|
123 | 124 | 'bottom' => array(
|
124 |
| - 'value_func' => 'static::get_individual_property_css_declarations', |
| 125 | + 'value_func' => array( self::class, 'get_individual_property_css_declarations' ), |
125 | 126 | 'path' => array( 'border', 'bottom' ),
|
126 | 127 | 'css_vars' => array(
|
127 | 128 | 'color' => '--wp--preset--color--$slug',
|
128 | 129 | ),
|
129 | 130 | ),
|
130 | 131 | 'left' => array(
|
131 |
| - 'value_func' => 'static::get_individual_property_css_declarations', |
| 132 | + 'value_func' => array( self::class, 'get_individual_property_css_declarations' ), |
132 | 133 | 'path' => array( 'border', 'left' ),
|
133 | 134 | 'css_vars' => array(
|
134 | 135 | 'color' => '--wp--preset--color--$slug',
|
|
0 commit comments