dimanche 1 mars 2015

Plugin hook that only fires when a new post is published? [duplicate]



This question already has an answer here:




I wrote a plugin for my site which posts an update on my forum whenever a new post is published. I'm using the "publish_post" and "publish_future_post" actions. The problem is, these actions also trigger whenever a post is updated. I only want the action to trigger if a new post is published, not if older posts are updated. I don't see any actions that do this in the WP reference. Is there another way to accomplish what I'm trying to do?





Aucun commentaire:

Enregistrer un commentaire