Changeset 6959 for trunk/wp-includes/js/tinymce/tiny_mce_config.php
- Timestamp:
- 02/21/2008 09:40:25 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/js/tinymce/tiny_mce_config.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/tinymce/tiny_mce_config.php
r6900 r6959 63 63 /* 64 64 The following filter takes an associative array of external plugins for TinyMCE in the form "name" => "url". 65 It adds the plugin's name (including the required dash)to TinyMCE's plugins init and the call to PluginManager to load the plugin.65 It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin. 66 66 The url should be absolute and should include the js file name to be loaded. 67 67 Example: array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' ). … … 72 72 $ext_plugins = "\n"; 73 73 foreach ( $mce_external_plugins as $name => $url ) { 74 $plugins[] = '-' .$name;74 $plugins[] = $name; 75 75 if ( $https ) str_replace('http://', 'https://', $url); 76 76 … … 151 151 152 152 // Settings for the gzip compression and cache 153 $cache_path = dirname(__FILE__); // Cache path, this is where the .gz files will be stored153 $cache_path = dirname(__FILE__); // ABSPATH . 'wp-content/uploads/js_cache'; // Cache path, this is where the .gz files will be stored 154 154 $cache_ext = '.js'; 155 155 … … 160 160 $initArray['disk_cache'] = $initArray['compress'] = $initArray['old_cache_max'] = null; 161 161 unset( $initArray['disk_cache'], $initArray['compress'], $initArray['old_cache_max'] ); 162 163 $isIE5 = ( ( $msie = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) && ( (int) substr( $_SERVER['HTTP_USER_AGENT'], $msie + 5, 3 ) < 6 ) ) ? true : false; 164 if ( $isIE5 ) $compress = false; 162 165 163 166 $plugins = explode( ',', $initArray['plugins'] ); … … 166 169 $enc = $cacheKey = $suffix = $mce_options = ''; 167 170 168 // Custom extra javascripts to pack169 $custom_js = array(); //$custom_js = apply_filters('tinymce_custom_js', array());170 171 171 // Check if supports gzip 172 172 if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { … … 187 187 foreach ( $initArray as $v ) 188 188 $cacheKey .= $v; 189 190 foreach ( $custom_js as $file )191 $cacheKey .= $file;192 189 193 190 $cacheKey = md5( $cacheKey ); … … 234 231 $content .= getFileContents( 'plugins/' . $plugin . '/editor_plugin' . $suffix . '.js' ); 235 232 236 // Add custom files237 foreach ( $custom_js as $file )238 $content .= getFileContents($file);239 240 233 // Add external plugins and init 241 234 $content .= $ext_plugins . 'tinyMCE.init({' . $mce_options . '});'; // $mce_deprecated2 . … … 253 246 if ( '' != $cacheKey && $cache_path ) { 254 247 if ( $old_cache_max ) { 255 $old_keys = getFileContents('tinymce_compressed' . $cache_ext . '_key'); 248 $keys_file = $cache_path . '/tinymce_compressed' . $cache_ext . '_key'; 249 $old_keys = getFileContents($keys_file); 256 250 257 251 if ( '' != $old_keys ) { … … 270 264 $keys_ar = array_slice( $keys_ar, 0, $old_cache_max ); 271 265 $cacheKey = trim( implode( "\n", $keys_ar ) ); 272 273 266 } 274 267 275 putFileContents( 'tinymce_compressed' . $cache_ext . '_key', $cacheKey );268 putFileContents( $keys_file, $cacheKey ); 276 269 } 277 270
Note: See TracChangeset
for help on using the changeset viewer.