Make WordPress Core

Ticket #23665: 23665.diff

File 23665.diff, 827 bytes (added by nacin, 11 years ago)
  • wp-admin/includes/ajax-actions.php

     
    10751075                                $id = $post->ID;
    10761076                }
    10771077
    1078                 // When is_wp_error($id), $id overwrites $data in WP_Ajax_Response
    1079                 // todo: Needs review. The errors generated in WP_Ajax_Response and parsed with wpAjax.parseAjaxResponse() haven't been used for years.
    10801078                if ( ! is_wp_error($id) ) {
    10811079                        /* translators: draft saved date format, see http://php.net/date */
    10821080                        $draft_saved_date_format = __('g:i:s a');
     
    10901088                        $id = $post->ID;
    10911089        }
    10921090
     1091        // Consider exposing any errors, rather than having 'Saving draft...'
    10931092        $x = new WP_Ajax_Response( array(
    10941093                'what' => 'autosave',
    10951094                'id' => $id,