mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 19:54:28 +00:00
Autosave:
- Move the 'Saving post' and 'Draft saved at...' strings from autosaveL10n to postL10n as they are used only there. - Use the custom jQuery events 'before-autosave' and 'after-autosave' to show these messages. - Separate autosave.suspend() for local and server so local autosaves can continue while server autosaves are suspended. - Remove the recently added autosave.server.disable() and use autosave.server.suspend() instead. - Bring back .button.disabled, button-primary.disabled and use .disabled to prevent multiple form submissions. See #25272. git-svn-id: https://develop.svn.wordpress.org/trunk@27038 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -430,6 +430,8 @@ function wp_default_scripts( &$scripts ) {
|
||||
'privatelyPublished' => __('Privately Published'),
|
||||
'published' => __('Published'),
|
||||
'comma' => _x( ',', 'tag delimiter' ),
|
||||
'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'),
|
||||
'savingText' => __('Saving Draft…'),
|
||||
) );
|
||||
|
||||
$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 );
|
||||
@@ -653,8 +655,6 @@ function wp_just_in_time_script_localization() {
|
||||
|
||||
wp_localize_script( 'autosave', 'autosaveL10n', array(
|
||||
'autosaveInterval' => AUTOSAVE_INTERVAL,
|
||||
'savingText' => __('Saving Draft…'),
|
||||
'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'),
|
||||
'blog_id' => get_current_blog_id(),
|
||||
) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user