Fix primary key on term_relationships. Add wp_set_object_terms(). Setting post tags working now. see #4189

git-svn-id: https://develop.svn.wordpress.org/trunk@5515 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-05-22 20:39:26 +00:00
parent 86ccde95ad
commit 9aa94b995b
3 changed files with 48 additions and 42 deletions
+1 -1
View File
@@ -794,7 +794,7 @@ function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) {
if ( empty($tags) )
$tags = array();
$tags = (is_array($tags)) ? $tags : explode( ',', $tags );
add_term_relationship($tags, $post_id, 'post_tag');
wp_set_object_terms($post_id, $tags, 'post_tag', $append);
}
function wp_set_post_categories($post_ID = 0, $post_categories = array()) {