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
merged 1 commit into from Jun 28, 2018

Conversation

Projects
None yet
4 participants
@danielbachhuber
Member

danielbachhuber commented Jun 27, 2018

Description

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:

image

  1. Hide the meta box using Screen Options:

image

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

image

Types of changes

Bug fix.

Checklist:

  • 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

@youknowriad

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

@danielbachhuber

This comment has been minimized.

Member

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

Open

Document known changes in editor behavior #4186

0 of 5 tasks complete
@youknowriad

This comment has been minimized.

Contributor

youknowriad commented Jun 27, 2018

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

@jasmussen

This comment has been minimized.

Contributor

jasmussen commented Jun 28, 2018

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

@karmatosed

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
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@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