Meta Boxes: Sync checks for valid meta boxes from do_meta_boxes() to the_block_editor_meta_boxes().

See #45112.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43792 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2018-10-22 21:26:20 +00:00
parent 1fc8a0622c
commit 9c4aff4f56

View File

@ -2086,12 +2086,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'],
);
}
}
}