Fallback to loading english for tinyMCE if requested locale is not there. see #3882
git-svn-id: http://svn.automattic.com/wordpress/trunk@5114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3eb1182967
commit
4400fe6e32
|
@ -119,23 +119,35 @@ if ($index > -1) {
|
|||
$content .= "tinyMCECompressed.loadPlugins();";
|
||||
|
||||
// Add core languages
|
||||
$lang_content = '';
|
||||
foreach ($languages as $lang)
|
||||
$content .= getFileContents("langs/" . $lang . ".js");
|
||||
$lang_content .= getFileContents("langs/" . $lang . ".js");
|
||||
if ( empty($lang_content) )
|
||||
$lang_content .= getFileContents("langs/en.js");
|
||||
$content .= $lang_content;
|
||||
|
||||
// Add themes
|
||||
foreach ($themes as $theme) {
|
||||
$content .= wp_compact_tinymce_js(getFileContents( "themes/" . $theme . "/editor_template" . $suffix . ".js"));
|
||||
|
||||
$lang_content = '';
|
||||
foreach ($languages as $lang)
|
||||
$content .= getFileContents("themes/" . $theme . "/langs/" . $lang . ".js");
|
||||
$lang_content .= getFileContents("themes/" . $theme . "/langs/" . $lang . ".js");
|
||||
if ( empty($lang_content) )
|
||||
$lang_content .= getFileContents("themes/" . $theme . "/langs/en.js");
|
||||
$content .= $lang_content;
|
||||
}
|
||||
|
||||
// Add plugins
|
||||
foreach ($plugins as $plugin) {
|
||||
$content .= getFileContents("plugins/" . $plugin . "/editor_plugin" . $suffix . ".js");
|
||||
|
||||
$lang_content = '';
|
||||
foreach ($languages as $lang)
|
||||
$content .= getFileContents("plugins/" . $plugin . "/langs/" . $lang . ".js");
|
||||
$lang_content .= getFileContents("plugins/" . $plugin . "/langs/" . $lang . ".js");
|
||||
if ( empty($lang_content) )
|
||||
$lang_content .= getFileContents("plugins/" . $plugin . "/langs/en.js");
|
||||
$content .= $lang_content;
|
||||
}
|
||||
|
||||
// Add custom files
|
||||
|
|
|
@ -15,7 +15,7 @@ class WP_Scripts {
|
|||
$this->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' );
|
||||
$this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3517' );
|
||||
$this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' );
|
||||
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20070325' );
|
||||
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20070326' );
|
||||
$mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php');
|
||||
$this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070225' );
|
||||
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0-0');
|
||||
|
|
Loading…
Reference in New Issue