Can’t add_action to ‘save_post’ and get it to fire
When editing a post using the admin interface the wp-admin/post.php script redirects you after saving the post. This is done to avoid resubmitting the post request if you refresh the page after submitting. It also means that you’re not able to output anything during the save_post action. case ‘editpost’: check_admin_referer(‘update-post_’ . $post_id); $post_id = edit_post(); … Read more