tag_exists(), category_object_exists(), and some tag and cat create fix ups. see #3723

git-svn-id: https://develop.svn.wordpress.org/trunk@5271 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-04-15 02:26:26 +00:00
parent 7bc575400e
commit 424a7906c0
2 changed files with 47 additions and 12 deletions
+1 -1
View File
@@ -808,7 +808,7 @@ function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) {
$tag = trim( $tag );
if ( !$tag_slug = sanitize_title( $tag ) )
continue; // discard
if ( !$tag_id = category_exists( $tag ) )
if ( !$tag_id = tag_exists( $tag ) )
$tag_id = wp_create_tag( $tag );
$tag_ids[] = $tag_id;
}