[wp-trac] [WordPress Trac] #62140: Consider allowing themes to register block metadata collections

WordPress Trac noreply at wordpress.org
Mon Sep 30 17:01:22 UTC 2024


#62140: Consider allowing themes to register block metadata collections
-------------------------+-----------------------------
 Reporter:  flixos90     |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Editor       |    Version:
 Severity:  normal       |   Keywords:  2nd-opinion
  Focuses:               |
-------------------------+-----------------------------
 The new `wp_register_block_metadata_collection()` function introduced in
 #62002 currently only allows registering block metadata folders within
 plugins or the `wp-includes` directory (the latter for Core's own usage).

 This ticket is about discussing further whether themes should also be able
 to use the function. This was originally raised by @spacedmonkey in
 https://github.com/WordPress/wordpress-
 develop/pull/7303#discussion_r1780156397.

 At a first glance, here's two conflicting arguments that may have us lean
 towards yes or no:
 * Yes: The other functions related to register block types are not
 restricted to plugins, so there's no good reason that this new function
 only allows plugin usage.
 * No: Themes should not register block types, so while it's possible to
 use the functions, this should not happen, so arguably the function should
 not add theme support.

 Curious to get other people's thoughts on this.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62140>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list