wp_restore_post_revision
Fires after a post revision has been restored.
Usage
add_action( 'wp_restore_post_revision', 'wp_kama_restore_post_revision_action', 10, 2 ); /** * Function for `wp_restore_post_revision` action-hook. * * @param int $post_id Post ID. * @param int $revision_id Post revision ID. * * @return void */ function wp_kama_restore_post_revision_action( $post_id, $revision_id ){ // action... }
- $post_id(int)
- Post ID.
- $revision_id(int)
- Post revision ID.
Changelog
Since 2.6.0 | Introduced. |
Where the hook is called
wp_restore_post_revision
wp-includes/revision.php 511
do_action( 'wp_restore_post_revision', $post_id, $revision['ID'] );
Where the hook is used in WordPress
wp-includes/default-filters.php 748
add_action( 'wp_restore_post_revision', 'wp_restore_post_revision_meta', 10, 2 );