Make WordPress Core


Ignore:
Timestamp:
12/22/2008 07:33:09 PM (16 years ago)
Author:
ryan
Message:

get_previous_comments_link() and get_next_comments_link(). Props Viper007Bond. fixes #8058 for trunk

File:
1 edited

Legend:

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

    r10150 r10239  
    1212$title = __('Tags');
    1313
    14 wp_reset_vars( array('action', 'tag') );
     14wp_reset_vars( array('action', 'tag', 'taxonomy') );
     15
     16if ( empty($taxonomy) )
     17    $taxonomy = 'post_tag';
    1518
    1619if ( isset( $_GET['action'] ) && isset($_GET['delete_tags']) && ( 'delete' == $_GET['action'] || 'delete' == $_GET['action2'] ) )
     
    2629        wp_die(__('Cheatin’ uh?'));
    2730
    28     $ret = wp_insert_term($_POST['name'], 'post_tag', $_POST);
     31    $ret = wp_insert_term($_POST['name'], $taxonomy, $_POST);
    2932    if ( $ret && !is_wp_error( $ret ) ) {
    3033        wp_redirect('edit-tags.php?message=1#addtag');
     
    4245        wp_die(__('Cheatin’ uh?'));
    4346
    44     wp_delete_term( $tag_ID, 'post_tag');
     47    wp_delete_term( $tag_ID, $taxonomy);
    4548
    4649    wp_redirect('edit-tags.php?message=2');
     
    5760    $tags = $_GET['delete_tags'];
    5861    foreach( (array) $tags as $tag_ID ) {
    59         wp_delete_term( $tag_ID, 'post_tag');
     62        wp_delete_term( $tag_ID, $taxonomy);
    6063    }
    6164
     
    7881    $tag_ID = (int) $_GET['tag_ID'];
    7982
    80     $tag = get_term($tag_ID, 'post_tag', OBJECT, 'edit');
     83    $tag = get_term($tag_ID, $taxonomy, OBJECT, 'edit');
    8184    include('edit-tag-form.php');
    8285
     
    9093        wp_die(__('Cheatin’ uh?'));
    9194
    92     $ret = wp_update_term($tag_ID, 'post_tag', $_POST);
     95    $ret = wp_update_term($tag_ID, $taxonomy, $_POST);
    9396
    9497    $location = 'edit-tags.php';
     
    168171    'prev_text' => __('«'),
    169172    'next_text' => __('»'),
    170     'total' => ceil(wp_count_terms('post_tag') / $tagsperpage),
     173    'total' => ceil(wp_count_terms($taxonomy) / $tagsperpage),
    171174    'current' => $pagenum
    172175));
     
    208211$searchterms = isset( $_GET['s'] ) ? trim( $_GET['s'] ) : '';
    209212
    210 $count = tag_rows( $pagenum, $tagsperpage, $searchterms );
     213$count = tag_rows( $pagenum, $tagsperpage, $searchterms, $taxonomy );
    211214?>
    212215    </tbody>
Note: See TracChangeset for help on using the changeset viewer.