mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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: https://develop.svn.wordpress.org/trunk@24042 602fd350-edb4-49c9-b593-d223f7449a82
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