mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Add braces in case our belt gives out after a large meal. Props westi. fixes #2609
git-svn-id: http://svn.automattic.com/wordpress/trunk@3675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f5e88cd3d5
commit
a165dc1e5b
@ -44,9 +44,13 @@ case 'delete':
|
||||
$cat_ID = (int) $_GET['cat_ID'];
|
||||
$cat_name = get_catname($cat_ID);
|
||||
|
||||
if ( 1 == $cat_ID )
|
||||
// Don't delete the default cats.
|
||||
if ( $cat_ID == get_option('default_category') )
|
||||
die(sprintf(__("Can't delete the <strong>%s</strong> category: this is the default one"), $cat_name));
|
||||
|
||||
if ( $cat_ID == get_option('default_link_category') )
|
||||
die(sprintf(__("Can't delete the <strong>%s</strong> category: this is the default one for bookmarks"), $cat_name));
|
||||
|
||||
wp_delete_category($cat_ID);
|
||||
|
||||
header('Location: categories.php?message=2');
|
||||
|
Loading…
Reference in New Issue
Block a user