mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
Don't create empty tags. Fixes #5412 props ionfish
git-svn-id: https://develop.svn.wordpress.org/trunk@6407 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1187,7 +1187,7 @@ function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) {
|
||||
|
||||
if ( empty($tags) )
|
||||
$tags = array();
|
||||
$tags = (is_array($tags)) ? $tags : explode( ',', $tags );
|
||||
$tags = (is_array($tags)) ? $tags : explode( ',', trim($tags, " \s\n\t\r\0\x0B,") );
|
||||
wp_set_object_terms($post_id, $tags, 'post_tag', $append);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user