diff --git a/wp-includes/js/tinymce/plugins/autosave/langs/en.js b/wp-includes/js/tinymce/plugins/autosave/langs/en.js
deleted file mode 100644
index a1849339c..000000000
--- a/wp-includes/js/tinymce/plugins/autosave/langs/en.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// EN lang variables
-
-tinyMCE.addToLang('',{
-autosave_unload_msg : 'The changes you made will be lost if you navigate away from this page.'
-});
diff --git a/wp-includes/js/tinymce/plugins/wordpress/langs/en.js b/wp-includes/js/tinymce/plugins/wordpress/langs/en.js
index 32a5ba576..8002252a6 100644
--- a/wp-includes/js/tinymce/plugins/wordpress/langs/en.js
+++ b/wp-includes/js/tinymce/plugins/wordpress/langs/en.js
@@ -12,7 +12,7 @@ else {
var metaKey = 'Alt';
}
-tinyMCE.addToLang('',{
+tinyMCE.addI18n('',{
wordpress_more_button : 'Split post with More tag (' + metaKey + '+t)',
wordpress_page_button : 'Split post with Page tag',
wordpress_adv_button : 'Show/Hide Advanced Toolbar (' + metaKey + '+v)',
diff --git a/wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js b/wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js
index da29521cc..9eac78d2a 100644
--- a/wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js
+++ b/wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js
@@ -1,57 +1,50 @@
-/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('wphelp', '');
+/* WordPress Help plugin for TinyMCE 3.x */
-function TinyMCE_wphelp_getControlHTML(control_name) {
- switch (control_name) {
- case "wphelp":
- var titleHelp = tinyMCE.getLang('lang_help_button_title');
- var buttons = '';
- var hiddenControls = '
'
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + ''
- + '
';
- return buttons+hiddenControls;
- }
+(function() {
- return "";
-}
+// tinymce.PluginManager.requireLangPack('wphelp');
+
+ tinymce.create('tinymce.plugins.WP_Help', {
+
+ init : function(ed, url) {
+ // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
+ ed.addCommand('wpHelp', function() {
+ ed.windowManager.open({
+ file : tinymce.baseURL + '/wp-mce-help.php',
+ width : 450,
+ height : 420,
+ inline : 1
+ }, {
+ plugin_url : url, // Plugin absolute URL
+ resizable : 'yes',
+ scrollbars : 'yes'
+ });
+ });
-function TinyMCE_wphelp_execCommand(editor_id, element, command, user_interface, value) {
+ // Register example button
+ ed.addButton('wphelp', {
+ title : ed.getLang('advanced.help_desc'),
+ cmd : 'wpHelp',
+ image : url + '/images/help.gif'
+ });
- // Handle commands
- switch (command) {
- case "mceWordPressHelp":
- var template = new Array();
-
- template['file'] = tinyMCE.baseURL + '/wp-mce-help.php';
- template['width'] = 480;
- template['height'] = 380;
-
- args = {
- resizable : 'yes',
- scrollbars : 'yes'
+ // Add a node change handler, selects the button in the UI when a image is selected
+ ed.onNodeChange.add(function(ed, cm, n) {
+ cm.setActive('wphelp', n.nodeName == 'IMG');
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'WordPress Help plugin',
+ author : 'WordPress',
+ authorurl : 'http://wordpress.org',
+ infourl : 'http://wordpress.org',
+ version : "3.0"
};
+ }
+ });
- tinyMCE.openWindow(template, args);
- return true;
- }
-
- // Pass to next handler in chain
- return false;
-}
+ // Register plugin
+ tinymce.PluginManager.add('wphelp', tinymce.plugins.WP_Help);
+})();
diff --git a/wp-includes/js/tinymce/plugins/wphelp/langs/en.js b/wp-includes/js/tinymce/plugins/wphelp/langs/en.js
deleted file mode 100644
index 8c5b35ad8..000000000
--- a/wp-includes/js/tinymce/plugins/wphelp/langs/en.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// EN lang variables
-
-tinyMCE.addToLang('',{
-help_button_title : 'Help (Alt+h)'
-});
diff --git a/wp-includes/js/tinymce/tiny_mce_config.php b/wp-includes/js/tinymce/tiny_mce_config.php
index 9ad49f3ee..9b6e02729 100644
--- a/wp-includes/js/tinymce/tiny_mce_config.php
+++ b/wp-includes/js/tinymce/tiny_mce_config.php
@@ -27,7 +27,7 @@
$invalid_elements = apply_filters('mce_invalid_elements', '');
- $plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media' );
+ $plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'wphelp', 'media' );
$plugins = apply_filters('mce_plugins', $plugins);
$plugins = implode($plugins, ',');
diff --git a/wp-includes/js/tinymce/wp-mce-help.php b/wp-includes/js/tinymce/wp-mce-help.php
index 9bcdc5c8f..adf9b1fcd 100644
--- a/wp-includes/js/tinymce/wp-mce-help.php
+++ b/wp-includes/js/tinymce/wp-mce-help.php
@@ -6,22 +6,22 @@ header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
+