Skip to content
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

Open
talldan opened this issue Dec 17, 2021 · 5 comments
Open

Add documentation describing how plugins can add templates #37476

talldan opened this issue Dec 17, 2021 · 5 comments
Assignees
Labels
[Feature] Templates API Related to API powering block template functionality in the Site Editor [Type] Developer Documentation Documentation for developers

Comments

@talldan
Copy link
Contributor

talldan commented Dec 17, 2021

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', and theme 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

@talldan talldan added [Type] Developer Documentation Documentation for developers [Feature] Templates API Related to API powering block template functionality in the Site Editor labels Dec 17, 2021
@talldan talldan added this to 📥 To do in WordPress 5.9 Must-Haves via automation Dec 17, 2021
@mkaz mkaz assigned mkaz and unassigned mkaz Dec 18, 2021
@Mamaduka
Copy link
Member

Mamaduka commented Jan 5, 2022

I am removing this issue from the 5.9 board. It's tracked in the documentation project.

@mburridge
Copy link
Contributor

Add some documentation and/or a tutorial for this process

Where do you think this documentation / tutorial should live?

@talldan
Copy link
Contributor Author

talldan commented Apr 20, 2023

Probably in the plugin handbook.

@mburridge
Copy link
Contributor

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?

@annezazu
Copy link
Contributor

@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?

@ndiego ndiego assigned ndiego and unassigned mburridge Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Templates API Related to API powering block template functionality in the Site Editor [Type] Developer Documentation Documentation for developers
Projects
Status: Todo
Development

No branches or pull requests

7 participants