diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 11b6096823..9dd889f528 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -78,6 +78,7 @@ function _cat_row( $category, $level, $name_override = false ) {
$category = get_category( $category );
+ $default_cat_id = (int) get_option( 'default_category' );
$pad = str_repeat( '— ', $level );
$name = ( $name_override ? $name_override : $pad . ' ' . $category->name );
$edit_link = "categories.php?action=edit&cat_ID=$category->term_id";
@@ -85,7 +86,8 @@ function _cat_row( $category, $level, $name_override = false ) {
$edit = "name)) . "'>$name
";
$actions = array();
$actions['edit'] = '' . __('Edit') . '';
- $actions['delete'] = "term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "";
+ if ( $default_cat_id != $category->term_id )
+ $actions['delete'] = "term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "";
$action_count = count($actions);
$i = 0;
foreach ( $actions as $action => $link ) {
@@ -103,7 +105,7 @@ function _cat_row( $category, $level, $name_override = false ) {
$posts_count = ( $category->count > 0 ) ? "$category->count" : $category->count;
$output = "