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

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


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

Top ↑


File: wp-includes/post.php. View all references

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

Top ↑


Version Description
5.6.0 Introduced.

Top ↑

User Contributed Notes

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