WordPress.org

Make WordPress Core

Changeset 6971


Ignore:
Timestamp:
02/22/2008 04:02:09 AM (10 years ago)
Author:
ryan
Message:

Restore JIT script localization. Props azaozz. fixes #5921

File:
1 edited

Legend:

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

    r6959 r6971  
    3939        $mce_version = apply_filters('tiny_mce_version', '20080221');
    4040        $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
    41         $this->localize( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) );
    4241       
    4342        $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
     
    485484}
    486485
     486// These localizations require information that may not be loaded even by init
     487function wp_just_in_time_script_localization() {
     488    wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) );
     489}
     490
     491add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
    487492add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
    488493
Note: See TracChangeset for help on using the changeset viewer.