diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 58505fa9f4..336e353a28 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1137,25 +1137,27 @@ function do_meta_boxes( $screen, $context, $object ) { continue; } - // Don't show boxes in the block editor, if they're just here for back compat. - if ( $screen->is_block_editor() && isset( $box['args']['__back_compat_meta_box'] ) && $box['args']['__back_compat_meta_box'] ) { - continue; - } + if ( is_array( $box[ 'args' ] ) ) { + // If a meta box is just here for back compat, don't show it in the block editor. + if ( $screen->is_block_editor() && isset( $box['args']['__back_compat_meta_box'] ) && $box['args']['__back_compat_meta_box'] ) { + continue; + } - // Don't show boxes in the block editor that aren't compatible with the block editor. - if ( $screen->is_block_editor() && isset( $box['args']['__block_editor_compatible_meta_box'] ) && ! $box['args']['__block_editor_compatible_meta_box'] ) { - continue; - } + // If a meta box doesn't work in the block editor, don't show it in the block editor. + if ( $screen->is_block_editor() && isset( $box['args']['__block_editor_compatible_meta_box'] ) && ! $box['args']['__block_editor_compatible_meta_box'] ) { + continue; + } - $block_compatible = true; - if ( isset( $box['args']['__block_editor_compatible_meta_box'] ) ) { - $block_compatible = (bool) $box['args']['__block_editor_compatible_meta_box']; - unset( $box['args']['__block_editor_compatible_meta_box'] ); - } + $block_compatible = true; + if ( isset( $box['args']['__block_editor_compatible_meta_box'] ) ) { + $block_compatible = (bool) $box['args']['__block_editor_compatible_meta_box']; + unset( $box['args']['__block_editor_compatible_meta_box'] ); + } - if ( isset( $box['args']['__back_compat_meta_box'] ) ) { - $block_compatible |= (bool) $box['args']['__back_compat_meta_box']; - unset( $box['args']['__back_compat_meta_box'] ); + if ( isset( $box['args']['__back_compat_meta_box'] ) ) { + $block_compatible = $block_compatible || (bool) $box['args']['__back_compat_meta_box']; + unset( $box['args']['__back_compat_meta_box'] ); + } } $i++; diff --git a/wp-includes/version.php b/wp-includes/version.php index 3a0b603c76..3f346e5399 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44173'; +$wp_version = '5.1-alpha-44174'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.