Logged out warnings: remove the logged out warning from autosave when in login_grace_period, see #23295

git-svn-id: http://core.svn.wordpress.org/trunk@23699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz
2013-03-14 21:31:02 +00:00
parent 07e5008d04
commit 21c2d8662c

View File

@@ -1034,8 +1034,6 @@ function wp_ajax_add_user( $action ) {
}
function wp_ajax_autosave() {
global $login_grace_period;
define( 'DOING_AUTOSAVE', true );
$nonce_age = check_ajax_referer( 'autosave', 'autosavenonce' );
@@ -1046,19 +1044,15 @@ function wp_ajax_autosave() {
$do_autosave = (bool) $_POST['autosave'];
$do_lock = true;
$data = '';
$supplemental = array();
$id = $revision_id = 0;
$data = $alert = '';
/* translators: draft saved date format, see http://php.net/date */
$draft_saved_date_format = __('g:i:s a');
/* translators: %s: date and time */
$message = sprintf( __('Draft saved at %s.'), date_i18n( $draft_saved_date_format ) );
$supplemental = array();
if ( isset($login_grace_period) )
$alert .= sprintf( __('Your login has expired. Please open a new browser window and <a href="%s" target="_blank">log in again</a>. '), add_query_arg( 'interim-login', 1, wp_login_url() ) );
$id = $revision_id = 0;
$post_id = (int) $_POST['post_id'];
$_POST['ID'] = $_POST['post_ID'] = $post_id;
$post = get_post($post_id);
@@ -1117,9 +1111,6 @@ function wp_ajax_autosave() {
}
}
if ( ! empty($alert) )
$supplemental['alert'] = $alert;
$x = new WP_Ajax_Response( array(
'what' => 'autosave',
'id' => $id,