Ticket #2789: 2789.diff
File 2789.diff, 877 bytes (added by , 18 years ago) |
---|
-
wp-admin/admin-db.php
156 156 $cat_ID = (int) $cat_ID; 157 157 158 158 // Don't delete the default cat. 159 if ( 1 == $cat_ID)159 if ($cat_ID == get_option('default_category')) 160 160 return 0; 161 161 162 162 $category = get_category($cat_ID); -
wp-admin/categories.php
44 44 45 45 $cat_name = get_catname($cat_ID); 46 46 47 if ( 1 == $cat_ID ) 47 // Don't delete the default cats. 48 if ( $cat_ID == get_option('default_category') ) 48 49 die(sprintf(__("Can't delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 49 50 50 51 wp_delete_category($cat_ID);