wp_insert_post action-hook . WP 2.0.0
Fires once a post has been saved.
Usage
add_action( 'wp_insert_post', 'action_function_name_8688', 10, 3 ); function action_function_name_8688( $post_ID, $post, $update ){ // action... }
- $post_ID(int)
- Post ID.
- $post(WP_Post)
- Post object.
- $update(true/false)
- Whether this is an existing post being updated.
Changelog
Since 2.0.0 | Introduced. |
Where the hook is called
wp_insert_post
wp_insert_post
wp-includes/post.php 4320
do_action( 'wp_insert_post', $post_ID, $post, $update );
wp-includes/post.php 4486
do_action( 'wp_insert_post', $post->ID, $post, true );
wp-includes/class-wp-customize-manager.php 3106
do_action( 'wp_insert_post', $post->ID, $post, true );