mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 15:16:59 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user