tinyMCE - loading language files of external plugins not working if file_get_contents is disabled
|Reported by:||mediameets||Owned by:|
|Severity:||normal||Keywords:||tinymce, external plugins, language file, file_get_contents|
On our server the function "file_get_contents" is disabled for security reasons.
In my case i wanted to add the plugin "table" to the tinyMCE. I uploaded everything in the right folders and used the filters "mce_external_plugins", "mce_buttons_3" and "mce_external_languages" in the right way. Because the "foreach" in file "/wp-admin/includes/post.php", line 1403 couldn't load the contents of the language file, because of the disabled function explained above, no language strings where shown.
To avoid this, i suggest to change line 1440 (same file) to:
if ( ! empty($strings) )
$ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";
So in this case, the tinyMCE ScriptLoader doesn't mark the language-file as "done" and loads it correct. Everthing works fine and the language strings where shown.