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 |
|---|---|
| 3298 | return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) ); |
| 3299 | |
| 3300 | $post = _wp_post_revision_fields( $post, $autosave ); |
| 3301 | |
| 3302 | $revision_id = wp_insert_post( $post ); |
| 3303 | if ( is_wp_error($revision_id) ) |
| 3304 | return $revision_id; |
| 3305 | |
| 3306 | if ( $revision_id ) |
| 3307 | do_action( '_wp_put_post_revision', $revision_id ); |
| 3308 | return $revision_id; |
| 3309 | } |
| 3310 | |
| 3311 | /** |
| 3312 | * wp_get_post_revision() - Gets a post revision |
| 3313 | * |
| 3314 | * @package WordPress |
| 3315 | * @subpackage Post Revisions |
| 3316 | * @since 2.6 |