+ if ( in_array($name, $loaded_langs) ) {
+ $plugurl = dirname($url);
+ $ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";
+ }
+ $ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";
+ }
+}
+$plugins = implode($plugins, ',');
+
+$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'link', 'unlink', 'image', 'wp_more', '|', 'spellchecker', 'fullscreen', 'wp_adv' ));
+$mce_buttons = implode($mce_buttons, ',');
+
+$mce_buttons_2 = apply_filters('mce_buttons_2', array('formatselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' ));
+$mce_buttons_2 = implode($mce_buttons_2, ',');
+
+$mce_buttons_3 = apply_filters('mce_buttons_3', array());
+$mce_buttons_3 = implode($mce_buttons_3, ',');
+
+$mce_buttons_4 = apply_filters('mce_buttons_4', array());
+$mce_buttons_4 = implode($mce_buttons_4, ',');
+
+// TinyMCE init settings
+$initArray = array (
+ 'mode' => 'none',
+ 'onpageload' => 'wpEditorInit',
+ 'width' => '100%',
+ 'theme' => 'advanced',
+ 'skin' => 'wp_theme',
+ 'theme_advanced_buttons1' => "$mce_buttons",
+ 'theme_advanced_buttons2' => "$mce_buttons_2",
+ 'theme_advanced_buttons3' => "$mce_buttons_3",
+ 'theme_advanced_buttons4' => "$mce_buttons_4",
+ 'language' => "$mce_locale",
+ 'spellchecker_languages' => "$mce_spellchecker_languages",
+ 'theme_advanced_toolbar_location' => 'top',
+ 'theme_advanced_toolbar_align' => 'left',
+ 'theme_advanced_statusbar_location' => 'bottom',
+ 'theme_advanced_resizing' => true,
+ 'theme_advanced_resize_horizontal' => false,
+ 'dialog_type' => 'modal',
+ 'relative_urls' => false,
+ 'remove_script_host' => false,
+ 'convert_urls' => false,
+ 'apply_source_formatting' => false,
+ 'remove_linebreaks' => true,
+ 'paste_convert_middot_lists' => true,
+ 'paste_remove_spans' => true,
+ 'paste_remove_styles' => true,
+ 'gecko_spellcheck' => true,
+ 'entities' => '38,amp,60,lt,62,gt',
+ 'accessibility_focus' => false,
+ 'tab_focus' => ':next',
+ 'content_css' => "$mce_css",
+ 'save_callback' => 'switchEditors.saveCallback',
+ 'plugins' => "$plugins",
+ // pass-through the settings for compression and caching, so they can be changed with "tiny_mce_before_init"
+ 'disk_cache' => true,
+ 'compress' => true,
+ 'old_cache_max' => '1' // number of cache files to keep
+);
+
+// For people who really REALLY know what they're doing with TinyMCE
+// You can modify initArray to add, remove, change elements of the config before tinyMCE.init (changed from action to filter)
+$initArray = apply_filters('tiny_mce_before_init', $initArray);