Hello,
I'm trying to create metabox for one of the post types with Taxonomy field and remove_default setting enabled and it works as it should for post type which passed in post_types setting of this metabox, but after this default taxonomy metabox disappeared also from other post type screens where this taxonomy set.
Code example:
register_taxonomy( 'quiz', [ 'assignment', 'company' ] );
...
[
'title' => __( 'Options', 'site' ),
'post_types' => 'company',
'fields' => [
[
'id' => 'quiz',
'type' => 'taxonomy',
'name' => __( 'Quiz', 'site' ),
'taxonomy' => 'quiz',
'field_type' => 'radio_list',
'remove_default' => true,
],
],
Possible bug:
There is no core Quiz metabox at edit screen of Assignment post type.
Expected behavior:
No core metabox Quiz at edit screen of Company post type but it should still be present at Assignment post type.
Possible solution:
Check current_screen vs post_types setting of Field array with settings in remove_default_meta_box method of RWMB_Taxonomy_Field class.