-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
[Feature] ColorsColor managementColor management[Type] Developer DocumentationDocumentation for developersDocumentation for developers[Type] QuestionQuestions about the design or development of the editor.Questions about the design or development of the editor.
Description
Description
After reviewing a number of issues including #31764, #33295, #35931, and #38299, I believe that the following two theme.json values are required to fully disable the custom duotone feature:
settings.color.duotone:nullremoves the SVG filters output in the body field. Setting this property to an empty array ([]) does not work.settings.color.customDuotone: removes the UI toolbar control in combination with the first change
However, when I try to validate my theme.json, there is an error for settings.color.duotone: null:
None is not a type of 'array'
Prior to WordPress 5.9.3, the null value also seemed to cause a PHP error, but I believe that has been resolved.
So first: Is this the correct way to fully disable duotone support with theme.json.
If so:
- The schema needs to be updated to allow
nullforsettings.color.duotone-OR- using[]as the value for that setting should prevent the SVG filters from being output - The official way to remove duotone should be documented
Step-by-step reproduction instructions
Validate the following theme.json file:
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"settings": {
"color": {
"duotone": null,
"customDuotone": false
}
}
}Screenshots, screen recording, code snippet
No response
Environment info
WordPress 5.9.3
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
Metadata
Metadata
Assignees
Labels
[Feature] ColorsColor managementColor management[Type] Developer DocumentationDocumentation for developersDocumentation for developers[Type] QuestionQuestions about the design or development of the editor.Questions about the design or development of the editor.