Core Function
View Source on Trac ↗ wp_create_post_autosave()
wp_create_post_autosave( mixed $post_data ) Creates autosave data for the specified post from `$_POST` data.
Parameters 1 required
| Name / Type | Description |
|---|---|
| mixed | (array | int) $post_data Associative array containing the post data, or integer post ID. If a numeric post ID is provided, will use the `$_POST` superglobal. Required |
Return Value
((int)
| WP_Error) The autosave revision ID. WP_Error or 0 on error.
Function Information
Since Version
2.6.0
Source File
wp-admin/includes/post.php
Advertisement