Changeset 10239 for trunk/wp-admin/edit-tags.php
- Timestamp:
- 12/22/2008 07:33:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-tags.php
r10150 r10239 12 12 $title = __('Tags'); 13 13 14 wp_reset_vars( array('action', 'tag') ); 14 wp_reset_vars( array('action', 'tag', 'taxonomy') ); 15 16 if ( empty($taxonomy) ) 17 $taxonomy = 'post_tag'; 15 18 16 19 if ( isset( $_GET['action'] ) && isset($_GET['delete_tags']) && ( 'delete' == $_GET['action'] || 'delete' == $_GET['action2'] ) ) … … 26 29 wp_die(__('Cheatin’ uh?')); 27 30 28 $ret = wp_insert_term($_POST['name'], 'post_tag', $_POST);31 $ret = wp_insert_term($_POST['name'], $taxonomy, $_POST); 29 32 if ( $ret && !is_wp_error( $ret ) ) { 30 33 wp_redirect('edit-tags.php?message=1#addtag'); … … 42 45 wp_die(__('Cheatin’ uh?')); 43 46 44 wp_delete_term( $tag_ID, 'post_tag');47 wp_delete_term( $tag_ID, $taxonomy); 45 48 46 49 wp_redirect('edit-tags.php?message=2'); … … 57 60 $tags = $_GET['delete_tags']; 58 61 foreach( (array) $tags as $tag_ID ) { 59 wp_delete_term( $tag_ID, 'post_tag');62 wp_delete_term( $tag_ID, $taxonomy); 60 63 } 61 64 … … 78 81 $tag_ID = (int) $_GET['tag_ID']; 79 82 80 $tag = get_term($tag_ID, 'post_tag', OBJECT, 'edit');83 $tag = get_term($tag_ID, $taxonomy, OBJECT, 'edit'); 81 84 include('edit-tag-form.php'); 82 85 … … 90 93 wp_die(__('Cheatin’ uh?')); 91 94 92 $ret = wp_update_term($tag_ID, 'post_tag', $_POST);95 $ret = wp_update_term($tag_ID, $taxonomy, $_POST); 93 96 94 97 $location = 'edit-tags.php'; … … 168 171 'prev_text' => __('«'), 169 172 'next_text' => __('»'), 170 'total' => ceil(wp_count_terms( 'post_tag') / $tagsperpage),173 'total' => ceil(wp_count_terms($taxonomy) / $tagsperpage), 171 174 'current' => $pagenum 172 175 )); … … 208 211 $searchterms = isset( $_GET['s'] ) ? trim( $_GET['s'] ) : ''; 209 212 210 $count = tag_rows( $pagenum, $tagsperpage, $searchterms );213 $count = tag_rows( $pagenum, $tagsperpage, $searchterms, $taxonomy ); 211 214 ?> 212 215 </tbody>
Note: See TracChangeset
for help on using the changeset viewer.