Make WordPress Core

Changeset 13924


Ignore:
Timestamp:
04/02/2010 01:23:58 AM (14 years ago)
Author:
dd32
Message:

Use the taxonomy show_ui flag to control if all WordPress generated UI is exposed (Menu previously, This affects metaboxes). See #10437

Location:
trunk
Files:
2 edited

Legend:

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

    r13916 r13924  
    9393add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', $post_type, 'side', 'core');
    9494
    95 // all tag-style taxonomies
     95// all taxonomies
    9696foreach ( get_object_taxonomies($post_type) as $tax_name ) {
    9797    $taxonomy = get_taxonomy($tax_name);
     98    if ( ! $taxonomy->show_ui )
     99        continue;
     100
    98101    $label = isset($taxonomy->label) ? esc_attr($taxonomy->label) : $tax_name;
    99102
     
    102105    else
    103106        add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', $post_type, 'side', 'core', array( 'taxonomy' => $tax_name ));
     107
     108    // register callback handling for metabox
     109    add_filter('wp_ajax_add-' . $tax_name, '_wp_ajax_add_hierarchical_term');
    104110}
    105111
  • trunk/wp-includes/taxonomy.php

    r13915 r13924  
    295295    $args['object_type'] = (array) $object_type;
    296296    $wp_taxonomies[$taxonomy] = (object) $args;
    297 
    298     // register callback handling for metabox
    299     add_filter('wp_ajax_add-'.$taxonomy, '_wp_ajax_add_hierarchical_term');
    300297}
    301298
Note: See TracChangeset for help on using the changeset viewer.