[wp-hackers] how to append some tag to post automatically, when it is published?
otto at ottodestruct.com
Thu Sep 10 14:23:12 UTC 2009
wp_add_post_tags($post_id = 0, $tags = '')
wp_add_post_tags(12345, 'video, another-tag, whatever');
On Thu, Sep 10, 2009 at 8:17 AM, Konrad Karpieszuk
<kkarpieszuk at gmail.com> wrote:
> hi :)
> Sometimes on my blog someone will publish post with Custom field name =
> "video" and value = [url to video at YT]
> I want that thos post will have added automatically blog tag 'video'
> How to do this?
> I just know that i need to add action hook for 'publish_post'. but what
> should be in function? does wp has some function to add tag to post (i
> belive yes, but i don't know which one)?
> (en) regards / (pl) pozdrawiam
> Konrad Karpieszuk
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers