-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation describing how plugins can add templates #37476
Comments
I am removing this issue from the 5.9 board. It's tracked in the documentation project. |
Where do you think this documentation / tutorial should live? |
Probably in the plugin handbook. |
Thanks @talldan. In that case, if it's not something for the Block Editor Handbook, do you think we should close this and open a new issue over in Documentation-Issue-Tracker? |
@ndiego noting for you as you work on the block editor handbook overhaul. Can you follow up on this/ensure it's in the right place? |
Closing this in favour of #61577, which should add a much easier API and docs. |
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: