Changeset 12509
- Timestamp:
- 12/23/2009 02:25:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r12415 r12509 2063 2063 2064 2064 $tags = is_array($tags) ? $tags : explode( ',', trim($tags, " \n\t\r\0\x0B,") ); 2065 2066 // Hierarchical taxonomies must always pass IDs rather than names so that children with the same 2067 // names but different parents aren't confused. 2068 $taxonomy_obj = get_taxonomy( $taxonomy ); 2069 if ( $taxonomy_obj->hierarchical ) { 2070 $tags = array_map( 'intval', $tags ); 2071 $tags = array_unique( $tags ); 2072 } 2073 2065 2074 wp_set_object_terms($post_id, $tags, $taxonomy, $append); 2066 2075 }
Note: See TracChangeset
for help on using the changeset viewer.