mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Editor: Remove deprecated callable in WP_Style_Engine class.
Resolves a `Use of "static" in callables is deprecated` notice in = PHP 8.2 and mark `WP_Style_Engine` as a `final` class that will not be extended. Follow-up to [54156]. Props ramonopoly, jrf, andrewserong. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54357 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -14,13 +14,14 @@
|
||||
*
|
||||
* The Style Engine aims to provide a consistent API for rendering styling for blocks across both client-side and server-side applications.
|
||||
*
|
||||
* This class is final and should not be extended.
|
||||
* This class is for internal Core usage and is not supposed to be used by extenders (plugins and/or themes).
|
||||
* This is a low-level API that may need to do breaking changes. Please, use wp_style_engine_get_styles instead.
|
||||
*
|
||||
* @access private
|
||||
* @since 6.1.0
|
||||
*/
|
||||
class WP_Style_Engine {
|
||||
final class WP_Style_Engine {
|
||||
/**
|
||||
* Style definitions that contain the instructions to
|
||||
* parse/output valid Gutenberg styles from a block's attributes.
|
||||
@@ -107,28 +108,28 @@ class WP_Style_Engine {
|
||||
'path' => array( 'border', 'width' ),
|
||||
),
|
||||
'top' => array(
|
||||
'value_func' => 'static::get_individual_property_css_declarations',
|
||||
'value_func' => array( self::class, 'get_individual_property_css_declarations' ),
|
||||
'path' => array( 'border', 'top' ),
|
||||
'css_vars' => array(
|
||||
'color' => '--wp--preset--color--$slug',
|
||||
),
|
||||
),
|
||||
'right' => array(
|
||||
'value_func' => 'static::get_individual_property_css_declarations',
|
||||
'value_func' => array( self::class, 'get_individual_property_css_declarations' ),
|
||||
'path' => array( 'border', 'right' ),
|
||||
'css_vars' => array(
|
||||
'color' => '--wp--preset--color--$slug',
|
||||
),
|
||||
),
|
||||
'bottom' => array(
|
||||
'value_func' => 'static::get_individual_property_css_declarations',
|
||||
'value_func' => array( self::class, 'get_individual_property_css_declarations' ),
|
||||
'path' => array( 'border', 'bottom' ),
|
||||
'css_vars' => array(
|
||||
'color' => '--wp--preset--color--$slug',
|
||||
),
|
||||
),
|
||||
'left' => array(
|
||||
'value_func' => 'static::get_individual_property_css_declarations',
|
||||
'value_func' => array( self::class, 'get_individual_property_css_declarations' ),
|
||||
'path' => array( 'border', 'left' ),
|
||||
'css_vars' => array(
|
||||
'color' => '--wp--preset--color--$slug',
|
||||
|
||||
Reference in New Issue
Block a user