Definition:
function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) {}
Set the tags for a post.
Parameters
- int $post_id: Post ID.
- string $tags: The tags to set for the post, separated by commas.
- bool $append: If true, don’t delete existing tags, just add on. If false, replace the tags with the new tags.
Return values
returns:Array of affected term IDs. WP_Error or false on failure.
Source code
function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) { return wp_set_post_terms( $post_id, $tags, 'post_tag', $append); }
4117
No comments yet... Be the first to leave a reply!