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.


git-svn-id: https://develop.svn.wordpress.org/trunk@44141 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt 2018-12-14 01:54:40 +00:00
parent 5e64a1fedd
commit f77c9bdd84

View File

@ -2235,12 +2235,14 @@ function the_block_editor_meta_boxes() {
$meta_boxes = (array) $wp_meta_boxes[ $current_screen->id ][ $location ][ $priority ]; $meta_boxes = (array) $wp_meta_boxes[ $current_screen->id ][ $location ][ $priority ];
foreach ( $meta_boxes as $meta_box ) { foreach ( $meta_boxes as $meta_box ) {
if ( ! empty( $meta_box['title'] ) ) { if ( false == $meta_box || ! $meta_box['title'] ) {
$meta_boxes_per_location[ $location ][] = array( continue;
'id' => $meta_box['id'],
'title' => $meta_box['title'],
);
} }
$meta_boxes_per_location[ $location ][] = array(
'id' => $meta_box['id'],
'title' => $meta_box['title'],
);
} }
} }
} }