Changeset 6726 for trunk/wp-includes/js/tinymce/tiny_mce_gzip.php
- Timestamp:
- 02/05/2008 06:47:27 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/tinymce/tiny_mce_gzip.php
r6694 r6726 13 13 //error_reporting(E_ALL); 14 14 @require_once('../../../wp-config.php'); // For get_bloginfo(). 15 15 16 16 // Headers 17 17 $expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache … … 73 73 $suffix = getParam( 'suffix', '_src' ) == '_src' ? '_src' : ''; 74 74 $cachePath = realpath('.'); // Cache path, this is where the .gz files will be stored 75 75 76 76 $content = ''; 77 77 $encodings = array(); … … 79 79 $enc = ''; 80 80 $cacheKey = ''; 81 81 82 82 // WP. Language handling could be improved... Concat all translated langs files and store in /wp-content/languages as .mo? 83 83 $theme = getParam( 'theme', 'advanced' ); 84 84 $themes = array($theme); 85 85 86 86 $language = getParam( 'language', 'en' ); 87 87 $languages = array($language); 88 88 89 89 if ( $language != strtolower($language) ) 90 90 $languages[] = strtolower($language); 91 91 92 92 if ( $language != substr($language, 0, 2) ) 93 93 $languages[] = substr($language, 0, 2); 94 94 95 95 $diskCache = false; 96 96 $isJS = true; … … 159 159 foreach ( $languages as $lang ) 160 160 $lang_content .= getFileContents('langs/' . $lang . '.js'); 161 161 162 162 if ( empty($lang_content) && file_exists('langs/en.js') ) 163 163 $lang_content .= getFileContents('langs/en.js'); 164 164 165 165 $content .= $lang_content; 166 166 … … 172 172 foreach ( $languages as $lang ) 173 173 $lang_content .= getFileContents( 'themes/' . $theme . '/langs/' . $lang . '.js' ); 174 174 175 175 if ( empty($lang_content) && file_exists( 'themes/' . $theme . '/langs/en.js' ) ) 176 176 $lang_content .= getFileContents( 'themes/' . $theme . '/langs/en.js' ); 177 177 178 178 $content .= $lang_content; 179 179 } … … 186 186 foreach ( $languages as $lang ) 187 187 $lang_content .= getFileContents( 'plugins/' . $plugin . '/langs/' . $lang . '.js' ); 188 188 189 189 if ( empty($lang_content) && file_exists( 'plugins/' . $plugin . '/langs/en.js' ) ) 190 190 $lang_content .= getFileContents( 'plugins/' . $plugin . '/langs/en.js' ); 191 191 192 192 $content .= $lang_content; 193 193 } … … 236 236 suffix : '' 237 237 }, 238 238 239 239 opt : {}, 240 240 241 241 init : function(arr, cb) { 242 242 var t = this, n, s, nl = document.getElementsByTagName('script'); 243 243 244 244 t.opt = arr; 245 245 246 246 t.settings.themes = arr.theme; 247 t.settings.plugins = arr.plugins; 247 t.settings.plugins = arr.plugins; 248 248 t.settings.languages = arr.language; 249 249 s = t.settings; … … 257 257 } 258 258 tinyMCEPreInit.base = t.baseURL; 259 259 260 260 if (!t.coreLoaded) 261 261 t.loadScripts(1, s.themes, s.plugins, s.languages); … … 275 275 return x; 276 276 }; 277 277 278 278 // Build query string 279 279 q = 'load=true&js=true&diskcache=' + (s.disk_cache ? 'true' : 'false') + '&core=' + (co ? 'true' : 'false') + '&suffix=' + escape(s.suffix) + '&themes=' + escape(th) + '&plugins=' + escape(pl) + '&languages=' + escape(la); … … 281 281 if (co) 282 282 t.coreLoaded = 1; 283 283 284 284 // Easier to debug with this... 285 285 // document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + t.baseURL + '/' + s.page_name + '?' + q + '"></script>');
Note: See TracChangeset
for help on using the changeset viewer.