Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_restore_post_revision

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3373           return false;
3374
3375      $update['ID'] = $revision['post_parent'];
3376
3377      $post_id = wp_update_post( $update );
3378      if ( is_wp_error( $post_id ) )
3379           return $post_id;
3380
3381      if ( $post_id )
3382           do_action( 'wp_restore_post_revision', $post_id, $revision['ID'] );
3383
3384      return $post_id;
3385 }
3386
3387 /**
3388  * wp_delete_post_revision() - Deletes a revision.
3389  *
3390  * Deletes the row from the posts table corresponding to the specified revision
3391  *