Make WordPress Core


Ignore:
Timestamp:
01/09/2024 06:10:09 AM (3 years ago)
Author:
isabel_brison
Message:

Editor: add size and repeat to background image support.

Adds background size and background repeat style processing to the background image block support and WP_Style_Engine definitions.

Props andrewserong, mukesh27.
Fixes #60175.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/style-engine/class-wp-style-engine.php

    r57253 r57254  
    2424 * @since 6.3.0 Added support for text-columns.
    2525 * @since 6.4.0 Added support for background.backgroundImage.
     26 * @since 6.5.0 Added support for background.backgroundPosition and background.backgroundRepeat.
    2627 */
    2728#[AllowDynamicProperties]
     
    4950        const BLOCK_STYLE_DEFINITIONS_METADATA = array(
    5051                'background' => array(
    51                         'backgroundImage' => array(
     52                        'backgroundImage'    => array(
    5253                                'property_keys' => array(
    5354                                        'default' => 'background-image',
     
    5657                                'path'          => array( 'background', 'backgroundImage' ),
    5758                        ),
    58                         'backgroundSize'  => array(
     59                        'backgroundPosition' => array(
     60                                'property_keys' => array(
     61                                        'default' => 'background-position',
     62                                ),
     63                                'path'          => array( 'background', 'backgroundPosition' ),
     64                        ),
     65                        'backgroundRepeat'   => array(
     66                                'property_keys' => array(
     67                                        'default' => 'background-repeat',
     68                                ),
     69                                'path'          => array( 'background', 'backgroundRepeat' ),
     70                        ),
     71                        'backgroundSize'     => array(
    5972                                'property_keys' => array(
    6073                                        'default' => 'background-size',
Note: See TracChangeset for help on using the changeset viewer.