post_updated action-hookWP 3.0.0

Fires once an existing post has been updated.

Usage

add_action( 'post_updated', 'wp_kama_post_updated_action', 10, 3 );

/**
 * Function for `post_updated` action-hook.
 * 
 * @param int     $post_ID     Post ID.
 * @param WP_Post $post_after  Post object following the update.
 * @param WP_Post $post_before Post object before the update.
 *
 * @return void
 */
function wp_kama_post_updated_action( $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

wp_insert_post()
post_updated
wp-includes/post.php 4686
do_action( 'post_updated', $post_ID, $post_after, $post_before );

Where the hook is used in WordPress

wp-admin/includes/admin-filters.php 167
add_action( 'post_updated', array( 'WP_Privacy_Policy_Content', '_policy_page_updated' ) );
wp-includes/default-filters.php 411
add_action( 'post_updated', 'wp_save_post_revision', 10, 1 );
wp-includes/default-filters.php 446
add_action( 'post_updated', 'wp_check_for_changed_slugs', 12, 3 );
wp-includes/default-filters.php 450
add_action( 'post_updated', 'wp_check_for_changed_dates', 12, 3 );