corenominal

Full stack web developer, interested in all the things, but especially the web, code, design, Linux, OS X, PHP, WordPress, JavaScript & robots.

WordPress Publish Post Hook image/svg+xml

One of the best parts of WordPress is its hook/action system; this special hook system is WordPress’ way of assigning callbacks when certain events occur. One event that there seems to be a lot of confusion over is which hook to use to detect when a post is initially published.

Scour the WordPress documentation and forums and you’re sure to see a dozen other solutions but none work as well as the transition_post_status hook.

A concise post about one of the most important WordPress hooks. Features a handy function to help you get started.

Leave a comment

Your email address will not be published. Required fields are marked *