wphooks.info - save_post

save_post

The hook occurs in the following 3 files

wp-includes/theme.php:
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
			$post->post_status = $new_status;
			wp_transition_post_status( $new_status, $old_status, $post );

			/** This action is documented in wp-includes/post.php */
			do_action( 'edit_post', $post->ID, $post );

			/** This action is documented in wp-includes/post.php */
			do_action( "save_post_{$post->post_type}", $post->ID, $post, true );

			/** This action is documented in wp-includes/post.php */
			do_action( 'save_post', $post->ID, $post, true );

			/** This action is documented in wp-includes/post.php */
			do_action( 'wp_insert_post', $post->ID, $post, true );

			/** This action is documented in wp-includes/post.php */
			do_action( 'trashed_post', $post_id );
		}
	}
}
wp-includes/post.php:
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
	/**
	 * Fires once a post has been saved.
	 *
	 * @since 1.5.0
	 *
	 * @param int     $post_ID Post ID.
	 * @param WP_Post $post    Post object.
	 * @param bool    $update  Whether this is an existing post being updated or not.
	 */
	do_action( 'save_post', $post_ID, $post, $update );

	/**
	 * Fires once a post has been saved.
	 *
	 * @since 2.0.0
	 *
	 * @param int     $post_ID Post ID.
	 * @param WP_Post $post    Post object.
	 * @param bool    $update  Whether this is an existing post being updated or not.
wp-includes/post.php:
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
	$post->post_status = 'publish';
	wp_transition_post_status( 'publish', $old_status, $post );

	/** This action is documented in wp-includes/post.php */
	do_action( 'edit_post', $post->ID, $post );

	/** This action is documented in wp-includes/post.php */
	do_action( "save_post_{$post->post_type}", $post->ID, $post, true );

	/** This action is documented in wp-includes/post.php */
	do_action( 'save_post', $post->ID, $post, true );

	/** This action is documented in wp-includes/post.php */
	do_action( 'wp_insert_post', $post->ID, $post, true );
}

/**
 * Publish future post and make sure post ID has future post status.
 *
 * Invoked by cron 'publish_future_post' event. This safeguard prevents cron