Fire plugin function only when post/page is *first* published?
Hi, from what I can see the hook publish_page is fired whenever a page is published, or also if a page is updated. I don’t suppose there’s a hook that *only* occurs when a page is initially created? I believe there’s a hook to fire when a page is edited, so I’m wondering why publish_page actually also fires when a page is edited later….seems sort of wrong. I only want a function in a plugin I’m writing to happen upon initial creation of a page, not when it’s later edited.
Of course I could write up a query to see if it’s in the database and blah, blah…. But It seems to me a hook that occurs only at initial publish of a page would be a nice addition to things (unless I’m missing it, please let me know)
- The topic ‘Fire plugin function only when post/page is *first* published?’ is closed to new replies.