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

Restore the order of actions usually fired in edit-form-advanced.php #10660

Merged
merged 1 commit into from
Oct 17, 2018
Merged

Restore the order of actions usually fired in edit-form-advanced.php #10660

merged 1 commit into from
Oct 17, 2018

Conversation

Chouby
Copy link
Contributor

@Chouby Chouby commented Oct 16, 2018

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 after admin_head.

How has this been tested?

I aimed to test the changes with a few plugins adding metaboxes:

  • ACF 5.7.7
  • CMB2 2.4.2
  • Metabox 4.15.5
  • Polylang 2.3.11

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:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

dbx_post_advanced
add_meta_boxes
add_meta_boxes_{$post_type}
do_meta_boxes
edit_form_advanced
restored before admin_enqueue_scripts instead of after admin_head
@danielbachhuber danielbachhuber added this to the 4.1 - UI freeze milestone Oct 16, 2018
@danielbachhuber danielbachhuber self-requested a review October 16, 2018 18:54
Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I'd like to get this in 4.1 so we can know whether we need to rip it out in 4.2 (or, hopefully, not).

@danielbachhuber danielbachhuber added [Feature] Extensibility The ability to extend blocks or the editing experience [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes. labels Oct 16, 2018
@danielbachhuber danielbachhuber requested a review from a team October 16, 2018 18:55
@danielbachhuber
Copy link
Member

@mtias agreed https://wordpress.slack.com/archives/C02QB2JS7/p1539776836000200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants