WordPress.org

Make WordPress Core

Changeset 6587


Ignore:
Timestamp:
01/09/08 20:11:13 (7 years ago)
Author:
ryan
Message:

JIT load tinymce localization to avoid load order problems. Props mdawaffe. fixes #5605

File:
1 edited

Legend:

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

    r6584 r6587  
    3535        $mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php'); 
    3636        $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20080105' ); 
    37         $this->localize( 'wp_tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) ); 
    3837 
    3938        $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6'); 
     
    436435} 
    437436 
     437// These localizations require information that may not be loaded even by init 
     438function wp_just_in_time_script_localization() { 
     439    wp_localize_script( 'wp_tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) ); 
     440} 
     441 
     442add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' ); 
    438443add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' ); 
    439444 
Note: See TracChangeset for help on using the changeset viewer.