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";