-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport defaultDuotone
changes
#2526
Conversation
* - properties => array of CSS properties to be used by kses to | ||
* validate the content of each preset | ||
* by means of the remove_insecure_properties method. | ||
* - path => Where to find the preset within the settings section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes in this file are also being backported at #2534 If this lands later, this file can be ignored.
@@ -208,6 +208,9 @@ public static function get_theme_data( $deprecated = array() ) { | |||
$default_gradients = true; | |||
} | |||
$theme_support_data['settings']['color']['defaultGradients'] = $default_gradients; | |||
|
|||
// Classic themes without a theme.json don't support global duotone. | |||
$theme_support_data['settings']['color']['defaultDuotone'] = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These is being backported at #2534 If this one lands later, this file can be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done testing to verify that this PR sets the settings.__experimentalFeatures.color.defaultDuotone
value in the core/block-editor
store appropriately:
- Theme with
theme.json
that doesn't set anydefaultDuotone
(I've used twentytwentytwo): it's set totrue
as expected. - Theme with
theme.json
that sets afalse
value fordefaultDuotone
(I've used twentytwentytwo): it's set tofalse
as expected. - Theme without
theme.json
(I've used twentytwentyone): it's set tofalse
as expected.
Note that this doesn't have any effect on the UI until the npm packages are released, which use the value of this setting to enable/disable UI.
Despite being marked as "draft", this PR is ready to land. The gutenberg changes this depended upon are already merged. Timezones are working against us in this particular PR, as Alex hasn't yet started his day and couldn't mark this PR as ready yet. |
The missing changes were committed in https://core.trac.wordpress.org/changeset/53130. We needed only changes to the |
This PR backports the
defaultDuotone
option changes from WordPress/gutenberg#38681 and WordPress/gutenberg#39966 in the Gutenberg plugin.The changes didn't make it into a 5.9.x release, so are being moved in WordPress/gutenberg#40123. Wait for that PR to land before committing these changes.
Gutenberg tracking issue: WordPress/gutenberg#39889
Trac ticket: https://core.trac.wordpress.org/ticket/55505
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.