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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57254 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Isabel Brison
2024-01-09 06:10:09 +00:00
parent 2d764b4101
commit 15b5be2acd
6 changed files with 77 additions and 15 deletions

View File

@@ -344,7 +344,8 @@ class WP_Theme_JSON {
* @since 6.3.0 Added support for `typography.textColumns`, removed `layout.definitions`.
* @since 6.4.0 Added support for `layout.allowEditing`, `background.backgroundImage`,
* `typography.writingMode`, `lightbox.enabled` and `lightbox.allowEditing`.
* @since 6.5.0 Added support for `layout.allowCustomContentAndWideSize`.
* @since 6.5.0 Added support for `layout.allowCustomContentAndWideSize` and
* `background.backgroundSize`.
* @var array
*/
const VALID_SETTINGS = array(
@@ -352,6 +353,7 @@ class WP_Theme_JSON {
'useRootPaddingAwareAlignments' => null,
'background' => array(
'backgroundImage' => null,
'backgroundSize' => null,
),
'border' => array(
'color' => null,
@@ -573,10 +575,12 @@ class WP_Theme_JSON {
* @since 6.0.0
* @since 6.2.0 Added `dimensions.minHeight` and `position.sticky`.
* @since 6.4.0 Added `background.backgroundImage`.
* @since 6.5.0 Added `background.backgroundSize`.
* @var array
*/
const APPEARANCE_TOOLS_OPT_INS = array(
array( 'background', 'backgroundImage' ),
array( 'background', 'backgroundSize' ),
array( 'border', 'color' ),
array( 'border', 'radius' ),
array( 'border', 'style' ),