[wp-hackers] wp_insert_post and publish_post action

Austin Matzko if.website at gmail.com
Fri Feb 6 01:14:55 GMT 2009

On Thu, Feb 5, 2009 at 6:15 PM, Matt Walters <mwalters8 at gmail.com> wrote:
> Just curious, it seems that wp_insert_post() is not triggering an
> action I have tied to publish_post.

For something that is a newly published post, wp_insert_post() does
trigger the "publish_post."  wp_insert_post() calls
wp_transition_post_status(), which is what triggers "publish_post."

Perhaps the thing published for your user was a page, in which case it
would have been "publish_page."

More information about the wp-hackers mailing list