_wp_put_post_revision
Fires once a revision has been saved.
Usage
add_action( '_wp_put_post_revision', 'wp_kama__wp_put_post_revision_action', 10, 2 ); /** * Function for `_wp_put_post_revision` action-hook. * * @param int $revision_id Post revision ID. * @param int $post_id Post ID. * * @return void */ function wp_kama__wp_put_post_revision_action( $revision_id, $post_id ){ // action... }
- $revision_id(int)
- Post revision ID.
- $post_id(int)
- Post ID.
Changelog
Since 2.6.0 | Introduced. |
Since 6.4.0 | The post_id parameter was added. |
Where the hook is called
_wp_put_post_revision
wp-includes/revision.php 395
do_action( '_wp_put_post_revision', $revision_id, $post['post_parent'] );
Where the hook is used in WordPress
wp-includes/default-filters.php 742
add_action( '_wp_put_post_revision', 'wp_save_revisioned_meta_fields', 10, 2 );