duplicate entries in database while using save_post or wp_insert_post
wp_insert_post runs when a post is updated as well. If you scan the source you will see numerous blocks of code switching between an update or not an update. In fact, wp_update_post() just passes data, after a little processing, to wp_insert_post() for the bulk of the work. That is why your code runs more than … Read more