mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-25 10:38:11 +01:00
6bef16a574
git-svn-id: http://svn.automattic.com/wordpress/trunk@6894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
45 lines
916 B
JavaScript
45 lines
916 B
JavaScript
tinyMCEPreInit.start = function() {
|
|
var t = this, each = tinymce.each, s = t.settings, sl = tinymce.ScriptLoader, ln = s.languages.split(',');
|
|
|
|
function load(u, sp) {
|
|
var o;
|
|
|
|
if (!sp)
|
|
u = t.base + u;
|
|
|
|
o = {url : u, state : 2};
|
|
sl.queue.push(o);
|
|
sl.lookup[o.url] = o;
|
|
};
|
|
|
|
// Add core languages
|
|
each (ln, function(c) {
|
|
if (c)
|
|
load('/langs/' + c + '.js');
|
|
});
|
|
|
|
// Add themes with languages
|
|
each(s.themes.split(','), function(n) {
|
|
if (n) {
|
|
load('/themes/' + n + '/editor_template' + t.suffix + '.js');
|
|
|
|
each (ln, function(c) {
|
|
if (c)
|
|
load('/themes/' + n + '/langs/' + c + '.js');
|
|
});
|
|
}
|
|
});
|
|
|
|
// Add plugins with languages
|
|
each(s.plugins.split(','), function(n) {
|
|
if (n && n.charAt(0) != '-') {
|
|
load('/plugins/' + n + '/editor_plugin' + t.suffix + '.js');
|
|
|
|
each (ln, function(c) {
|
|
if (c)
|
|
load('/plugins/' + n + '/langs/' + c + '.js');
|
|
});
|
|
}
|
|
});
|
|
};
|