WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 4809 | |
| 4810 | $post = _wp_post_revision_fields( $post, $autosave ); |
| 4811 | $post = add_magic_quotes($post); //since data is from db |
| 4812 | |
| 4813 | $revision_id = wp_insert_post( $post ); |
| 4814 | if ( is_wp_error($revision_id) ) |
| 4815 | return $revision_id; |
| 4816 | |
| 4817 | if ( $revision_id ) |
| 4818 | do_action( '_wp_put_post_revision', $revision_id ); |
| 4819 | return $revision_id; |
| 4820 | } |
| 4821 | |
| 4822 | /** |
| 4823 | * Gets a post revision. |
| 4824 | * |
| 4825 | * @package WordPress |
| 4826 | * @subpackage Post_Revisions |
| 4827 | * @since 2.6.0 |