post_updated action-hook . WP 3.0.0
Fires once an existing post has been updated.
Usage
add_action( 'post_updated', 'action_function_name_1915', 10, 3 ); function action_function_name_1915( $post_ID, $post_after, $post_before ){ // action... }
- $post_ID(int)
- Post ID.
- $post_after(WP_Post)
- Post object following the update.
- $post_before(WP_Post)
- Post object before the update.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
post_updated
wp-includes/post.php 4283
do_action( 'post_updated', $post_ID, $post_after, $post_before );
Where in WP core the hook is used WordPress
wp-admin/includes/admin-filters.php 149
add_action( 'post_updated', array( 'WP_Privacy_Policy_Content', '_policy_page_updated' ) );
wp-includes/default-filters.php 364
add_action( 'post_updated', 'wp_save_post_revision', 10, 1 );
wp-includes/default-filters.php 401
add_action( 'post_updated', 'wp_check_for_changed_slugs', 12, 3 );
wp-includes/default-filters.php 405
add_action( 'post_updated', 'wp_check_for_changed_dates', 12, 3 );