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:
Ryan Boren 2010-01-08 17:58:13 +00:00
parent edea19e9ae
commit 70c55846ac

View File

@ -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) );