From 031d959efd66f4bf5084c9f836ee4ab879e133d4 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 11 Jul 2013 00:06:52 +0000 Subject: [PATCH] Modify todo in wp_ajax_autosave(). fixes #23665. git-svn-id: http://core.svn.wordpress.org/trunk@24651 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ajax-actions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 63d52fefe2..dab4df3602 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -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,