-
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
Fix Meta boxes saving when they’re not present #67254
base: trunk
Are you sure you want to change the base?
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. |
Size Change: +36 B (0%) Total Size: 1.82 MB
ℹ️ View Unchanged
|
Thanks for the PR! I can't review this PR now because I haven't yet been able to reproduce the issue, but the approach looks reasonable. This PR ensures that |
What?
Ensures meta boxes are saved even if none of their areas are present in the Post editor’s UI.
Fixes #67207. Alternative to #67228 (or possibly a follow up to it).
Why?
Besides fixing a bug, this makes the meta box initialization more explicit/visible. It’s also a small optimization by invoking an effect in fewer places and executing less code when meta boxes aren’t present.
It seems more sensible this way because the initialization of all meta boxes is not really a responsibility of a component that represents only a single area of meta boxes.
How?
MetaBoxes
componentLayout
componentTesting Instructions
open the Yoast SEO sidebar and change a setting, e.g. the focus keyphrase