Ticket #2609: 2609.diff
File 2609.diff, 760 bytes (added by , 19 years ago) |
---|
-
wp-admin/categories.php
44 44 $cat_ID = (int) $_GET['cat_ID']; 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 51 if ( $cat_ID == get_option('default_link_category') ) 52 die(sprintf(__("Can't delete the <strong>%s</strong> category: this is the default one for bookmarks"), $cat_name)); 53 50 54 wp_delete_category($cat_ID); 51 55 52 56 header('Location: categories.php?message=2');