Add documentation describing how plugins can add templates #37476
Labels
[Feature] Templates API
Related to API powering block template functionality in the Site Editor
[Type] Developer Documentation
Documentation for developers
Related #37401, #36597
What problem does this address?
It was mentioned in #36597 (comment) that plugins can add templates via a filter. Setting some template fields (setting the
source
to 'plugin', andtheme
to the plugin slug) helps to indicate where the template came from.Support for this has since been added to the template list interface.
As mentioned on #37401 the process for plugins adding templates isn't necessarily all that clear as the
theme
field doesn't seem obvious, but that's hard to change now due to backwards compatibility.There's a risk if this isn't documented well that plugins will end up using inconsistent techniques for providing templates.
cc @Aljullu @tjcafferkey
What is your proposed solution?
Add some documentation and/or a tutorial for this process
The text was updated successfully, but these errors were encountered: