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 |
---|---|
384 | wp_delete_post_revision( $old_autosave->ID ); |
385 | return new WP_Error( |
386 | 'rest_autosave_no_changes', |
387 | __( 'There is nothing to save. The autosave and the post content are the same.' ), |
388 | array( 'status' => 400 ) |
389 | ); |
390 | } |
391 |
|
392 | /** This filter is documented in wp-admin/post.php */ |
393 | do_action( 'wp_creating_autosave', $new_autosave ); |
394 |
|
395 | // wp_update_post() expects escaped array. |
396 | return wp_update_post( wp_slash( $new_autosave ) ); |
397 | } |
398 |
|
399 | // Create the new autosave as a special post revision. |
400 | return _wp_put_post_revision( $post_data, true ); |
401 | } |
402 |
|