Block Editor: Don't show back compat or incompatible meta boxes in Options.

Meta boxes that exist for back compat, or that are incompatible with the block editor aren't displayed, so they don't need an option to display or hide them in the Options dialog.

Merges [43856] from the 5.0 branch to trunk.

Props noisysocks.
Fixes #45249.

Built from https://develop.svn.wordpress.org/trunk@44222


git-svn-id: http://core.svn.wordpress.org/trunk@44052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2018-12-17 03:02:46 +00:00
parent 49418dbd7e
commit c92118203b
2 changed files with 11 additions and 1 deletions

View File

@ -2245,6 +2245,16 @@ function the_block_editor_meta_boxes() {
continue;
}
// If a meta box is just here for back compat, don't show it in the block editor.
if ( isset( $meta_box['args']['__back_compat_meta_box'] ) && $meta_box['args']['__back_compat_meta_box'] ) {
continue;
}
// If a meta box doesn't work in the block editor, don't show it in the block editor.
if ( isset( $meta_box['args']['__block_editor_compatible_meta_box'] ) && ! $meta_box['args']['__block_editor_compatible_meta_box'] ) {
continue;
}
$meta_boxes_per_location[ $location ][] = array(
'id' => $meta_box['id'],
'title' => $meta_box['title'],

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-alpha-44221';
$wp_version = '5.1-alpha-44222';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.