do_action( 'wp_insert_post', int $post_ID , WP_Post $post , bool $update )
Fires once a post has been saved.
Description Description
Parameters Parameters
- $post_ID
-
(int) Post ID.
- $post
-
(WP_Post) Post object.
- $update
-
(bool) Whether this is an existing post being updated or not.
Source Source
File: wp-includes/post.php
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
It’s not reliable to check first publication.
$update
will betrue
in first time post is published if you are using dashboard because it creates revisions.