[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:42:25 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:
---------------------------+------------------------------
Changes (by youknowriad):

 * component:  Themes => Bundled Theme


Comment:

 Thanks for the ticket. I think that's a great idea but I'd consider
 another approach instead. We already have a register_block_style function
 in PHP that allows to register the block specific style variations.
 https://developer.wordpress.org/reference/functions/register_block_style/

 In WordPress 6.6, this function has been updated to allow register block
 style variations using a theme.json like structure. So I think we should
 work on expanding this function instead (or generalizing into a style
 registry that is not specific to blocks).

 cc @aaronrobertshaw as he worked on this and might have better insights.

 Also depending on where the change need to be made, it may be better to
 start this work in the Gutenberg repo.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61605#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list