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

Force the display of hidden meta boxes #7570

merged 1 commit into from Jun 28, 2018


None yet
4 participants

danielbachhuber commented Jun 27, 2018


Forces the display of hidden meta boxes in Gutenberg, because Gutenberg doesn't have UI for managing meta boxes.

It remains to be seen whether Gutenberg will have the concept of hidden meta boxes, so this is an interim solution to the problem that may become the permanent solution.

Fixes #6495
Fixes #5841
To be documented in #4186

How has this been tested?

  1. Register a custom meta box:
add_action( 'add_meta_boxes', function(){
	add_meta_box( 'gutenberg-test', 'Gutenberg Test', function(){
		echo 'Hello World';
	}, get_post_type(), 'side' );
  1. View the meta box as present in the Classic Editor right column:


  1. Hide the meta box using Screen Options:


  1. Notice that the meta box displays correctly in Extended Settings:


Types of changes

Bug fix.


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

@danielbachhuber danielbachhuber added this to the 3.2 milestone Jun 27, 2018

@danielbachhuber danielbachhuber requested a review from WordPress/gutenberg-core Jun 27, 2018


Agreed with this change, let's wait for other opinions though


This comment has been minimized.


danielbachhuber commented Jun 27, 2018

@youknowriad Do you want to flag whomever else you'd like an opinion from?

@danielbachhuber danielbachhuber referenced this pull request Jun 27, 2018


Document known changes in editor behavior #4186

0 of 5 tasks complete

This comment has been minimized.


youknowriad commented Jun 27, 2018

@danielbachhuber danielbachhuber requested review from karmatosed and mtias Jun 27, 2018


This comment has been minimized.


jasmussen commented Jun 28, 2018

I think this is a good solution for back compat. You can also collapse metaboxes if you like.


Looks like a good idea to me, thanks.

@danielbachhuber danielbachhuber merged commit 7e27b2d into master Jun 28, 2018

2 checks passed

codecov/project 46.78% remains the same compared to e197ba0
continuous-integration/travis-ci/pr The Travis CI build passed

@danielbachhuber danielbachhuber deleted the 6495-force-display branch Jun 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment