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

Force the display of hidden meta boxes #7570

Merged
merged 1 commit into from
Jun 28, 2018
Merged

Conversation

danielbachhuber
Copy link
Member

@danielbachhuber 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 the Backwards Compatibility Issues or PRs that impact backwards compatability label Jun 27, 2018
@danielbachhuber danielbachhuber added this to the 3.2 milestone Jun 27, 2018
@danielbachhuber danielbachhuber requested a review from a team June 27, 2018 12:37
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

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

@danielbachhuber
Copy link
Member Author

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

@youknowriad
Copy link
Contributor

cc @mtias @karmatosed

@jasmussen
Copy link
Contributor

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

Copy link
Member

@karmatosed karmatosed left a comment

Choose a reason for hiding this comment

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

Looks like a good idea to me, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability
Projects
None yet
4 participants