-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Template activation: add meta to all newly created templates #72156
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
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in a24a6bf. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18337991305
|
a24a6bf to
83cee2f
Compare
|
Merging because this is blocking GB stable. Let me know if there's concerns and I'll follow up. |
|
I just cherry-picked this PR to the release/21.8 branch to get it included in the next release: e051b13 |
What?
Adds meta to any templates created from this point forward, so we can easily distinguish between templates created the old way and new way.
Why?
active_templatesoption is ever removed, any new templates created will not suddenly become activated due to this migration, only the old templates will.How?
Adds the meta any time a template is created from now on. In the migration function, check that the templates do not have this meta.
To do: when you de-activate one of the old templates, ideally we should add the meta to them.
Idea: perhaps there is a way we can avoid the migration entirely: if a template doesn't have the
inactive_by_defaultmeta, then it should just be considered active regardless of the option. It makes the checks for activation a bit more complex though.Testing Instructions
Create a new template. Delete the
active_templatesoption. This new templates should not be activated due to the migration function.Testing Instructions for Keyboard
Screenshots or screencast