[wp-trac] [WordPress Trac] #61605: Add Support for dynamically changing WordPress styles variations using filter
WordPress Trac
noreply at wordpress.org
Tue Jul 9 14:54:24 UTC 2024
#61605: Add Support for dynamically changing WordPress styles variations using
filter
---------------------------+------------------------------
Reporter: noamanahmed | Owner: (none)
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
---------------------------+------------------------------
Comment (by noamanahmed):
@youknowriad
The approach you suggested works only if you want to register block style.
I am basically trying to change the style variations which come. The
function you linked doesn't help in achieving that.
If you take a look at the picture I attached you would understand.
Basically the get_theme_item() calls the
WP_Theme_JSON_Resolver::get_style_variations() and get_style_variations
was missing a WP filter. I think my approach is a single line of code
allowing alot of new ways where this can be tweaked.
Also I am not an expert in Gutenberg. Is it possible if some one can take
over as it's just a single line of change?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61605#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list