mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Editor: Introduce spacing presets in global style properties.
This changeset is part of the Gutenberg changes merged into WP 6.1. It adds spacing presets support in global style properties. Follow-up to [54211]. Props glendaviesnz, andrewserong, costdev, audrasjb, mukesh27. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54272 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -470,7 +470,7 @@ class WP_Theme_JSON_Resolver {
|
||||
* @since 5.8.0
|
||||
* @since 5.9.0 Added user data, removed the `$settings` parameter,
|
||||
* added the `$origin` parameter.
|
||||
* @since 6.1.0 Added block data.
|
||||
* @since 6.1.0 Added block data and generation of spacingSizes array.
|
||||
*
|
||||
* @param string $origin Optional. To what level should we merge data.
|
||||
* Valid values are 'theme' or 'custom'. Default 'custom'.
|
||||
@@ -490,6 +490,9 @@ class WP_Theme_JSON_Resolver {
|
||||
$result->merge( static::get_user_data() );
|
||||
}
|
||||
|
||||
// Generate the default spacingSizes array based on the merged spacingScale settings.
|
||||
$result->set_spacing_sizes();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user