-1) { // Write main script and patch some things if ($index == 0) { echo file_get_contents(realpath("tiny_mce" . $suffix . ".js")); echo "\n\n"; echo "TinyMCE.prototype.loadScript = function() {};\n"; } // WP $lang = $language = 'en'; echo "\n/* WP Cancels all TinyMCE language handling */\n"; echo "TinyMCE.prototype.importThemeLanguagePack = function() {};\n"; echo "TinyMCE.prototype.importPluginLanguagePack = function() {};\n\n"; // Do init based on index // WP echo "tinyMCE.init(tinyMCECompressed.configs[" . $index . "]);\n\n"; // Load theme, language pack and theme language packs if ($theme) { echo file_get_contents(realpath("themes/" . $theme . "/editor_template" . $suffix . ".js")); echo wp_translate_tinymce_lang(file_get_contents(realpath("themes/" . $theme . "/langs/" . $lang . ".js"))); } if ($language) echo wp_translate_tinymce_lang(file_get_contents(realpath("langs/" . $language . ".js"))); // Load all plugins and their language packs $plugins = explode(",", $plugins); foreach ($plugins as $plugin) { $pluginFile = realpath("plugins/" . $plugin . "/editor_plugin" . $suffix . ".js"); $languageFile = realpath("plugins/" . $plugin . "/langs/" . $lang . ".js"); if ($pluginFile) echo file_get_contents($pluginFile); if ($languageFile) echo wp_translate_tinymce_lang(file_get_contents($languageFile)); } die; } ?> function TinyMCECompressed() { this.configs = new Array(); this.loadedFiles = new Array(); } TinyMCECompressed.prototype.init = function(settings) { var elements = document.getElementsByTagName('script'); var scriptURL = ""; for (var i=0; i'); } TinyMCECompressed.prototype.getOnce = function(str) { var ar = str.split(','); for (var i=0; i