wp_creating_autosave action-hookWP 4.1.0

Fires before an autosave is stored.

Usage

add_action( 'wp_creating_autosave', 'wp_kama_creating_autosave_action' );

/**
 * Function for `wp_creating_autosave` action-hook.
 * 
 * @param array $new_autosave Post array - the autosave that is about to be saved.
 *
 * @return void
 */
function wp_kama_creating_autosave_action( $new_autosave ){

	// action...
}
$new_autosave(array)
Post array - the autosave that is about to be saved.

Changelog

Since 4.1.0 Introduced.

Where the hook is called

wp_create_post_autosave()
wp_creating_autosave
WP_REST_Autosaves_Controller::create_post_autosave()
wp_creating_autosave
wp-admin/includes/post.php 1908
do_action( 'wp_creating_autosave', $new_autosave );
wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php 385
do_action( 'wp_creating_autosave', $new_autosave );

Where the hook is used in WordPress

Usage not found.