[wp-trac] [WordPress Trac] #61804: Create a plugin template registration API
WordPress Trac
noreply at wordpress.org
Fri Sep 20 02:06:05 UTC 2024
#61804: Create a plugin template registration API
--------------------------------------+---------------------------------
Reporter: aljullu | Owner: noisysocks
Type: feature request | Status: closed
Priority: normal | Milestone: 6.7
Component: Editor | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses: template, rest-api
--------------------------------------+---------------------------------
Changes (by noisysocks):
* owner: (none) => noisysocks
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"59073" 59073]:
{{{
#!CommitTicketReference repository="" revision="59073"
Editor: Add plugin template registration API and improve theme overrides
for plugin-registered templates
This commit introduces a new API to allow plugins to easily register block
templates with `wp_register_block_template()` and the
`WP_Block_Templates_Registry` class, addressing the complexity of hooking
into
multiple filters. It also ensures plugin-registered templates overridden
by
themes fall back to the plugin-provided title and description when the
theme
doesn't define them.
See https://github.com/WordPress/gutenberg/pull/61577.
See https://github.com/WordPress/gutenberg/pull/64610.
Fixes #61804.
Props aljullu, peterwilsoncc, antonvlasenko, azaozz, youknowriad,
noisysocks.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61804#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list