Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: _wp_put_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
4866
4867      $post = _wp_post_revision_fields( $post, $autosave );
4868      $post = add_magic_quotes($post); //since data is from db
4869
4870      $revision_id = wp_insert_post( $post );
4871      if ( is_wp_error($revision_id) )
4872           return $revision_id;
4873
4874      if ( $revision_id )
4875           do_action( '_wp_put_post_revision', $revision_id );
4876      return $revision_id;
4877 }
4878
4879 /**
4880  * Gets a post revision.
4881  *
4882  * @package WordPress
4883  * @subpackage Post_Revisions
4884  * @since 2.6.0