Duotone: Action causes premature caching of theme.json block nodes #49323
Labels
[Feature] Design Tools
Tools that impact the appearance of blocks both to expand the number of tools and improve the experi
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
[Type] Bug
An existing feature does not function as intended
Description
In #49103, SVG filter output was limited to only used filters. Part of this approach involved scraping block names using filters via the
wp_loaded
hook. It appears this is causing the theme.json block node processing to occur before theget_current_screen
global function is available which prevents editor-only selectors from being used in theme.json.Expected Behaviour
Duotone filter processing would occur after we might alter selectors for the editor.
Actual behaviour
Duotone actions cause caching of theme.json block node data prematurely. Duotone filters are also not currently applied to the frontend or post editor, although they do work in the site editor.
Not being able to generate editor-only selectors via theme.json means that #46496 causes a regression with the Image block and the border not being applied to the inline cropping area.
Potential Solutions
wp_enqueue_scripts
fixes the editor-only selectors although I don't know the implications for duotone)Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
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
The text was updated successfully, but these errors were encountered: