save_post_(post_type) action-hook . WP 3.7.0
Fires once a post has been saved.
The dynamic portion of the hook name, $post->post_type, refers to the post type slug.
Usage
add_action( 'save_post_(post_type)', 'action_function_name_4049', 10, 3 ); function action_function_name_4049( $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 3.7.0 | Introduced. |
Where the hook is called
save_post_(post_type)
save_post_(post_type)
wp-includes/post.php 4298
do_action( "save_post_{$post->post_type}", $post_ID, $post, $update );
wp-includes/post.php 4480
do_action( "save_post_{$post->post_type}", $post->ID, $post, true );
wp-includes/class-wp-customize-manager.php 3100
do_action( "save_post_{$post->post_type}", $post->ID, $post, true );