Make WordPress Core


Ignore:
Timestamp:
03/13/2013 10:08:16 AM (12 years ago)
Author:
azaozz
Message:

Autosave to the browser's sessionStorage, compare this autosave to the post content on page load and let the user restore it when the data is not the same. First run, see #23220

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/script-loader.php

    r23681 r23683  
    107107    ) );
    108108
    109     $scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), false, 1 );
     109    $scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response', 'editor'), false, 1 );
    110110
    111111    $scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array('jquery'), false, 1 );
     
    586586        'autosaveInterval' => AUTOSAVE_INTERVAL,
    587587        'savingText' => __('Saving Draft…'),
    588         'saveAlert' => __('The changes you made will be lost if you navigate away from this page.')
     588        'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'),
     589        'blog_id' => get_current_blog_id(),
    589590    ) );
    590591
Note: See TracChangeset for help on using the changeset viewer.