From c75599d2196387a39d63dc525a006b2b00b46c50 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 14 Feb 2008 09:34:19 +0000 Subject: [PATCH] Bulk link category delete git-svn-id: https://develop.svn.wordpress.org/trunk@6849 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit-link-categories.php | 31 ++++++++++++++++++++++++++++--- wp-admin/includes/template.php | 2 +- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/wp-admin/edit-link-categories.php b/wp-admin/edit-link-categories.php index f507b540ac..8d58965385 100644 --- a/wp-admin/edit-link-categories.php +++ b/wp-admin/edit-link-categories.php @@ -1,10 +1,33 @@ %s category: this is the default one"), $cat_name)); + + wp_delete_term($cat_ID, 'link_category'); + } + + wp_redirect('edit-link-categories.php?message=6'); + exit(); +} + $title = __('Link Categories'); $parent_file = 'edit.php'; wp_enqueue_script( 'admin-categories' ); +wp_enqueue_script('admin-forms'); + require_once ('admin-header.php'); $messages[1] = __('Category added.'); @@ -12,6 +35,7 @@ $messages[2] = __('Category deleted.'); $messages[3] = __('Category updated.'); $messages[4] = __('Category not added.'); $messages[5] = __('Category not updated.'); +$messages[6] = __('Categories deleted.'); if (isset($_GET['message'])) : ?> @@ -55,19 +79,19 @@ if ( $page_links ) ?>
- + +

-
- + @@ -95,6 +119,7 @@ if ( $categories ) { ?>
+
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 6ca4037026..3c1d7032c3 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -81,7 +81,7 @@ function link_cat_row( $category ) { $category->count = number_format_i18n( $category->count ); $count = ( $category->count > 0 ) ? "$category->count" : $category->count; $output = "" . - ' ' . + ' ' . "$edit $category->description $count";