Make WordPress Core

Changeset 13212


Ignore:
Timestamp:
02/19/2010 09:33:50 AM (15 years ago)
Author:
dd32
Message:

More Taxonomy cap checks. See #12035

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r13023 r13212  
    620620 */
    621621function get_edit_tag_link( $tag_id = 0, $taxonomy = 'post_tag' ) {
     622    $tax = get_taxonomy($taxonomy);
     623    if ( !current_user_can($tax->edit_cap) )
     624        return;
     625   
    622626    $tag = get_term($tag_id, $taxonomy);
    623 
    624     if ( !current_user_can('manage_categories') )
    625         return;
    626627
    627628    $location = admin_url('edit-tags.php?action=edit&taxonomy=' . $taxonomy . '&tag_ID=' . $tag->term_id);
     
    641642 */
    642643function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) {
     644    $tax = get_taxonomy('post_tag');
     645    if ( !current_user_can($tax->edit_cap) )
     646        return;
     647
    643648    $tag = get_term($tag, 'post_tag');
    644 
    645     if ( !current_user_can('manage_categories') )
    646         return;
    647649
    648650    if ( empty($link) )
Note: See TracChangeset for help on using the changeset viewer.