Make WordPress Core


Ignore:
Timestamp:
02/19/2010 09:54:18 AM (16 years ago)
Author:
dd32
Message:

Fix $post_type handling/passing in the Taxonomy edit links. Fix the Tag selection query var for edit.php in the Posts links. See #12270, See #11838

File:
1 edited

Legend:

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

    r13212 r13213  
    620620 */
    621621function get_edit_tag_link( $tag_id = 0, $taxonomy = 'post_tag' ) {
     622    global $post_type;
    622623    $tax = get_taxonomy($taxonomy);
    623624    if ( !current_user_can($tax->edit_cap) )
    624625        return;
    625    
     626
    626627    $tag = get_term($tag_id, $taxonomy);
    627628
    628     $location = admin_url('edit-tags.php?action=edit&taxonomy=' . $taxonomy . '&tag_ID=' . $tag->term_id);
     629    $location = admin_url('edit-tags.php?action=edit&taxonomy=' . $taxonomy . '&' . (!empty($post_type) ? 'post_type=' . $post_type .'&' : '') .'tag_ID=' . $tag->term_id);
    629630    return apply_filters( 'get_edit_tag_link', $location );
    630631}
Note: See TracChangeset for help on using the changeset viewer.