-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The KSES filters prevent changing block variation styles via the Global Styles sidebar in the site editor.
These filters are only registered when a user doesn't have the unfiltered_html capability (which is the case for multisite regular admins).
When these filters are active, any change to the block variation property is reverted back to its previous value.
Looking at the HTTP request to the global-styles endpoint, the PUT request includes the block variation changes but the response doesn't.
Step-by-step reproduction instructions
- Activate latest Gutenberg on a multisite install, or test with a user not having the unfiltered_html capability, or enable the KSES filters with
add_action( 'init', 'kses_init_filters' );
- Go to Appearance > Editor
- Open the Styles sidebar
- Select "Blocks"
- Select "Button"
- Select the Outline style variation
- Change a property away from the initial setting, e.g. set the background
- Save the changes
⚠️ Note how the changes are reverted
Screenshots, screen recording, code snippet
Screen.Recording.2023-08-08.at.15.26.58.mov
Environment info
GB plugin trunk
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Metadata
Metadata
Assignees
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended