From fe31e0adc5daecc021baf0115e585090507b52ca Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Fri, 14 Dec 2018 01:56:17 +0000 Subject: [PATCH] Meta Boxes: Sync checks for valid meta boxes from `do_meta_boxes()` to `the_block_editor_meta_boxes()`. Merges [43792] from the 5.0 branch to trunk. Props ocean90. See #45112. Built from https://develop.svn.wordpress.org/trunk@44141 git-svn-id: http://core.svn.wordpress.org/trunk@43971 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 12 +++++++----- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index c664be627b..2595f69f7c 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -2235,12 +2235,14 @@ function the_block_editor_meta_boxes() { $meta_boxes = (array) $wp_meta_boxes[ $current_screen->id ][ $location ][ $priority ]; foreach ( $meta_boxes as $meta_box ) { - if ( ! empty( $meta_box['title'] ) ) { - $meta_boxes_per_location[ $location ][] = array( - 'id' => $meta_box['id'], - 'title' => $meta_box['title'], - ); + if ( false == $meta_box || ! $meta_box['title'] ) { + 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 0e4072cf40..345aadd3a6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44140'; +$wp_version = '5.1-alpha-44141'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.