if ( isset( $wp_meta_boxes[ $page ][ $context ] ) ) { foreach ( array
( 'high', 'sorted', 'core', 'default', 'low'
) as $priority ) { if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) { foreach ( (array) $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) { if ( false ===
$box || !
$box['title'
] ) { continue;
} $block_compatible = true;
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;
} 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 the meta box is declared as incompatible with the block editor, override the callback function.
if ( !
$block_compatible &&
$screen->
is_block_editor() ) { $box['old_callback'
] =
$box['callback'
];