WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/31/2008 06:34:43 AM (13 years ago)
Author:
azaozz
Message:

Saving/restoring the user interface state, see #7654

File:
1 edited

Legend:

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

    r8782 r8784  
    3636 */
    3737function wp_default_scripts( &$scripts ) {
     38    global $current_user;
     39   
    3840    if (!$guessurl = site_url())
    3941        $guessurl = wp_guess_url();
     42   
     43    $userid = isset($current_user) ? $current_user->ID : 0;
    4044    $scripts->base_url = $guessurl;
    4145    $scripts->default_version = get_bloginfo( 'version' );
    4246
    43     $scripts->add( 'common', '/wp-admin/js/common.js', array('jquery'), '20080318' );
     47    $scripts->add( 'common', '/wp-admin/js/common.js', array('jquery', 'user-settings'), '20080318' );
    4448    $scripts->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' );
    4549
     
    6670
    6771    // Modify this version when tinyMCE plugins are changed.
    68     $mce_version = apply_filters('tiny_mce_version', '20080730');
     72    $mce_version = apply_filters('tiny_mce_version', '20080830');
    6973    $scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
    7074
     
    243247
    244248        $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );
     249       
     250        $scripts->add( 'user-settings', '/wp-admin/js/user-settings.js', array(), '20080829' );
     251        $scripts->localize( 'user-settings', 'userSettings', array(
     252            'url' => SITECOOKIEPATH,
     253            'uid' => $userid,
     254            'time' => time()
     255        ) );
    245256    }
    246257}
     
    335346 */
    336347function wp_just_in_time_script_localization() {
    337     wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) );
    338348    wp_localize_script( 'autosave', 'autosaveL10n', array(
    339349        'autosaveInterval' => AUTOSAVE_INTERVAL,
Note: See TracChangeset for help on using the changeset viewer.