WPDev.one
Core Function
View Source on Trac ↗

wp_autosave()

wp_autosave( mixed $post_data )

Saves a post submitted with XHR.

Parameters 1 required

Name / Type Description
$post_data
array

Associative array of the submitted post data.

Required

Return Value

(mixed)
mixed The value 0 or WP_Error on failure. The saved post ID on success. The ID can be the draft post_id or the autosave revision post_id.

Function Information

Since Version
3.9.0
Source File
wp-admin/includes/post.php
Advertisement