Ticket #15008: 15008.diff
File 15008.diff, 1.2 KB (added by , 14 years ago) |
---|
-
admin-ajax.php
357 357 if ( !$tag || is_wp_error( $tag ) ) 358 358 die('1'); 359 359 360 if ( wp_delete_term($tag_id, $taxonomy))360 if ( 'category' == $taxonomy && wp_delete_category( $tag_id ) ) 361 361 die('1'); 362 elseif( wp_delete_term( $tag_id, $taxonomy ) ) 363 die('1'); 362 364 else 363 365 die('0'); 364 366 break; -
edit-tags.php
69 69 if ( !current_user_can( $tax->cap->delete_terms ) ) 70 70 wp_die( __( 'Cheatin’ uh?' ) ); 71 71 72 wp_delete_term( $tag_ID, $taxonomy ); 72 if ( 'category' == $taxonomy ) 73 wp_delete_category( $tag_ID ); 74 else 75 wp_delete_term( $tag_ID, $taxonomy ); 73 76 74 77 $location = add_query_arg( 'message', 2, $location ); 75 78 wp_redirect( $location ); … … 85 88 86 89 $tags = (array) $_REQUEST['delete_tags']; 87 90 foreach ( $tags as $tag_ID ) { 88 wp_delete_term( $tag_ID, $taxonomy ); 91 if ( 'category' == $taxonomy ) 92 wp_delete_category( $tag_ID ); 93 else 94 wp_delete_term( $tag_ID, $taxonomy ); 89 95 } 90 96 91 97 $location = 'edit-tags.php?taxonomy=' . $taxonomy;