Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: mce_plugins

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
75      echo "TinyMCE.prototype.loadScript = function() {};\n";
76
77      // Load theme, language pack and theme language packs
78      $theme = apply_filters('mce_theme', 'advanced');
79      echo wp_compact_tinymce_js(file_get_contents(realpath("themes/" . $theme . "/editor_template.js")));
80      echo wp_translate_tinymce_lang(file_get_contents(realpath("themes/" . $theme . "/langs/en.js")));
81      echo wp_translate_tinymce_lang(file_get_contents(realpath("langs/en.js")));
82
83      // Load all plugins and their language packs
84      $plugins = apply_filters('mce_plugins', array('wordpress', 'autosave', 'wphelp'));
85      foreach ($plugins as $plugin) {
86           $pluginFile = realpath("plugins/" . $plugin . "/editor_plugin.js");
87           $languageFile = realpath("plugins/" . $plugin . "/langs/en.js");
88
89           if ($pluginFile)
90                echo file_get_contents($pluginFile);
91
92           if ($languageFile)
93                echo wp_translate_tinymce_lang(file_get_contents($languageFile));