Make WordPress Core

Ticket #21543: 21543.5.diff

File 21543.5.diff, 933 bytes (added by ocean90, 11 years ago)
  • src/wp-admin/edit-form-advanced.php

     
    147147// all taxonomies
    148148foreach ( get_object_taxonomies( $post ) as $tax_name ) {
    149149        $taxonomy = get_taxonomy( $tax_name );
    150         if ( ! $taxonomy->show_ui )
     150        if ( ! $taxonomy->show_ui || false === $taxonomy->meta_box_cb )
    151151                continue;
    152152
    153153        $label = $taxonomy->labels->name;
     
    157157        else
    158158                $tax_meta_box_id = $tax_name . 'div';
    159159
    160         if ( false !== $taxonomy->meta_box_cb )
    161                 add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) );
     160        add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) );
    162161}
    163162
    164163if ( post_type_supports($post_type, 'page-attributes') )