save_post action-hook . WP 1.5.0
Fires once a post has been saved.
Usage
add_action( 'save_post', 'action_function_name_7568', 10, 3 ); function action_function_name_7568( $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 1.5.0 | Introduced. |
Where the hook is called
save_post
save_post
wp-includes/post.php 4309
do_action( 'save_post', $post_ID, $post, $update );
wp-includes/post.php 4483
do_action( 'save_post', $post->ID, $post, true );
wp-includes/class-wp-customize-manager.php 3103
do_action( 'save_post', $post->ID, $post, true );
Where in WP core the hook is used WordPress
wp-includes/post.php 486
add_action( 'save_post', 'delete_get_calendar_cache' );