Pass parent to category_exists(). Props thetoine. fixes #11825
git-svn-id: https://develop.svn.wordpress.org/trunk@12662 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
edea19e9ae
commit
70c55846ac
@ -48,7 +48,7 @@ function get_category_to_edit( $id ) {
|
||||
* @return unknown
|
||||
*/
|
||||
function wp_create_category( $cat_name, $parent = 0 ) {
|
||||
if ( $id = category_exists($cat_name) )
|
||||
if ( $id = category_exists($cat_name, $parent) )
|
||||
return $id;
|
||||
|
||||
return wp_insert_category( array('cat_name' => $cat_name, 'category_parent' => $parent) );
|
||||
|
Loading…
Reference in New Issue
Block a user