Action hook 'wp_after_insert_post'

in WP Core File wp-includes/post.php at line 5612

Description

Fires once a post, its terms and meta data has been saved.

Occurrences

Filename Line Number
wp-includes/post.php 5612

Parameters

Type Name Description
int $post_id Post ID.
WP_Post $post Post object.
bool $update Whether this is an existing post being updated.
null|WP_Post $post_before Null for new posts, the WP_Post object prior to the update for updated posts.

PHP Doc

/**
	 * Fires once a post, its terms and meta data has been saved.
	 *
	 * @since 5.6.0
	 *
	 * @param int          $post_id     Post ID.
	 * @param WP_Post      $post        Post object.
	 * @param bool         $update      Whether this is an existing post being updated.
	 * @param null|WP_Post $post_before Null for new posts, the WP_Post object prior
	 *                                  to the update for updated posts.
	 */