Pass parent to category_exists(). Props thetoine. fixes #11825

git-svn-id: http://svn.automattic.com/wordpress/trunk@12662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-08 17:58:13 +00:00
parent db46fa6e1d
commit 26ade42134
1 changed files with 1 additions and 1 deletions

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