mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Modify todo in wp_ajax_autosave(). fixes #23665.
git-svn-id: https://develop.svn.wordpress.org/trunk@24651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
52897ae4b9
commit
b970bdd914
@ -1075,8 +1075,6 @@ function wp_ajax_autosave() {
|
||||
$id = $post->ID;
|
||||
}
|
||||
|
||||
// When is_wp_error($id), $id overwrites $data in WP_Ajax_Response
|
||||
// todo: Needs review. The errors generated in WP_Ajax_Response and parsed with wpAjax.parseAjaxResponse() haven't been used for years.
|
||||
if ( ! is_wp_error($id) ) {
|
||||
/* translators: draft saved date format, see http://php.net/date */
|
||||
$draft_saved_date_format = __('g:i:s a');
|
||||
@ -1090,6 +1088,7 @@ function wp_ajax_autosave() {
|
||||
$id = $post->ID;
|
||||
}
|
||||
|
||||
// @todo Consider exposing any errors, rather than having 'Saving draft...'
|
||||
$x = new WP_Ajax_Response( array(
|
||||
'what' => 'autosave',
|
||||
'id' => $id,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user