Make WordPress Core


Ignore:
Timestamp:
05/28/2024 06:04:37 AM (23 months ago)
Author:
noisysocks
Message:

Block Themes: Allow setting site-wide background images in theme.json

Syncs the necessary changes from Gutenberg to allow setting site-wide
background images using the top-level styles.background key in theme.json.

Props ramonopoly.
Fixes #61123.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/block-supports/wpRenderBackgroundSupport.php

    r58181 r58222  
    6969     * @ticket 59357
    7070     * @ticket 60175
     71     * @ticket 61123
    7172     *
    7273     * @covers ::wp_render_background_support
     
    133134                'background_style'    => array(
    134135                    'backgroundImage' => array(
    135                         'url'    => 'https://example.com/image.jpg',
    136                         'source' => 'file',
     136                        'url' => 'https://example.com/image.jpg',
    137137                    ),
    138138                ),
     
    148148                'background_style'    => array(
    149149                    'backgroundImage'  => array(
    150                         'url'    => 'https://example.com/image.jpg',
    151                         'source' => 'file',
     150                        'url' => 'https://example.com/image.jpg',
    152151                    ),
    153152                    'backgroundRepeat' => 'no-repeat',
     
    165164                'background_style'    => array(
    166165                    'backgroundImage' => array(
    167                         'url'    => 'https://example.com/image.jpg',
    168                         'source' => 'file',
     166                        'url' => 'https://example.com/image.jpg',
    169167                    ),
    170168                ),
     
    180178                'background_style'    => array(
    181179                    'backgroundImage' => array(
    182                         'url'    => 'https://example.com/image.jpg',
    183                         'source' => 'file',
     180                        'url' => 'https://example.com/image.jpg',
    184181                    ),
    185182                ),
     
    195192                'background_style'    => array(
    196193                    'backgroundImage' => array(
    197                         'url'    => 'https://example.com/image.jpg',
    198                         'source' => 'file',
     194                        'url' => 'https://example.com/image.jpg',
    199195                    ),
    200196                ),
Note: See TracChangeset for help on using the changeset viewer.