Make WordPress Core


Ignore:
Timestamp:
03/04/2008 12:07:29 AM (18 years ago)
Author:
ryan
Message:

Update to TinyMCE 3.03. Define shortcuts. Relocate cached TMCE file. Props azaozz. fixes #6084

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/tinymce/tiny_mce_config.php

    r7025 r7147  
    8383$mce_buttons = implode($mce_buttons, ',');
    8484
    85 $mce_buttons_2 = apply_filters('mce_buttons_2', array('formatselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', '|', 'removeformat', 'cleanup', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' ));
     85$mce_buttons_2 = apply_filters('mce_buttons_2', array('formatselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' ));
    8686$mce_buttons_2 = implode($mce_buttons_2, ',');
    8787
     
    115115    'remove_script_host' => false,
    116116    'fix_list_elements' => true,
    117 //  'fix_table_elements' => true,
     117    'fix_table_elements' => true,
    118118    'gecko_spellcheck' => true,
    119119    'entities' => '38,amp,60,lt,62,gt',
     
    124124    'plugins' => "$plugins",
    125125    // pass-through the settings for compression and caching, so they can be changed with "tiny_mce_before_init"
    126     'disk_cache' => false,
     126    'disk_cache' => true,
    127127    'compress' => true,
    128128    'old_cache_max' => '1' // number of cache files to keep
     
    142142ob_end_clean();
    143143
    144 /*
    145 // Do we need to support this? Most likely will break TinyMCE 3...
    146 ob_start();
    147 do_action('tinymce_before_init');
    148 $mce_deprecated2 = ob_get_contents() || '';
    149 ob_end_clean();
    150 */
    151 
    152144// Settings for the gzip compression and cache
    153 $cache_path = dirname(__FILE__); // ABSPATH . 'wp-content/uploads/js_cache'; // Cache path, this is where the .gz files will be stored
    154 $cache_ext = '.js';
    155 
    156145$disk_cache = ( ! isset($initArray['disk_cache']) || false == $initArray['disk_cache'] ) ? false : true;
    157146$compress = ( ! isset($initArray['compress']) || false == $initArray['compress'] ) ? false : true;
     
    163152$isIE5 = ( ( $msie = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) && ( (int) substr( $_SERVER['HTTP_USER_AGENT'], $msie + 5, 3 ) < 6 ) ) ? true : false;
    164153if ( $isIE5 ) $compress = false;
     154
     155// Cache path, this is where the .gz files will be stored
     156$cache_path = ABSPATH . 'wp-content/uploads/js_cache';
     157if ( $disk_cache && ! is_dir($cache_path) )
     158    $disk_cache = mkdir($cache_path);
     159
     160$cache_ext = '.js';
    165161
    166162$plugins = explode( ',', $initArray['plugins'] );
     
    180176
    181177// Setup cache info
    182 if ( $disk_cache && $cache_path ) {
     178if ( $disk_cache ) {
    183179
    184180    $ver = isset($_GET['ver']) ? (int) $_GET['ver'] : '';
     
    232228
    233229// Add external plugins and init
    234 $content .= $ext_plugins . 'tinyMCE.init({' . $mce_options . '});'; // $mce_deprecated2 .
     230$content .= $ext_plugins . 'tinyMCE.init({' . $mce_options . '});';
    235231
    236232// Generate GZIP'd content
     
    244240
    245241// Write file
    246 if ( '' != $cacheKey && $cache_path ) {
     242if ( '' != $cacheKey ) {
    247243    if ( $old_cache_max ) {
    248244        $keys_file = $cache_path . '/tinymce_compressed' . $cache_ext . '_key';
Note: See TracChangeset for help on using the changeset viewer.