检查action
的current screen 的对象add
:
function wpd_add_meta_box() {
$screen = get_current_screen();
if( \'add\' != $screen->action ){
add_meta_box(
\'myplugin_sectionid\',
\'My meta box\',
\'myplugin_meta_box_callback\',
\'leads\'
);
}
}
add_action( \'add_meta_boxes\', \'wpd_add_meta_box\' );