mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user