* @uses do_action() Calls 'edit_post' action on post ID and post data if this is an update. * @uses do_action() Calls 'save_post' and 'wp_insert_post' on post id and post data just before returning.