Restore the order of actions usually fired in edit-form-advanced.php #10660
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As described in #4929, the actions usually in edit-form-advanced.php are delayed by Gutenberg. This PR aims to restore the same order as in WordPress 4.9. Thus:
dbx_post_advanced
add_meta_boxes
add_meta_boxes_{$post_type}
do_meta_boxes
edit_form_advanced
are fired before
admin_enqueue_scripts
instead of afteradmin_head
.How has this been tested?
I aimed to test the changes with a few plugins adding metaboxes:
Note: ACF seems to be broken in the current development version of Gutenberg (Updating the post does not save the ACF values). This PR does change the result. ACF was working correctly with Gutenberg 3.9. So I assume that the current version of Gutenberg breaks ACF in a way which not related to this issue.
All metaboxes of other plugins seem to work correctly before and after applying this PR . I can correctly change values and changes are applied when saving the post.
A broken functionality of Polylang is restored by this PR (importing taxonomies and metas from an original post when creating a new translations). This functionnality is not related to the visible aspect of metaboxes but uses the
add_meta_boxes
action to work.Fixes #4929
Checklist: