[wp-hackers] wp_add_post_tags Return Value
Alan Castonguay
alan at verselogic.net
Sun May 3 13:22:55 GMT 2009
wp_add_post_tags() returns false for invalid post_id, and null for
success, because that's what wp_set_post_terms() does.
This calls wp_set_object_terms() which returns either WP_Error or a
term_info array (termid, termtaxonomyid) on error, or an array of
other ids on success? I'm afraid I don't quite understand this function.
Alan J Castonguay
-------------- next part --------------
On May 3, 2009, at 9:08 AM, Thomas Belknap wrote:
> Can anyone tell me why wp_add_post_tags() only returns either null or
> false? Seems like it would be helpful for the function to return
> true if it
> worked. It's very hard to test around it when the function
> consistently
> returns negative values. . .
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list