Make WordPress Core


Ignore:
Timestamp:
02/05/2010 02:33:29 PM (16 years ago)
Author:
dd32
Message:

Allow viewing of Attached hierarchical Terms when the user doesnt have Manage capability of the taxonomy, Only set terms if user has Management capability. See #12035

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r12833 r12967  
    240240    $tax_name = esc_attr(substr($box['id'], 8));
    241241    $taxonomy = get_taxonomy($tax_name);
    242     if ( !current_user_can($taxonomy->manage_cap) )
     242    if ( !current_user_can($taxonomy->manage_cap) ) // @todo: Display the terms, do not edit.
    243243        return;
    244244    $helps = isset($taxonomy->helps) ? esc_attr($taxonomy->helps) : __('Separate tags with commas.');
     
    280280    $tax = get_taxonomy($taxonomy);
    281281
    282     if ( !current_user_can($tax->manage_cap) )
    283         return;
    284282    ?>
    285283    <div id="taxonomy-<?php echo $taxonomy; ?>" class="categorydiv">
     
    297295        <div id="<?php echo $taxonomy; ?>-all" class="tabs-panel">
    298296            <ul id="<?php echo $taxonomy; ?>checklist" class="list:<?php echo $taxonomy?> categorychecklist form-no-clear">
    299                 <?php wp_terms_checklist($post->ID, array('taxonomy'=>$taxonomy, 'popular_cats'=> $popular_ids)) ?>
     297                <?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?>
    300298            </ul>
    301299        </div>
Note: See TracChangeset for help on using the changeset viewer.