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

Prevent a notice from appearing in the Compatibility Tool meta box #1605

merged 1 commit into from Nov 10, 2018


Copy link

@kienstra kienstra commented Nov 10, 2018

It looks like this notice doesn't appear with WordPress 5.0-beta3 and Gutenberg 4.2.0.

But it appeared on the single URL validation page, with earlier versions of both. I can't reproduce this (even with WP_DEBUG set to true):


Still, it might be good to ensure that in future versions of Core and Gutenberg, that notice doesn't appear.

This might not be the right flag. But this sets __back_compat_meta_box to true, to indicate that:

...this meta box should only be loaded in the classic editor interface, and the block editor should not display it. (source)

That document also notes:

If you register your meta box with the __back_compat_meta_box set to true, then this warning will never be displayed with your meta box, now, or in future WordPress releases.

If this notice appeared in WP 5.0-beta3 and Gutenberg 4.2.0, maybe another flag would be better.

This is based on this Make post that @westonruter mentioned:

…block editor

There isn't a notice in the single error URL 'Publish' meta box now.
But by passing the '__back_compat_meta_box' flag,
this could prevent a message from appearing in the future.
This meta box isn't intended for use with a block editor.
It uses a list table,
so there's no case (without completely reworking it)
where it would be used in a block editor.
Copy link
Contributor Author

@kienstra kienstra commented Nov 10, 2018

Request For Review

Hi @westonruter,
Could you please review this when you have a chance?

This uses the __back_compat_meta_box flag, which is a little different from what we talked about.

I can't reproduce this notice appearing, but it might be good to pass some flag to prevent this notice in future versions of Core or Gutenberg.

@kienstra kienstra requested a review from westonruter Nov 10, 2018
@westonruter westonruter added this to the v1.0 milestone Nov 10, 2018
@westonruter westonruter merged commit 8dd1b48 into 1.0 Nov 10, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
@westonruter westonruter deleted the add/back-compat-meta-box branch Nov 10, 2018
@westonruter westonruter mentioned this pull request Nov 10, 2018
0 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.