Post locks:
- Show 'Saving revision...' while autosaving after a post has been taken over. Change to 'Your latest changes were saved as a revision.' when autosave completes. - Make sure a user exists before using $user->display_name. - Add 'post_lock_text' action for extending the message text. git-svn-id: http://core.svn.wordpress.org/trunk@24042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -227,6 +227,7 @@ function autosave_loading() {
|
||||
}
|
||||
|
||||
function autosave_enable_buttons() {
|
||||
jQuery(document).trigger('autosave-enable-buttons');
|
||||
if ( ! wp.heartbeat.connectionLost ) {
|
||||
// delay that a bit to avoid some rare collisions while the DOM is being updated.
|
||||
setTimeout(function(){
|
||||
@@ -238,6 +239,7 @@ function autosave_enable_buttons() {
|
||||
}
|
||||
|
||||
function autosave_disable_buttons() {
|
||||
jQuery(document).trigger('autosave-disable-buttons');
|
||||
jQuery('#submitpost').find(':button, :submit').prop('disabled', true);
|
||||
// Re-enable 5 sec later. Just gives autosave a head start to avoid collisions.
|
||||
setTimeout( autosave_enable_buttons, 5000 );
|
||||
|
||||
Reference in New Issue
Block a user