mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Allow localized commas to be used as tag separators. see #7897.
git-svn-id: https://develop.svn.wordpress.org/trunk@19853 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2907,7 +2907,12 @@ function wp_set_post_terms( $post_id = 0, $tags = '', $taxonomy = 'post_tag', $a
|
||||
if ( empty($tags) )
|
||||
$tags = array();
|
||||
|
||||
$tags = is_array($tags) ? $tags : explode( ',', trim($tags, " \n\t\r\0\x0B,") );
|
||||
if ( ! is_array( $tags ) ) {
|
||||
$comma = _x( ',', 'tag delimiter' );
|
||||
if ( ',' !== $comma )
|
||||
$tags = str_replace( $comma, ',', $tags );
|
||||
$tags = explode( ',', trim( $tags, " \n\t\r\0\x0B," ) );
|
||||
}
|
||||
|
||||
// Hierarchical taxonomies must always pass IDs rather than names so that children with the same
|
||||
// names but different parents aren't confused.
|
||||
|
||||
Reference in New Issue
Block a user