Post locks: make sure we never overwrite a draft when it's locked, clean up wp_ajax_autosave() and make wp-refresh-post-lock a bit more robust, see #23697
git-svn-id: http://core.svn.wordpress.org/trunk@23981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -276,8 +276,9 @@ $(document).on( 'heartbeat-tick.refresh-lock', function( e, data ) {
|
||||
// show "editing taken over" message
|
||||
wrap = $('#notification-dialog-wrap');
|
||||
|
||||
if ( ! wrap.is(':visible') ) {
|
||||
autosave();
|
||||
if ( wrap.length && ! wrap.is(':visible') ) {
|
||||
if ( typeof autosave == 'function' )
|
||||
autosave();
|
||||
|
||||
if ( received.lock_error.avatar_src ) {
|
||||
avatar = $('<img class="avatar avatar-64 photo" width="64" height="64" />').attr( 'src', received.lock_error.avatar_src.replace(/&/g, '&') );
|
||||
|
||||
Reference in New Issue
Block a user