Make WordPress Core

Changeset 25953


Ignore:
Timestamp:
10/27/2013 08:35:49 PM (11 years ago)
Author:
helen
Message:

Consolidate logic for not showing a taxonomy meta box. props ocean90. fixes #21543.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-advanced.php

    r25948 r25953  
    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
     
    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
Note: See TracChangeset for help on using the changeset viewer.