mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Don't allow a category to be it's own parent. Props donncha. fixes #3278
git-svn-id: https://develop.svn.wordpress.org/trunk@4490 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -151,6 +151,9 @@ function wp_update_category($catarr) {
|
||||
|
||||
$cat_ID = (int) $catarr['cat_ID'];
|
||||
|
||||
if( $cat_ID == $catarr['category_parent'] )
|
||||
return false;
|
||||
|
||||
// First, get all of the original fields
|
||||
$category = get_category($cat_ID, ARRAY_A);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user