pre_post_update
Fires immediately before an existing post is updated in the database.
Usage
add_action( 'pre_post_update', 'wp_kama_pre_post_update_action', 10, 2 );
/**
* Function for `pre_post_update` action-hook.
*
* @param int $post_id Post ID.
* @param array $data Array of unslashed post data.
*
* @return void
*/
function wp_kama_pre_post_update_action( $post_id, $data ){
// action...
}
- $post_id(int)
- Post ID.
- $data(array)
- Array of unslashed post data.
Changelog
| Since 2.5.0 | Introduced. |
Where the hook is called
pre_post_update
wp-includes/post.php 4900
do_action( 'pre_post_update', $post_id, $data );