mirror of
git://develop.git.wordpress.org/
synced 2025-01-29 10:38:22 +01:00
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. git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43856 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4d2db97c5d
commit
364f935221
@ -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'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user