publish_post action ONLY on publish, not update
-
I have a series of functions that run when a post is published, but I don’t want them to run on any updates to that post.
I tried testing the ‘post_status’ with:
if (!$_POST['post_status'] == 'publish') { do stuff }
but to no avail. Any ideas?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘publish_post action ONLY on publish, not update’ is closed to new replies.