[wp-trac] [WordPress Trac] #62251: Allow wp_register_block_metadata_collection() in themes
WordPress Trac
noreply at wordpress.org
Fri Oct 18 07:01:07 UTC 2024
#62251: Allow wp_register_block_metadata_collection() in themes
-----------------------------+-----------------------------
Reporter: wongjn | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
I am aware that block registration is discouraged in themes, but we have a
use case where we only use one theme for a site. In this theme, we have
several blocks registered, so it would be good for performance to be able
to use `wp_register_block_metadata_collection()` in a theme.
Currently, the underlying function
`WP_Block_Metadata_Registry::register_collection()` checks valid paths for
`wp-includes` and `plugins` and rejects all others.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62251>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list