add_action hook for publish_post not working
When a post is published/saved, it does not do it in a single script execution. It redirects to a different script, does the save, then redirects back to where you started. If you want to confirm that your hook is working, use update_option(), and delete the option immediately after displaying it so it’s not latent … Read more