edit_post action-hookWP 1.2.0

Fires once an existing post has been updated.

Usage

add_action( 'edit_post', 'wp_kama_edit_post_action', 10, 2 );

/**
 * Function for `edit_post` action-hook.
 * 
 * @param int     $post_id Post ID.
 * @param WP_Post $post    Post object.
 *
 * @return void
 */
function wp_kama_edit_post_action( $post_id, $post ){

	// action...
}
$post_id(int)
Post ID.
$post(WP_Post)
Post object.

Changelog

Since 1.2.0 Introduced.

Where the hook is called

wp_insert_post()
edit_post
wp_update_comment_count_now()
edit_post
wp_publish_post()
edit_post
WP_Customize_Manager::trash_changeset_post()
edit_post
wp-includes/post.php 4847
do_action( 'edit_post', $post_id, $post );
wp-includes/comment.php 2774
do_action( 'edit_post', $post_id, $post );
wp-includes/post.php 5059
do_action( 'edit_post', $post->ID, $post );
wp-includes/class-wp-customize-manager.php 3112
do_action( 'edit_post', $post->ID, $post );

Where the hook is used in WordPress

Usage not found.