mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
AJAX, cause you love it. Props mdawaffe. fixes #2561
git-svn-id: https://develop.svn.wordpress.org/trunk@3660 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -174,7 +174,8 @@ function wp_delete_category($cat_ID) {
|
||||
$parent = $category->category_parent;
|
||||
|
||||
// Delete the category.
|
||||
$wpdb->query("DELETE FROM $wpdb->categories WHERE cat_ID = '$cat_ID'");
|
||||
if ( !$wpdb->query("DELETE FROM $wpdb->categories WHERE cat_ID = '$cat_ID'") )
|
||||
return 0;
|
||||
|
||||
// Update children to point to new parent.
|
||||
$wpdb->query("UPDATE $wpdb->categories SET category_parent = '$parent' WHERE category_parent = '$cat_ID'");
|
||||
|
||||
Reference in New Issue
Block a user