Changeset 17640 for trunk/wp-admin/admin-ajax.php
- Timestamp:
- 04/16/2011 02:37:44 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/admin-ajax.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r17354 r17640 917 917 $do_lock = true; 918 918 919 $data = '';919 $data = $alert = ''; 920 920 /* translators: draft saved date format, see http://php.net/date */ 921 921 $draft_saved_date_format = __('g:i:s a'); … … 925 925 $supplemental = array(); 926 926 if ( isset($login_grace_period) ) 927 $ supplemental['session_expired'] = add_query_arg( 'interim-login', 1, wp_login_url() );927 $alert .= sprintf( __('Your login has expired. Please open a new browser window and <a href="%s" target="_blank">login again</a>. '), add_query_arg( 'interim-login', 1, wp_login_url() ) ); 928 928 929 929 $id = $revision_id = 0; … … 940 940 $last_user = get_userdata( $last ); 941 941 $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); 942 $data = new WP_Error( 'locked', sprintf( 943 $_POST['post_type'] == 'page' ? __( 'Autosave disabled: %s is currently editing this page.' ) : __( 'Autosave disabled: %s is currently editing this post.' ), 944 esc_html( $last_user_name ) 945 ) ); 942 $data = __( 'Autosave disabled.' ); 946 943 947 944 $supplemental['disable_autosave'] = 'disable'; 945 $alert .= sprintf( __( '%s is currently editing this article. If you update it, you will overwrite the changes.' ), esc_html( $last_user_name ) ); 948 946 } 949 947 … … 990 988 } 991 989 } 990 991 if ( ! empty($alert) ) 992 $supplemental['alert'] = $alert; 992 993 993 994 $x = new WP_Ajax_Response( array(
Note: See TracChangeset
for help on using the changeset viewer.