From 8fa3f8bb00e04f5d6c2292e2dfd532e880a3bdd7 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 8 Feb 2008 19:38:53 +0000 Subject: [PATCH] Bulk tag delete from jhodgdon. see #5684 git-svn-id: http://svn.automattic.com/wordpress/trunk@6759 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-tags.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index db6f6e6448..463f616a97 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -38,6 +38,22 @@ case 'delete': break; +case 'bulk-delete': + check_admin_referer('bulk-tags'); + + if ( !current_user_can('manage_categories') ) + wp_die(__('Cheatin’ uh?')); + + $tags = $_POST['delete_tags']; + foreach( $tags as $tag_ID ) { + wp_delete_term( $tag_ID, 'post_tag'); + } + + wp_redirect('edit-tags.php?message=6'); + exit; + +break; + case 'edit': require_once ('admin-header.php'); @@ -76,6 +92,7 @@ $messages[2] = __('Tag deleted.'); $messages[3] = __('Tag updated.'); $messages[4] = __('Tag not added.'); $messages[5] = __('Tag not updated.'); +$messages[6] = __('Tags deleted.'); ?> @@ -100,6 +117,7 @@ $messages[5] = __('Tag not updated.');
+ @@ -122,6 +140,7 @@ $count = tag_rows( $pagenum, $tagsperpage, $searchterms ); ?>
+

')" />