[wp-trac] [WordPress Trac] #61422: registerBlockVariation not holding the blockName param
WordPress Trac
noreply at wordpress.org
Thu Aug 1 12:08:52 UTC 2024
#61422: registerBlockVariation not holding the blockName param
-----------------------------+------------------------------
Reporter: heymehedi | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: | Focuses: javascript
-----------------------------+------------------------------
Comment (by gziolo):
I see now what the issue is, when using the `name` param in the filter,
you should check against the block name for which you register the
variation: `core/button`. Then you need to detect the variation with some
custom code. @ockham started looking into offering a helper function
`get_active_block_variation` in https://github.com/WordPress/wordpress-
develop/pull/6602, but I'm not entirely sure if that will work in all
cases.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61422#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list