From d9e31a1bb996585e1cd70c3a4e04c83d5e54651a Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Thu, 1 Nov 2018 04:33:46 +0000 Subject: [PATCH] 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. Props noisysocks. Fixes #45249. Built from https://develop.svn.wordpress.org/branches/5.0@43856 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43685 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 10 ++++++++++ wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 2f444d293b..e4ec6a0ce3 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -2096,6 +2096,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'], diff --git a/wp-includes/version.php b/wp-includes/version.php index 941698ff57..30c8e7b664 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-beta2-43855'; +$wp_version = '5.0-beta2-43856'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.