Make WordPress Core

Ticket #21543: 21543.4.diff

File 21543.4.diff, 1.7 KB (added by helen, 11 years ago)
  • src/wp-admin/edit-form-advanced.php

     
    157157        else
    158158                $tax_meta_box_id = $tax_name . 'div';
    159159
    160         add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) );
     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 ) );
    161162}
    162163
    163164if ( post_type_supports($post_type, 'page-attributes') )
  • src/wp-includes/taxonomy.php

     
    289289 *     * If not set, the default is inherited from public.
    290290 * - show_tagcloud - Whether to list the taxonomy in the Tag Cloud Widget.
    291291 *     * If not set, the default is inherited from show_ui.
    292  * - meta_box_cb - Provide a callback function for the meta box display. Defaults to
    293  *     post_categories_meta_box for hierarchical taxonomies and post_tags_meta_box for non-hierarchical.
     292 * - meta_box_cb - Provide a callback function for the meta box display.
     293 *     * If not set, defaults to post_categories_meta_box for hierarchical taxonomies
     294 *     and post_tags_meta_box for non-hierarchical.
     295 *     * If false, no meta box is shown.
    294296 * - capabilities - Array of capabilities for this taxonomy.
    295297 *     * You can see accepted values in this function.
    296298 * - rewrite - Triggers the handling of rewrites for this taxonomy. Defaults to true, using $taxonomy as slug.