[wp-hackers] how to append some tag to post automatically, when it is published?

Konrad Karpieszuk kkarpieszuk at gmail.com
Thu Sep 10 14:34:53 UTC 2009


thank you very much :)
btw. is it a right place for this kind of questions? i asked this yesterday
at forum but nobody answered, so i tried here ;) but when i look at your
discussions i am not sure if it is good place to ask :)

On Thu, Sep 10, 2009 at 4:23 PM, Otto <otto at ottodestruct.com> wrote:

> wp_add_post_tags($post_id = 0, $tags = '')
>
> Example:
> wp_add_post_tags(12345, 'video, another-tag, whatever');
>
> -Otto
>
>
>
> 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
> > http://konradjestwrwandzie.wordpress.com/
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
(en) regards / (pl) pozdrawiam
Konrad Karpieszuk
http://konradjestwrwandzie.wordpress.com/


More information about the wp-hackers mailing list