Make WordPress Core


Ignore:
Timestamp:
02/18/2008 05:11:12 PM (18 years ago)
Author:
ryan
Message:

TinyMCE config enhancements from azaozz. fixes #5896 #5888

File:
1 edited

Legend:

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

    r6877 r6894  
    3030        $this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' );
    3131
    32         // Modify this version when tinyMCE plugins are changed
    33         $mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php');
    34         $this->add( 'tiny_mce', $mce_config, false, '20080209' );
     32        // Let a plugin replace the visual editor
     33        $visual_editor = apply_filters('visual_editor', array('tiny_mce'));
     34        $this->add( 'editor', false, $visual_editor, '20080218' );
     35       
     36        $this->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080208' );
     37       
     38        // Modify this version when tinyMCE plugins are changed.
     39        $mce_version = apply_filters('tiny_mce_version', '20080209');
     40        $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() ) );
    3542       
    3643        $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
     
    475482}
    476483
    477 // These localizations require information that may not be loaded even by init
    478 function wp_just_in_time_script_localization() {
    479     wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) );
    480 }
    481 
    482 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
    483484add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
    484485
Note: See TracChangeset for help on using the changeset viewer.