do_action( ‘wp_after_insert_post’, int $post_id, WP_Post $post, bool $update, null|WP_Post $post_before )

In this article

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

Parameters

$post_idint
Post ID.
$postWP_Post
Post object.
$updatebool
Whether this is an existing post being updated.
$post_beforenull|WP_Post
Null for new posts, the WP_Post object prior to the update for updated posts.

Source

do_action( 'wp_after_insert_post', $post_id, $post, $update, $post_before );

Changelog

VersionDescription
5.6.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.