summaryrefslogtreecommitdiffstats
path: root/wp-includes/js/tinymce/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/js/tinymce/plugins')
-rw-r--r--wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js30
-rw-r--r--wp-includes/js/tinymce/plugins/autosave/langs/en.js5
-rw-r--r--wp-includes/js/tinymce/plugins/directionality/images/ltr.gifbin155 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/directionality/images/rtl.gifbin153 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/directionality/langs/en.js6
-rw-r--r--wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm111
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css69
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/images/spacer.gifbin43 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/images/window_close.gifbin110 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/images/window_maximize.gifbin111 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/images/window_minimize.gifbin112 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/images/window_resize.gifbin74 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js453
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gifbin0 -> 818 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gifbin0 -> 280 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gifbin0 -> 989 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gifbin0 -> 915 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gifbin0 -> 911 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gifbin0 -> 57 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gifbin0 -> 769 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gifbin0 -> 92 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css125
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/template.htm387
-rw-r--r--wp-includes/js/tinymce/plugins/media/css/content.css6
-rw-r--r--wp-includes/js/tinymce/plugins/media/css/media.css68
-rw-r--r--wp-includes/js/tinymce/plugins/media/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/media/img/flash.gifbin0 -> 241 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/media/img/flv_player.swfbin0 -> 11668 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/media/img/quicktime.gifbin0 -> 303 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/media/img/realmedia.gifbin0 -> 439 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/media/img/shockwave.gifbin0 -> 387 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/media/img/trans.gifbin0 -> 43 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/media/img/windowsmedia.gifbin0 -> 415 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/media/js/embed.js73
-rw-r--r--wp-includes/js/tinymce/plugins/media/js/media.js621
-rw-r--r--wp-includes/js/tinymce/plugins/media/media.htm824
-rw-r--r--wp-includes/js/tinymce/plugins/paste/images/pastetext.gifbin294 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/paste/images/pasteword.gifbin299 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/paste/images/selectall.gifbin205 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/paste/js/pastetext.js (renamed from wp-includes/js/tinymce/plugins/paste/jscripts/pastetext.js)80
-rw-r--r--wp-includes/js/tinymce/plugins/paste/js/pasteword.js (renamed from wp-includes/js/tinymce/plugins/paste/jscripts/pasteword.js)108
-rw-r--r--wp-includes/js/tinymce/plugins/paste/langs/en.js10
-rw-r--r--wp-includes/js/tinymce/plugins/safari/blank.htm1
-rw-r--r--wp-includes/js/tinymce/plugins/safari/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php158
-rwxr-xr-xwp-includes/js/tinymce/plugins/spellchecker/classes/HttpClient.class.php339
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php81
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php112
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php61
-rwxr-xr-xwp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php126
-rwxr-xr-xwp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php64
-rwxr-xr-xwp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php121
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php595
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php268
-rwxr-xr-xwp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css35
-rwxr-xr-xwp-includes/js/tinymce/plugins/spellchecker/images/spellchecker.gifbin591 -> 0 bytes
-rw-r--r--[-rwxr-xr-x]wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif (renamed from wp-includes/js/tinymce/plugins/spellchecker/images/wline.gif)bin46 -> 46 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/includes/general.php98
-rwxr-xr-xwp-includes/js/tinymce/plugins/spellchecker/langs/en.js15
-rw-r--r--wp-includes/js/tinymce/plugins/spellchecker/rpc.php75
-rwxr-xr-xwp-includes/js/tinymce/plugins/spellchecker/tinyspell.php164
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/css/content.css15
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/help.gif (renamed from wp-includes/js/tinymce/plugins/wordpress/images/help.gif)bin295 -> 295 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/more.gif (renamed from wp-includes/js/tinymce/plugins/wordpress/images/more.gif)bin108 -> 108 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif (renamed from wp-includes/js/tinymce/plugins/wordpress/images/more_bug.gif)bin146 -> 146 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/page.gif (renamed from wp-includes/js/tinymce/plugins/wordpress/images/page.gif)bin108 -> 108 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif (renamed from wp-includes/js/tinymce/plugins/wordpress/images/page_bug.gif)bin180 -> 180 bytes
-rw-r--r--[-rwxr-xr-x]wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif (renamed from wp-includes/js/tinymce/plugins/wordpress/images/toolbars.gif)bin260 -> 260 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/img/trans.gifbin0 -> 43 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/langs/en.js37
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/wordpress.css81
-rw-r--r--wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js57
-rw-r--r--wp-includes/js/tinymce/plugins/wphelp/images/help.gifbin295 -> 0 bytes
-rw-r--r--wp-includes/js/tinymce/plugins/wphelp/langs/en.js5
75 files changed, 3780 insertions, 1707 deletions
diff --git a/wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js
deleted file mode 100644
index 102d69b..0000000
--- a/wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('autosave', 'en,sv,cs,he,no,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,fi,cy,es,is,pl');
-
-function TinyMCE_autosave_getInfo() {
- return {
- longname : 'Auto save',
- author : 'Moxiecode Systems',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',
- version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
- };
-};
-
-function TinyMCE_autosave_beforeUnloadHandler() {
- var msg = tinyMCE.getLang("lang_autosave_unload_msg");
-
- var anyDirty = false;
- for (var n in tinyMCE.instances) {
- var inst = tinyMCE.instances[n];
- if (!tinyMCE.isInstance(inst))
- continue;
-
- if (inst.isDirty())
- return msg;
- }
-
- return;
-}
-
-window.onbeforeunload = TinyMCE_autosave_beforeUnloadHandler;
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 0195133..0000000
--- 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/directionality/images/ltr.gif b/wp-includes/js/tinymce/plugins/directionality/images/ltr.gif
deleted file mode 100644
index ac8f30c..0000000
--- a/wp-includes/js/tinymce/plugins/directionality/images/ltr.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/directionality/images/rtl.gif b/wp-includes/js/tinymce/plugins/directionality/images/rtl.gif
deleted file mode 100644
index 0348f99..0000000
--- a/wp-includes/js/tinymce/plugins/directionality/images/rtl.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/directionality/langs/en.js b/wp-includes/js/tinymce/plugins/directionality/langs/en.js
deleted file mode 100644
index 5b392fe..0000000
--- a/wp-includes/js/tinymce/plugins/directionality/langs/en.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// UK lang variables
-
-tinyMCE.addToLang('',{
-directionality_ltr_desc : 'Direction left to right (Alt-.)',
-directionality_rtl_desc : 'Direction right to left (Alt-,)'
-});
diff --git a/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js b/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js
new file mode 100644
index 0000000..6a21ea7
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var DOM=tinymce.DOM;tinymce.create('tinymce.plugins.FullScreenPlugin',{init:function(ed,url){var t=this,s={},vp;t.editor=ed;ed.addCommand('mceFullScreen',function(){var win,de=document.documentElement;if(ed.getParam('fullscreen_is_enabled')){if(ed.getParam('fullscreen_new_window'))closeFullscreen();else{window.setTimeout(function(){tinymce.dom.Event.remove(window,'resize',t.resizeFunc);tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent({format:'raw'}),{format:'raw'});tinyMCE.remove(ed);DOM.remove('mce_fullscreen_container');de.style.overflow=ed.getParam('fullscreen_html_overflow');DOM.setStyle(document.body,'overflow',ed.getParam('fullscreen_overflow'));window.scrollTo(ed.getParam('fullscreen_scrollx'),ed.getParam('fullscreen_scrolly'));tinyMCE.settings=tinyMCE.oldSettings;},10);}return;}if(ed.getParam('fullscreen_new_window')){win=window.open(url+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{win.resizeTo(screen.availWidth,screen.availHeight);}catch(e){}}else{tinyMCE.oldSettings=tinyMCE.settings;s.fullscreen_overflow=DOM.getStyle(document.body,'overflow',1)||'auto';s.fullscreen_html_overflow=DOM.getStyle(de,'overflow',1);vp=DOM.getViewPort();s.fullscreen_scrollx=vp.x;s.fullscreen_scrolly=vp.y;if(tinymce.isOpera&&s.fullscreen_overflow=='visible')s.fullscreen_overflow='auto';if(tinymce.isIE&&s.fullscreen_overflow=='scroll')s.fullscreen_overflow='auto';if(s.fullscreen_overflow=='0px')s.fullscreen_overflow='';DOM.setStyle(document.body,'overflow','hidden');de.style.overflow='hidden';vp=DOM.getViewPort();window.scrollTo(0,0);if(tinymce.isIE)vp.h-=1;n=DOM.add(document.body,'div',{id:'mce_fullscreen_container',style:'position:absolute;top:0;left:0;width:'+vp.w+'px;height:'+vp.h+'px;z-index:150;'});DOM.add(n,'div',{id:'mce_fullscreen'});tinymce.each(ed.settings,function(v,n){s[n]=v;});s.id='mce_fullscreen';s.width=n.clientWidth;s.height=n.clientHeight-15;s.fullscreen_is_enabled=true;s.fullscreen_editor_id=ed.id;s.theme_advanced_resizing=false;s.save_onsavecallback=function(){ed.setContent(tinyMCE.get(s.id).getContent({format:'raw'}),{format:'raw'});ed.execCommand('mceSave');};tinymce.each(ed.getParam('fullscreen_settings'),function(v,k){s[k]=v;});if(s.theme_advanced_toolbar_location==='external')s.theme_advanced_toolbar_location='top';t.fullscreenEditor=new tinymce.Editor('mce_fullscreen',s);t.fullscreenEditor.onInit.add(function(){t.fullscreenEditor.setContent(ed.getContent());});t.fullscreenEditor.render();tinyMCE.add(t.fullscreenEditor);t.fullscreenElement=new tinymce.dom.Element('mce_fullscreen_container');t.fullscreenElement.update();t.resizeFunc=tinymce.dom.Event.add(window,'resize',function(){var vp=tinymce.DOM.getViewPort();t.fullscreenEditor.theme.resizeTo(vp.w,vp.h);});}});ed.addButton('fullscreen',{title:'fullscreen.desc',cmd:'mceFullScreen'});ed.onNodeChange.add(function(ed,cm){cm.setActive('fullscreen',ed.getParam('fullscreen_is_enabled'));});},getInfo:function(){return{longname:'Fullscreen',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('fullscreen',tinymce.plugins.FullScreenPlugin);})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm b/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm
new file mode 100644
index 0000000..c79ecd0
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm
@@ -0,0 +1,111 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <script type="text/javascript" src="../../tiny_mce.js"></script>
+ <script type="text/javascript">
+ function patchCallback(settings, key) {
+ if (settings[key])
+ settings[key] = "window.opener." + settings[key];
+ }
+
+ var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings;
+
+ // Clone array
+ for (var n in paSe)
+ settings[n] = paSe[n];
+
+ // Override options for fullscreen
+ for (var n in paSe.fullscreen_settings)
+ settings[n] = paSe.fullscreen_settings[n];
+
+ // Patch callbacks, make them point to window.opener
+ patchCallback(settings, 'urlconverter_callback');
+ patchCallback(settings, 'insertlink_callback');
+ patchCallback(settings, 'insertimage_callback');
+ patchCallback(settings, 'setupcontent_callback');
+ patchCallback(settings, 'save_callback');
+ patchCallback(settings, 'onchange_callback');
+ patchCallback(settings, 'init_instance_callback');
+ patchCallback(settings, 'file_browser_callback');
+ patchCallback(settings, 'cleanup_callback');
+ patchCallback(settings, 'execcommand_callback');
+ patchCallback(settings, 'oninit');
+
+ // Set options
+ delete settings.id;
+ settings['mode'] = 'exact';
+ settings['elements'] = 'fullscreenarea';
+ settings['add_unload_trigger'] = false;
+ settings['ask'] = false;
+ settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
+ settings['fullscreen_is_enabled'] = true;
+ settings['fullscreen_editor_id'] = window.opener.tinyMCE.activeEditor.id;
+ settings['theme_advanced_resizing'] = false;
+ settings['strict_loading_mode'] = true;
+
+ settings.save_onsavecallback = function() {
+ window.opener.tinyMCE.activeEditor.setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
+ window.opener.tinyMCE.activeEditor.execCommand('mceSave');
+ window.close();
+ };
+
+ function unloadHandler(e) {
+ moveContent();
+ }
+
+ function moveContent() {
+ window.opener.tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent());
+ }
+
+ function closeFullscreen() {
+ moveContent();
+ window.close();
+ }
+
+ function doParentSubmit() {
+ moveContent();
+
+ if (window.opener.tinyMCE.selectedInstance.formElement.form)
+ window.opener.tinyMCE.selectedInstance.formElement.form.submit();
+
+ window.close();
+
+ return false;
+ }
+
+ function render() {
+ var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
+
+ e.value = window.opener.tinyMCE.activeEditor.getContent();
+
+ vp = dom.getViewPort();
+ settings.width = vp.w;
+ settings.height = vp.h - 15;
+
+ tinymce.dom.Event.add(window, 'resize', function() {
+ var vp = dom.getViewPort();
+
+ tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
+ });
+
+ tinyMCE.init(settings);
+ }
+
+ // Add onunload
+ tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
+ </script>
+ <base target="_self" />
+</head>
+<body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
+<form onsubmit="doParentSubmit();">
+<textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
+</form>
+
+<script type="text/javascript">
+ render();
+</script>
+
+</body>
+</html>
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css b/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css
deleted file mode 100644
index 43be823..0000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Window classes */
-
-.mceWindow {
- position: absolute;
- left: 0;
- top: 0;
- border: 1px solid black;
- background-color: #D4D0C8;
-}
-
-.mceWindowHead {
- background-color: #334F8D;
- width: 100%;
- height: 18px;
- cursor: move;
- overflow: hidden;
-}
-
-.mceWindowBody {
- clear: both;
- background-color: white;
-}
-
-.mceWindowStatusbar {
- background-color: #D4D0C8;
- height: 12px;
- border-top: 1px solid black;
-}
-
-.mceWindowTitle {
- float: left;
- font-family: "MS Sans Serif";
- font-size: 9pt;
- font-weight: bold;
- line-height: 18px;
- color: white;
- margin-left: 2px;
- overflow: hidden;
-}
-
-.mceWindowHeadTools {
- margin-right: 2px;
-}
-
-.mceWindowClose, .mceWindowMinimize, .mceWindowMaximize {
- display: block;
- float: right;
- overflow: hidden;
- margin-top: 2px;
-}
-
-.mceWindowClose {
- margin-left: 2px;
-}
-
-.mceWindowMinimize {
-}
-
-.mceWindowMaximize {
-}
-
-.mceWindowResize {
- display: block;
- float: right;
- overflow: hidden;
- cursor: se-resize;
- width: 12px;
- height: 12px;
-}
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/images/spacer.gif b/wp-includes/js/tinymce/plugins/inlinepopups/images/spacer.gif
deleted file mode 100644
index fc25609..0000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/images/spacer.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_close.gif b/wp-includes/js/tinymce/plugins/inlinepopups/images/window_close.gif
deleted file mode 100644
index 3469e5a..0000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_close.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_maximize.gif b/wp-includes/js/tinymce/plugins/inlinepopups/images/window_maximize.gif
deleted file mode 100644
index fcae73e..0000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_maximize.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_minimize.gif b/wp-includes/js/tinymce/plugins/inlinepopups/images/window_minimize.gif
deleted file mode 100644
index 94f167a..0000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_minimize.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_resize.gif b/wp-includes/js/tinymce/plugins/inlinepopups/images/window_resize.gif
deleted file mode 100644
index 6c402d0..0000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_resize.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js b/wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js
deleted file mode 100644
index 325d293..0000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js
+++ /dev/null
@@ -1,453 +0,0 @@
-/**
- * $Id: mcwindows.js 18 2006-06-29 14:11:23Z spocke $
- *
- * Moxiecode DHTML Windows script.
- *
- * @author Moxiecode
- * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved.
- */
-
-// Windows handler
-function MCWindows() {
- this.settings = new Array();
- this.windows = new Array();
- this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
- this.isGecko = navigator.userAgent.indexOf('Gecko') != -1;
- this.isSafari = navigator.userAgent.indexOf('Safari') != -1;
- this.isMac = navigator.userAgent.indexOf('Mac') != -1;
- this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);
- this.action = "none";
- this.selectedWindow = null;
- this.zindex = 100;
- this.mouseDownScreenX = 0;
- this.mouseDownScreenY = 0;
- this.mouseDownLayerX = 0;
- this.mouseDownLayerY = 0;
- this.mouseDownWidth = 0;
- this.mouseDownHeight = 0;
-};
-
-MCWindows.prototype.init = function(settings) {
- this.settings = settings;
-
- if (this.isMSIE)
- this.addEvent(document, "mousemove", mcWindows.eventDispatcher);
- else
- this.addEvent(window, "mousemove", mcWindows.eventDispatcher);
-
- this.addEvent(document, "mouseup", mcWindows.eventDispatcher);
-};
-
-MCWindows.prototype.getParam = function(name, default_value) {
- var value = null;
-
- value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
-
- // Fix bool values
- if (value == "true" || value == "false")
- return (value == "true");
-
- return value;
-};
-
-MCWindows.prototype.eventDispatcher = function(e) {
- e = typeof(e) == "undefined" ? window.event : e;
-
- if (mcWindows.selectedWindow == null)
- return;
-
- // Switch focus
- if (mcWindows.isGecko && e.type == "mousedown") {
- var elm = e.currentTarget;
-
- for (var n in mcWindows.windows) {
- var win = mcWindows.windows[n];
- if (typeof(win) == 'function')
- continue;
-
- if (win.headElement == elm || win.resizeElement == elm) {
- win.focus();
- break;
- }
- }
- }
-
- switch (e.type) {
- case "mousemove":
- mcWindows.selectedWindow.onMouseMove(e);
- break;
-
- case "mouseup":
- mcWindows.selectedWindow.onMouseUp(e);
- break;
-
- case "mousedown":
- mcWindows.selectedWindow.onMouseDown(e);
- break;
-
- case "focus":
- mcWindows.selectedWindow.onFocus(e);
- break;
- }
-}
-
-MCWindows.prototype.addEvent = function(obj, name, handler) {
- if (this.isMSIE)
- obj.attachEvent("on" + name, handler);
- else
- obj.addEventListener(name, handler, true);
-};
-
-MCWindows.prototype.cancelEvent = function(e) {
- if (this.isMSIE) {
- e.returnValue = false;
- e.cancelBubble = true;
- } else
- e.preventDefault();
-};
-
-MCWindows.prototype.parseFeatures = function(opts) {
- // Cleanup the options
- opts = opts.toLowerCase();
- opts = opts.replace(/;/g, ",");
- opts = opts.replace(/[^0-9a-z=,]/g, "");
-
- var optionChunks = opts.split(',');
- var options = new Array();
-
- options['left'] = 10;
- options['top'] = 10;
- options['width'] = 300;
- options['height'] = 300;
- options['resizable'] = true;
- options['minimizable'] = true;
- options['maximizable'] = true;
- options['close'] = true;
- options['movable'] = true;
-
- if (opts == "")
- return options;
-
- for (var i=0; i<optionChunks.length; i++) {
- var parts = optionChunks[i].split('=');
-
- if (parts.length == 2)
- options[parts[0]] = parts[1];
- }
-
- return options;
-};
-
-MCWindows.prototype.open = function(url, name, features) {
- var win = new MCWindow();
- var winDiv, html = "", id;
-
- features = this.parseFeatures(features);
-
- // Create div
- id = "mcWindow_" + name;
-
- width = parseInt(features['width']);
- height = parseInt(features['height'])-12-19;
-
- if (this.isMSIE)
- width -= 2;
-
- // Setup first part of window
- win.id = id;
- win.url = url;
- win.name = name;
- win.features = features;
- this.windows[name] = win;
-
- iframeWidth = width;
- iframeHeight = height;
-
- // Create inner content
- html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
- html += '<html>';
- html += '<head>';
- html += '<title>Wrapper iframe</title>';
- html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
- html += '<link href="../jscripts/tiny_mce/themes/advanced/css/editor_ui.css" rel="stylesheet" type="text/css" />';
- html += '</head>';
- html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">';
-
- html += '<div id="' + id + '_container" class="mceWindow">';
- html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
- html += ' <div id="' + id + '_title" class="mceWindowTitle"';
- html += ' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;">No name window</div>';
- html += ' <div class="mceWindowHeadTools">';
- html += ' <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" onmousedown="return false;" class="mceWindowClose"><img border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_close.gif" /></a>';
-// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].maximize();" onmousedown="return false;" class="mceWindowMaximize"></a>';
-// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" onmousedown="return false;" class="mceWindowMinimize"></a>';
- html += ' </div>';
- html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">';
- html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" onfocus="parent.mcWindows.windows[\'' + name + '\'].focus();" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe"></iframe></div>';
- html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
- html += '<div id="' + id + '_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();" border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_resize.gif" /></div>';
- html += '</div>';
- html += '</div>';
-
- html += '</body>';
- html += '</html>';
-
- // Create iframe
- this.createFloatingIFrame(id, features['left'], features['top'], features['width'], features['height'], html);
-};
-
-// Gets called when wrapper iframe is initialized
-MCWindows.prototype.onLoad = function(name) {
- var win = mcWindows.windows[name];
- var id = "mcWindow_" + name;
- var wrapperIframe = window.frames[id + "_iframe"].frames[0];
- var wrapperDoc = window.frames[id + "_iframe"].document;
- var doc = window.frames[id + "_iframe"].document;
- var winDiv = document.getElementById("mcWindow_" + name + "_div");
- var realIframe = window.frames[id + "_iframe"].frames[0];
-
- // Set window data
- win.id = "mcWindow_" + name + "_iframe";
- win.winElement = winDiv;
- win.bodyElement = doc.getElementById(id + '_body');
- win.iframeElement = doc.getElementById(id + '_iframe');
- win.headElement = doc.getElementById(id + '_head');
- win.titleElement = doc.getElementById(id + '_title');
- win.resizeElement = doc.getElementById(id + '_resize');
- win.containerElement = doc.getElementById(id + '_container');
- win.left = win.features['left'];
- win.top = win.features['top'];
- win.frame = window.frames[id + '_iframe'].frames[0];
- win.wrapperFrame = window.frames[id + '_iframe'];
- win.wrapperIFrameElement = document.getElementById(id + "_iframe");
-
- // Add event handlers
- mcWindows.addEvent(win.headElement, "mousedown", mcWindows.eventDispatcher);
- mcWindows.addEvent(win.resizeElement, "mousedown", mcWindows.eventDispatcher);
-
- if (mcWindows.isMSIE) {
- mcWindows.addEvent(realIframe.document, "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(realIframe.document, "mouseup", mcWindows.eventDispatcher);
- } else {
- mcWindows.addEvent(realIframe, "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(realIframe, "mouseup", mcWindows.eventDispatcher);
- mcWindows.addEvent(realIframe, "focus", mcWindows.eventDispatcher);
- }
-
- for (var i=0; i<window.frames.length; i++) {
- if (!window.frames[i]._hasMouseHandlers) {
- if (mcWindows.isMSIE) {
- mcWindows.addEvent(window.frames[i].document, "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(window.frames[i].document, "mouseup", mcWindows.eventDispatcher);
- } else {
- mcWindows.addEvent(window.frames[i], "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(window.frames[i], "mouseup", mcWindows.eventDispatcher);
- }
-
- window.frames[i]._hasMouseHandlers = true;
- }
- }
-
- if (mcWindows.isMSIE) {
- mcWindows.addEvent(win.frame.document, "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(win.frame.document, "mouseup", mcWindows.eventDispatcher);
- } else {
- mcWindows.addEvent(win.frame, "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(win.frame, "mouseup", mcWindows.eventDispatcher);
- mcWindows.addEvent(win.frame, "focus", mcWindows.eventDispatcher);
- }
-
- this.selectedWindow = win;
-};
-
-MCWindows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
- var iframe = document.createElement("iframe");
- var div = document.createElement("div");
-
- width = parseInt(width);
- height = parseInt(height)+1;
-
- // Create wrapper div
- div.setAttribute("id", id_prefix + "_div");
- div.setAttribute("width", width);
- div.setAttribute("height", (height));
- div.style.position = "absolute";
- div.style.left = left + "px";
- div.style.top = top + "px";
- div.style.width = width + "px";
- div.style.height = (height) + "px";
- div.style.backgroundColor = "white";
- div.style.display = "none";
-
- if (this.isGecko) {
- iframeWidth = width + 2;
- iframeHeight = height + 2;
- } else {
- iframeWidth = width;
- iframeHeight = height + 1;
- }
-
- // Create iframe
- iframe.setAttribute("id", id_prefix + "_iframe");
- iframe.setAttribute("name", id_prefix + "_iframe");
- iframe.setAttribute("border", "0");
- iframe.setAttribute("frameBorder", "0");
- iframe.setAttribute("marginWidth", "0");
- iframe.setAttribute("marginHeight", "0");
- iframe.setAttribute("leftMargin", "0");
- iframe.setAttribute("topMargin", "0");
- iframe.setAttribute("width", iframeWidth);
- iframe.setAttribute("height", iframeHeight);
-// iframe.setAttribute("src", "../jscripts/tiny_mce/blank.htm");
- // iframe.setAttribute("allowtransparency", "false");
- iframe.setAttribute("scrolling", "no");
- iframe.style.width = iframeWidth + "px";
- iframe.style.height = iframeHeight + "px";
- iframe.style.backgroundColor = "white";
- div.appendChild(iframe);
-
- document.body.appendChild(div);
-
- // Fixed MSIE 5.0 issue
- div.innerHTML = div.innerHTML;
-
- if (this.isSafari) {
- // Give Safari some time to setup
- window.setTimeout(function() {
- doc = window.frames[id_prefix + '_iframe'].document;
- doc.open();
- doc.write(html);
- doc.close();
- }, 10);
- } else {
- doc = window.frames[id_prefix + '_iframe'].window.document
- doc.open();
- doc.write(html);
- doc.close();
- }
-
- div.style.display = "block";
-
- return div;
-};
-
-// Window instance
-function MCWindow() {
-};
-
-MCWindow.prototype.focus = function() {
- this.winElement.style.zIndex = mcWindows.zindex++;
- mcWindows.selectedWindow = this;
-};
-
-MCWindow.prototype.minimize = function() {
-};
-
-MCWindow.prototype.maximize = function() {
-
-};
-
-MCWindow.prototype.startResize = function() {
- mcWindows.action = "resize";
-};
-
-MCWindow.prototype.startMove = function(e) {
- mcWindows.action = "move";
-};
-
-MCWindow.prototype.close = function() {
- document.body.removeChild(this.winElement);
- mcWindows.windows[this.name] = null;
-};
-
-MCWindow.prototype.onMouseMove = function(e) {
- var scrollX = 0;//this.doc.body.scrollLeft;
- var scrollY = 0;//this.doc.body.scrollTop;
-
- // Calculate real X, Y
- var dx = e.screenX - mcWindows.mouseDownScreenX;
- var dy = e.screenY - mcWindows.mouseDownScreenY;
-
- switch (mcWindows.action) {
- case "resize":
- width = mcWindows.mouseDownWidth + (e.screenX - mcWindows.mouseDownScreenX);
- height = mcWindows.mouseDownHeight + (e.screenY - mcWindows.mouseDownScreenY);
-
- width = width < 100 ? 100 : width;
- height = height < 100 ? 100 : height;
-
- this.wrapperIFrameElement.style.width = width+2;
- this.wrapperIFrameElement.style.height = height+2;
- this.wrapperIFrameElement.width = width+2;
- this.wrapperIFrameElement.height = height+2;
- this.winElement.style.width = width;
- this.winElement.style.height = height;
-
- height = height-12-19;
-
- this.containerElement.style.width = width;
-
- this.iframeElement.style.width = width;
- this.iframeElement.style.height = height;
- this.bodyElement.style.width = width;
- this.bodyElement.style.height = height;
- this.headElement.style.width = width;
- //this.statusElement.style.width = width;
-
- mcWindows.cancelEvent(e);
- break;
-
- case "move":
- this.left = mcWindows.mouseDownLayerX + (e.screenX - mcWindows.mouseDownScreenX);
- this.top = mcWindows.mouseDownLayerY + (e.screenY - mcWindows.mouseDownScreenY);
- this.winElement.style.left = this.left + "px";
- this.winElement.style.top = this.top + "px";
-
- mcWindows.cancelEvent(e);
- break;
- }
-};
-
-MCWindow.prototype.onMouseUp = function(e) {
- mcWindows.action = "none";
-};
-
-MCWindow.prototype.onFocus = function(e) {
- // Gecko only handler
- var winRef = e.currentTarget;
-
- for (var n in mcWindows.windows) {
- var win = mcWindows.windows[n];
- if (typeof(win) == 'function')
- continue;
-
- if (winRef.name == win.id) {
- win.focus();
- return;
- }
- }
-};
-
-MCWindow.prototype.onMouseDown = function(e) {
- var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
-
- var scrollX = 0;//this.doc.body.scrollLeft;
- var scrollY = 0;//this.doc.body.scrollTop;
-
- mcWindows.mouseDownScreenX = e.screenX;
- mcWindows.mouseDownScreenY = e.screenY;
- mcWindows.mouseDownLayerX = this.left;
- mcWindows.mouseDownLayerY = this.top;
- mcWindows.mouseDownWidth = parseInt(this.winElement.style.width);
- mcWindows.mouseDownHeight = parseInt(this.winElement.style.height);
-
- if (elm == this.resizeElement.firstChild)
- this.startResize(e);
- else
- this.startMove(e);
-
- mcWindows.cancelEvent(e);
-};
-
-// Global instance
-var mcWindows = new MCWindows();
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
new file mode 100644
index 0000000..94abd08
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
new file mode 100644
index 0000000..e671094
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
new file mode 100644
index 0000000..b408ae1
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
new file mode 100644
index 0000000..497307a
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
new file mode 100644
index 0000000..c894b2e
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif
new file mode 100644
index 0000000..bf0a03e
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
new file mode 100644
index 0000000..c2a2ad4
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
new file mode 100644
index 0000000..43a735f
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css
new file mode 100644
index 0000000..569ca80
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css
@@ -0,0 +1,125 @@
+/* Clearlooks 2 */
+/* Reset */
+.clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block;}
+
+/* General */
+.clearlooks2 div, .clearlooks2 span, .clearlooks2 a {position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block;}
+.clearlooks2 {position:absolute;}
+.clearlooks2 .mceWrapper {position:static}
+.mceEventBlocker {position:absolute; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%;}
+.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; filter:alpha(opacity=50);}
+
+/* Top */
+.clearlooks2 .mceTop,
+.clearlooks2 .mceTop div {
+ top:0;
+ width:100%;
+ height:23px
+}
+.clearlooks2 .mceTop .mceLeft {
+ width:55%;
+ background-image: none;
+ border-style: solid none none solid;
+ border-width: 1px;
+}
+.clearlooks2 .mceTop .mceCenter {
+}
+.clearlooks2 .mceTop .mceRight {
+ right:0;
+ width:55%;
+ height:23px;
+ background-image: none;
+ border-style: solid solid none none;
+ border-width: 1px;
+}
+.clearlooks2 .mceTop span {
+ width:100%;
+ font: 12px/20px bold "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;
+ text-align:center;
+ vertical-align:middle;
+ line-height:23px;
+ font-weight:bold;
+}
+.clearlooks2 .mceFocus .mceTop .mceLeft {
+ background-image: none;
+ border-style: solid none none solid;
+ border-width: 1px;
+}
+.clearlooks2 .mceFocus .mceTop .mceCenter {
+}
+.clearlooks2 .mceFocus .mceTop .mceRight {
+ background-image: none;
+ border-style: solid solid none none;
+ border-width: 1px;
+}
+.clearlooks2 .mceFocus .mceTop span {
+color:#FFF
+}
+
+/* Middle */
+.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0;}
+.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto);}
+.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:#eaf3fa;border-left:1px solid #c6d9e9;}
+.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF;}
+.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:#eaf3fa;border-right:1px solid #c6d9e9;}
+
+/* Bottom */
+.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px;}
+.clearlooks2 .mceBottom {left:0; bottom:0; width:100%;background:#eaf3fa;border-bottom:1px solid #c6d9e9;}
+.clearlooks2 .mceBottom div {top:0;}
+.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:#eaf3fa ;border-left:1px solid #c6d9e9;}
+.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%;}
+.clearlooks2 .mceBottom .mceRight {right:0; width:6px; background:#eaf3fa url(img/drag.gif) no-repeat;border-right:1px solid #c6d9e9;}
+.clearlooks2 .mceBottom span {display:none;}
+.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px;}
+.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0;}
+.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px;}
+.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0;}
+.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px;}
+
+/* Actions */
+.clearlooks2 a {width:29px; height:16px; top:3px;}
+.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0;}
+.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0;}
+.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0;}
+.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0;}
+.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px;}
+.clearlooks2 .mceMovable .mceMove {display:block;}
+.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px;}
+.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px;}
+.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px;}
+.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px;}
+.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px;}
+.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px;}
+.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px;}
+.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px;}
+.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px;}
+
+/* Resize */
+.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px;}
+.clearlooks2 .mceResizable .mceResize {display:block;}
+.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none;}
+.clearlooks2 .mceMinimizable .mceMin {display:block;}
+.clearlooks2 .mceMaximizable .mceMax {display:block;}
+.clearlooks2 .mceMaximized .mceMed {display:block;}
+.clearlooks2 .mceMaximized .mceMax {display:none;}
+.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize;}
+.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize;}
+.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
+.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
+.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize;}
+.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
+.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize;}
+.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize;}
+
+/* Alert/Confirm */
+.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0;}
+.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px;}
+.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal;}
+.clearlooks2 a:hover {font-weight:bold;}
+.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#eaf3fa;}
+.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px;}
+.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif);}
+.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px;}
+.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto;}
+.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif);}
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/template.htm b/wp-includes/js/tinymce/plugins/inlinepopups/template.htm
new file mode 100644
index 0000000..c98fe41
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/inlinepopups/template.htm
@@ -0,0 +1,387 @@
+<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Template for dialogs</title>
+<link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css" />
+</head>
+<body>
+
+<div class="mceEditor">
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px;">
+ <div class="mceWrapper">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Blured</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px;">
+ <div class="mceWrapper mceMovable mceFocus">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Focused</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;">
+ <div class="mceWrapper mceMovable mceFocus mceStatusbar">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;">
+ <div class="mceWrapper mceMovable mceFocus mceStatusbar mceResizable">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar, Resizable</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;">
+ <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximizable">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Resizable, Maximizable</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;">
+ <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximizable">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Blurred, Maximizable, Statusbar, Resizable</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;">
+ <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximized mceMinimizable mceMaximizable">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Maximized, Maximizable, Minimizable</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;">
+ <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximized mceMinimizable mceMaximizable">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Blured</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;">
+ <div class="mceWrapper mceMovable mceFocus mceModal mceAlert">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Alert</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ </span>
+ <div class="mceRight"></div>
+ <div class="mceIcon"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceButton mceOk" href="#">Ok</a>
+ <a class="mceClose" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;">
+ <div class="mceWrapper mceMovable mceFocus mceModal mceConfirm">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Confirm</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ </span>
+ <div class="mceRight"></div>
+ <div class="mceIcon"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceButton mceOk" href="#">Ok</a>
+ <a class="mceButton mceCancel" href="#">Cancel</a>
+ <a class="mceClose" href="#"></a>
+ </div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/wp-includes/js/tinymce/plugins/media/css/content.css b/wp-includes/js/tinymce/plugins/media/css/content.css
new file mode 100644
index 0000000..7739381
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/css/content.css
@@ -0,0 +1,6 @@
+.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;}
+.mceItemShockWave {background-image: url(../img/shockwave.gif);}
+.mceItemFlash {background-image:url(../img/flash.gif);}
+.mceItemQuickTime {background-image:url(../img/quicktime.gif);}
+.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);}
+.mceItemRealMedia {background-image:url(../img/realmedia.gif);}
diff --git a/wp-includes/js/tinymce/plugins/media/css/media.css b/wp-includes/js/tinymce/plugins/media/css/media.css
new file mode 100644
index 0000000..62d666a
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/css/media.css
@@ -0,0 +1,68 @@
+#id, #name, #hspace, #vspace, #class_name, #align {
+ width: 100px;
+}
+
+#hspace, #vspace {
+ width: 50px;
+}
+
+#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode {
+ width: 100px;
+}
+
+#flash_base, #flash_flashvars {
+ width: 240px;
+}
+
+#width, #height {
+ width: 40px;
+}
+
+#src, #media_type {
+ width: 250px;
+}
+
+#class {
+ width: 120px;
+}
+
+#prev {
+ margin: 0;
+ border: 1px solid black;
+ width: 99%;
+ height: 230px;
+ overflow: auto;
+}
+
+.panel_wrapper div.current {
+ height: 390px;
+ overflow: auto;
+}
+
+#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options {
+ display: none;
+}
+
+.mceAddSelectValue {
+ background-color: #DDDDDD;
+}
+
+#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume {
+ width: 70px;
+}
+
+#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume {
+ width: 70px;
+}
+
+#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks {
+ width: 70px;
+}
+
+#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle {
+ width: 90px;
+}
+
+#qt_qtsrc {
+ width: 200px;
+}
diff --git a/wp-includes/js/tinymce/plugins/media/editor_plugin.js b/wp-includes/js/tinymce/plugins/media/editor_plugin.js
new file mode 100644
index 0000000..948db7c
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.MediaPlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;function isMediaElm(n){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);};ed.addCommand('mceMedia',function(){ed.windowManager.open({file:url+'/media.htm',width:430+parseInt(ed.getLang('media.delta_width',0)),height:470+parseInt(ed.getLang('media.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('media',{title:'media.desc',cmd:'mceMedia'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('media',n.nodeName=='IMG'&&isMediaElm(n));});ed.onInit.add(function(){var lo={mceItemFlash:'flash',mceItemShockWave:'shockwave',mceItemWindowsMedia:'windowsmedia',mceItemQuickTime:'quicktime',mceItemRealMedia:'realmedia'};ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.name=='img'){each(lo,function(v,k){if(ed.dom.hasClass(o.node,k)){o.name=v;o.title=ed.dom.getAttrib(o.node,'title');return false;}});}});}if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){if(e.nodeName=='IMG'&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)){m.add({title:'media.edit',icon:'media',cmd:'mceMedia'});}});}});ed.onBeforeSetContent.add(function(ed,o){var h=o.content;h=h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(a,b,c){var o=t._parse(c);return'<img class="mceItem'+b+'" title="'+ed.dom.encode(c)+'" src="'+url+'/img/trans.gif" width="'+o.width+'" height="'+o.height+'" />'});h=h.replace(/<object([^>]*)>/gi,'<span class="mceItemObject" $1>');h=h.replace(/<embed([^>]*)>/gi,'<span class="mceItemEmbed" $1>');h=h.replace(/<\/(object|embed)([^>]*)>/gi,'</span>');h=h.replace(/<param([^>]*)>/gi,function(a,b){return'<span '+b.replace(/value=/gi,'_value=')+' class="mceItemParam"></span>'});h=h.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam"></span>');o.content=h;});ed.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;if(o.set){t._spansToImgs(o.node);each(dom.select('IMG',o.node),function(n){var p;if(isMediaElm(n)){p=t._parse(n.title);dom.setAttrib(n,'width',dom.getAttrib(n,'width',p.width||100));dom.setAttrib(n,'height',dom.getAttrib(n,'height',p.height||100));}});}if(o.get){each(dom.select('IMG',o.node),function(n){var ci,cb,mt;if(ed.getParam('media_use_script')){if(isMediaElm(n))n.className=n.className.replace(/mceItem/g,'mceTemp');return;}switch(n.className){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166b1bca-3f9c-11cf-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=ed.getParam('media_wmp6_compatible')?'05589fa1-c356-11ce-bf01-00aa0055595a':'6bf52a52-394a-11d3-b153-00c04f79faa6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02bf25d5-8c17-4b23-bc80-d3488abddc6b';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='cfcdaa03-8be4-11cf-b84b-0020afbbccfa';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break;}if(ci){dom.replace(t._buildObj({classid:ci,codebase:cb,type:mt},n),n);}});}});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/_value=/g,'value=');});if(ed.getParam('media_use_script')){function getAttr(s,n){n=new RegExp(n+'=\"([^\"]+)\"','g').exec(s);return n?ed.dom.decode(n[1]):'';};ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<img[^>]+>/g,function(im){var cl=getAttr(im,'class');if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)){at=t._parse(getAttr(im,'title'));at.width=getAttr(im,'width');at.height=getAttr(im,'height');im='<script type="text/javascript">write'+cl.substring(7)+'({'+t._serialize(at)+'});</script>';}return im;});});}},getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_buildObj:function(o,n){var ob,ed=this.editor,dom=ed.dom,p=this._parse(n.title);p.width=o.width=dom.getAttrib(n,'width')||100;p.height=o.height=dom.getAttrib(n,'height')||100;ob=dom.create('span',{mce_name:'object',classid:"clsid:"+o.classid,codebase:o.codebase,width:o.width,height:o.height});if(p.src)p.src=ed.convertURL(p.src,'src',n);each(p,function(v,k){if(!/^(width|height|codebase|classid)$/.test(k))dom.add(ob,'span',{mce_name:'param',name:k,'_value':v});});dom.add(ob,'span',tinymce.extend({mce_name:'embed',type:o.type},p));return ob;},_spansToImgs:function(p){var t=this,dom=t.editor.dom,im,ci;each(dom.select('span',p),function(n){if(dom.getAttrib(n,'class')=='mceItemObject'){ci=dom.getAttrib(n,"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':dom.replace(t._createImg('mceItemFlash',n),n);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}return;}if(dom.getAttrib(n,'class')=='mceItemEmbed'){switch(dom.getAttrib(n,'type')){case'application/x-shockwave-flash':dom.replace(t._createImg('mceItemFlash',n),n);break;case'application/x-director':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'application/x-mplayer2':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'video/quicktime':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'audio/x-pn-realaudio-plugin':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}}});},_createImg:function(cl,n){var im,dom=this.editor.dom,pa={},ti='';im=dom.create('img',{src:this.url+'/img/trans.gif',width:dom.getAttrib(n,'width')||100,height:dom.getAttrib(n,'height')||100,'class':cl});each(['id','name','width','height','bgcolor','align','flashvars','src','wmode'],function(na){var v=dom.getAttrib(n,na);if(v)pa[na]=v;});each(dom.select('span',n),function(n){if(dom.hasClass(n,'mceItemParam'))pa[dom.getAttrib(n,'name')]=dom.getAttrib(n,'_value');});if(pa.movie){pa.src=pa.movie;delete pa.movie;}delete pa.width;delete pa.height;im.title=this._serialize(pa);return im;},_parse:function(s){return tinymce.util.JSON.parse('{'+s+'}');},_serialize:function(o){return tinymce.util.JSON.serialize(o).replace(/[{}]/g,'');}});tinymce.PluginManager.add('media',tinymce.plugins.MediaPlugin);})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/media/img/flash.gif b/wp-includes/js/tinymce/plugins/media/img/flash.gif
new file mode 100644
index 0000000..cb192e6
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/img/flash.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/media/img/flv_player.swf b/wp-includes/js/tinymce/plugins/media/img/flv_player.swf
new file mode 100644
index 0000000..042c2ab
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/img/flv_player.swf
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/media/img/quicktime.gif b/wp-includes/js/tinymce/plugins/media/img/quicktime.gif
new file mode 100644
index 0000000..3b04991
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/img/quicktime.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/media/img/realmedia.gif b/wp-includes/js/tinymce/plugins/media/img/realmedia.gif
new file mode 100644
index 0000000..fdfe0b9
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/img/realmedia.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/media/img/shockwave.gif b/wp-includes/js/tinymce/plugins/media/img/shockwave.gif
new file mode 100644
index 0000000..5f235df
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/img/shockwave.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/media/img/trans.gif b/wp-includes/js/tinymce/plugins/media/img/trans.gif
new file mode 100644
index 0000000..3884865
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/img/trans.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/media/img/windowsmedia.gif b/wp-includes/js/tinymce/plugins/media/img/windowsmedia.gif
new file mode 100644
index 0000000..ab50f2d
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/img/windowsmedia.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/media/js/embed.js b/wp-includes/js/tinymce/plugins/media/js/embed.js
new file mode 100644
index 0000000..6fe25de
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/js/embed.js
@@ -0,0 +1,73 @@
+/**
+ * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
+ */
+
+function writeFlash(p) {
+ writeEmbed(
+ 'D27CDB6E-AE6D-11cf-96B8-444553540000',
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
+ 'application/x-shockwave-flash',
+ p
+ );
+}
+
+function writeShockWave(p) {
+ writeEmbed(
+ '166B1BCA-3F9C-11CF-8075-444553540000',
+ 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
+ 'application/x-director',
+ p
+ );
+}
+
+function writeQuickTime(p) {
+ writeEmbed(
+ '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
+ 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
+ 'video/quicktime',
+ p
+ );
+}
+
+function writeRealMedia(p) {
+ writeEmbed(
+ 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
+ 'audio/x-pn-realaudio-plugin',
+ p
+ );
+}
+
+function writeWindowsMedia(p) {
+ p.url = p.src;
+ writeEmbed(
+ '6BF52A52-394A-11D3-B153-00C04F79FAA6',
+ 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
+ 'application/x-mplayer2',
+ p
+ );
+}
+
+function writeEmbed(cls, cb, mt, p) {
+ var h = '', n;
+
+ h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
+ h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
+ h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
+ h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
+ h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
+ h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
+ h += '>';
+
+ for (n in p)
+ h += '<param name="' + n + '" value="' + p[n] + '">';
+
+ h += '<embed type="' + mt + '"';
+
+ for (n in p)
+ h += n + '="' + p[n] + '" ';
+
+ h += '></embed></object>';
+
+ document.write(h);
+}
diff --git a/wp-includes/js/tinymce/plugins/media/js/media.js b/wp-includes/js/tinymce/plugins/media/js/media.js
new file mode 100644
index 0000000..58d2faf
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/js/media.js
@@ -0,0 +1,621 @@
+tinyMCEPopup.requireLangPack();
+
+var oldWidth, oldHeight, ed, url;
+
+if (url = tinyMCEPopup.getParam("media_external_list_url"))
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
+
+function init() {
+ var pl = "", f, val;
+ var type = "flash", fe, i;
+
+ ed = tinyMCEPopup.editor;
+
+ tinyMCEPopup.resizeToInnerSize();
+ f = document.forms[0]
+
+ fe = ed.selection.getNode();
+ if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
+ pl = fe.title;
+
+ switch (ed.dom.getAttrib(fe, 'class')) {
+ case 'mceItemFlash':
+ type = 'flash';
+ break;
+
+ case 'mceItemFlashVideo':
+ type = 'flv';
+ break;
+
+ case 'mceItemShockWave':
+ type = 'shockwave';
+ break;
+
+ case 'mceItemWindowsMedia':
+ type = 'wmp';
+ break;
+
+ case 'mceItemQuickTime':
+ type = 'qt';
+ break;
+
+ case 'mceItemRealMedia':
+ type = 'rmp';
+ break;
+ }
+
+ document.forms[0].insert.value = ed.getLang('update', 'Insert', true);
+ }
+
+ document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
+ document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media');
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+
+ var html = getMediaListHTML('medialist','src','media','media');
+ if (html == "")
+ document.getElementById("linklistrow").style.display = 'none';
+ else
+ document.getElementById("linklistcontainer").innerHTML = html;
+
+ // Resize some elements
+ if (isVisible('filebrowser'))
+ document.getElementById('src').style.width = '230px';
+
+ // Setup form
+ if (pl != "") {
+ pl = tinyMCEPopup.editor.plugins.media._parse(pl);
+
+ switch (type) {
+ case "flash":
+ setBool(pl, 'flash', 'play');
+ setBool(pl, 'flash', 'loop');
+ setBool(pl, 'flash', 'menu');
+ setBool(pl, 'flash', 'swliveconnect');
+ setStr(pl, 'flash', 'quality');
+ setStr(pl, 'flash', 'scale');
+ setStr(pl, 'flash', 'salign');
+ setStr(pl, 'flash', 'wmode');
+ setStr(pl, 'flash', 'base');
+ setStr(pl, 'flash', 'flashvars');
+ break;
+
+ case "qt":
+ setBool(pl, 'qt', 'loop');
+ setBool(pl, 'qt', 'autoplay');
+ setBool(pl, 'qt', 'cache');
+ setBool(pl, 'qt', 'controller');
+ setBool(pl, 'qt', 'correction');
+ setBool(pl, 'qt', 'enablejavascript');
+ setBool(pl, 'qt', 'kioskmode');
+ setBool(pl, 'qt', 'autohref');
+ setBool(pl, 'qt', 'playeveryframe');
+ setBool(pl, 'qt', 'tarsetcache');
+ setStr(pl, 'qt', 'scale');
+ setStr(pl, 'qt', 'starttime');
+ setStr(pl, 'qt', 'endtime');
+ setStr(pl, 'qt', 'tarset');
+ setStr(pl, 'qt', 'qtsrcchokespeed');
+ setStr(pl, 'qt', 'volume');
+ setStr(pl, 'qt', 'qtsrc');
+ break;
+
+ case "shockwave":
+ setBool(pl, 'shockwave', 'sound');
+ setBool(pl, 'shockwave', 'progress');
+ setBool(pl, 'shockwave', 'autostart');
+ setBool(pl, 'shockwave', 'swliveconnect');
+ setStr(pl, 'shockwave', 'swvolume');
+ setStr(pl, 'shockwave', 'swstretchstyle');
+ setStr(pl, 'shockwave', 'swstretchhalign');
+ setStr(pl, 'shockwave', 'swstretchvalign');
+ break;
+
+ case "wmp":
+ setBool(pl, 'wmp', 'autostart');
+ setBool(pl, 'wmp', 'enabled');
+ setBool(pl, 'wmp', 'enablecontextmenu');
+ setBool(pl, 'wmp', 'fullscreen');
+ setBool(pl, 'wmp', 'invokeurls');
+ setBool(pl, 'wmp', 'mute');
+ setBool(pl, 'wmp', 'stretchtofit');
+ setBool(pl, 'wmp', 'windowlessvideo');
+ setStr(pl, 'wmp', 'balance');
+ setStr(pl, 'wmp', 'baseurl');
+ setStr(pl, 'wmp', 'captioningid');
+ setStr(pl, 'wmp', 'currentmarker');
+ setStr(pl, 'wmp', 'currentposition');
+ setStr(pl, 'wmp', 'defaultframe');
+ setStr(pl, 'wmp', 'playcount');
+ setStr(pl, 'wmp', 'rate');
+ setStr(pl, 'wmp', 'uimode');
+ setStr(pl, 'wmp', 'volume');
+ break;
+
+ case "rmp":
+ setBool(pl, 'rmp', 'autostart');
+ setBool(pl, 'rmp', 'loop');
+ setBool(pl, 'rmp', 'autogotourl');
+ setBool(pl, 'rmp', 'center');
+ setBool(pl, 'rmp', 'imagestatus');
+ setBool(pl, 'rmp', 'maintainaspect');
+ setBool(pl, 'rmp', 'nojava');
+ setBool(pl, 'rmp', 'prefetch');
+ setBool(pl, 'rmp', 'shuffle');
+ setStr(pl, 'rmp', 'console');
+ setStr(pl, 'rmp', 'controls');
+ setStr(pl, 'rmp', 'numloop');
+ setStr(pl, 'rmp', 'scriptcallbacks');
+ break;
+ }
+
+ setStr(pl, null, 'src');
+ setStr(pl, null, 'id');
+ setStr(pl, null, 'name');
+ setStr(pl, null, 'vspace');
+ setStr(pl, null, 'hspace');
+ setStr(pl, null, 'bgcolor');
+ setStr(pl, null, 'align');
+ setStr(pl, null, 'width');
+ setStr(pl, null, 'height');
+
+ if ((val = ed.dom.getAttrib(fe, "width")) != "")
+ pl.width = f.width.value = val;
+
+ if ((val = ed.dom.getAttrib(fe, "height")) != "")
+ pl.height = f.height.value = val;
+
+ oldWidth = pl.width ? parseInt(pl.width) : 0;
+ oldHeight = pl.height ? parseInt(pl.height) : 0;
+ } else
+ oldWidth = oldHeight = 0;
+
+ selectByValue(f, 'media_type', type);
+ changedType(type);
+ updateColor('bgcolor_pick', 'bgcolor');
+
+ TinyMCE_EditableSelects.init();
+ generatePreview();
+}
+
+function insertMedia() {
+ var fe, f = document.forms[0], h;
+
+ tinyMCEPopup.restoreSelection();
+
+ if (!AutoValidator.validate(f)) {
+ alert(ed.getLang('invalid_data'));
+ return false;
+ }
+
+ f.width.value = f.width.value == "" ? 100 : f.width.value;
+ f.height.value = f.height.value == "" ? 100 : f.height.value;
+
+ fe = ed.selection.getNode();
+ if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
+ case "flash":
+ fe.className = "mceItemFlash";
+ break;
+
+ case "flv":
+ fe.className = "mceItemFlashVideo";
+ break;
+
+ case "shockwave":
+ fe.className = "mceItemShockWave";
+ break;
+
+ case "qt":
+ fe.className = "mceItemQuickTime";
+ break;
+
+ case "wmp":
+ fe.className = "mceItemWindowsMedia";
+ break;
+
+ case "rmp":
+ fe.className = "mceItemRealMedia";
+ break;
+ }
+
+ if (fe.width != f.width.value || fe.height != f.height.height)
+ ed.execCommand('mceRepaint');
+
+ fe.title = serializeParameters();
+ fe.width = f.width.value;
+ fe.height = f.height.value;
+ fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : '');
+ fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : '');
+ fe.align = f.align.options[f.align.selectedIndex].value;
+ } else {
+ h = '<img src="' + tinyMCEPopup.getWindowArg("plugin_url") + '/img/trans.gif"' ;
+
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
+ case "flash":
+ h += ' class="mceItemFlash"';
+ break;
+
+ case "flv":
+ h += ' class="mceItemFlashVideo"';
+ break;
+
+ case "shockwave":
+ h += ' class="mceItemShockWave"';
+ break;
+
+ case "qt":
+ h += ' class="mceItemQuickTime"';
+ break;
+
+ case "wmp":
+ h += ' class="mceItemWindowsMedia"';
+ break;
+
+ case "rmp":
+ h += ' class="mceItemRealMedia"';
+ break;
+ }
+
+ h += ' title="' + serializeParameters() + '"';
+ h += ' width="' + f.width.value + '"';
+ h += ' height="' + f.height.value + '"';
+ h += ' align="' + f.align.options[f.align.selectedIndex].value + '"';
+
+ h += ' />';
+
+ ed.execCommand('mceInsertContent', false, h);
+ }
+
+ tinyMCEPopup.close();
+}
+
+function updatePreview() {
+ var f = document.forms[0], type;
+
+ f.width.value = f.width.value || '320';
+ f.height.value = f.height.value || '240';
+
+ type = getType(f.src.value);
+ selectByValue(f, 'media_type', type);
+ changedType(type);
+ generatePreview();
+}
+
+function getMediaListHTML() {
+ if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
+ var html = "";
+
+ html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;updatePreview();">';
+ html += '<option value="">---</option>';
+
+ for (var i=0; i<tinyMCEMediaList.length; i++)
+ html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
+
+ html += '</select>';
+
+ return html;
+ }
+
+ return "";
+}
+
+function getType(v) {
+ var fo, i, c, el, x, f = document.forms[0];
+
+ fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';');
+
+ // YouTube
+ if (v.match(/watch\?v=(.+)(.*)/)) {
+ f.width.value = '425';
+ f.height.value = '350';
+ f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1];
+ return 'flash';
+ }
+
+ // Google video
+ if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {
+ f.width.value = '425';
+ f.height.value = '326';
+ f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en';
+ return 'flash';
+ }
+
+ for (i=0; i<fo.length; i++) {
+ c = fo[i].split('=');
+
+ el = c[1].split(',');
+ for (x=0; x<el.length; x++)
+ if (v.indexOf('.' + el[x]) != -1)
+ return c[0];
+ }
+
+ return null;
+}
+
+function switchType(v) {
+ var t = getType(v), d = document, f = d.forms[0];
+
+ if (!t)
+ return;
+
+ selectByValue(d.forms[0], 'media_type', t);
+ changedType(t);
+
+ // Update qtsrc also
+ if (t == 'qt' && f.src.value.toLowerCase().indexOf('rtsp://') != -1) {
+ alert(ed.getLang("media_qt_stream_warn"));
+
+ if (f.qt_qtsrc.value == '')
+ f.qt_qtsrc.value = f.src.value;
+ }
+}
+
+function changedType(t) {
+ var d = document;
+
+ d.getElementById('flash_options').style.display = 'none';
+ d.getElementById('flv_options').style.display = 'none';
+ d.getElementById('qt_options').style.display = 'none';
+ d.getElementById('shockwave_options').style.display = 'none';
+ d.getElementById('wmp_options').style.display = 'none';
+ d.getElementById('rmp_options').style.display = 'none';
+ d.getElementById(t + '_options').style.display = 'block';
+}
+
+function serializeParameters() {
+ var d = document, f = d.forms[0], s = '';
+
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
+ case "flash":
+ s += getBool('flash', 'play', true);
+ s += getBool('flash', 'loop', true);
+ s += getBool('flash', 'menu', true);
+ s += getBool('flash', 'swliveconnect', false);
+ s += getStr('flash', 'quality');
+ s += getStr('flash', 'scale');
+ s += getStr('flash', 'salign');
+ s += getStr('flash', 'wmode');
+ s += getStr('flash', 'base');
+ s += getStr('flash', 'flashvars');
+ break;
+
+ case "qt":
+ s += getBool('qt', 'loop', false);
+ s += getBool('qt', 'autoplay', true);
+ s += getBool('qt', 'cache', false);
+ s += getBool('qt', 'controller', true);
+ s += getBool('qt', 'correction', false, 'none', 'full');
+ s += getBool('qt', 'enablejavascript', false);
+ s += getBool('qt', 'kioskmode', false);
+ s += getBool('qt', 'autohref', false);
+ s += getBool('qt', 'playeveryframe', false);
+ s += getBool('qt', 'targetcache', false);
+ s += getStr('qt', 'scale');
+ s += getStr('qt', 'starttime');
+ s += getStr('qt', 'endtime');
+ s += getStr('qt', 'target');
+ s += getStr('qt', 'qtsrcchokespeed');
+ s += getStr('qt', 'volume');
+ s += getStr('qt', 'qtsrc');
+ break;
+
+ case "shockwave":
+ s += getBool('shockwave', 'sound');
+ s += getBool('shockwave', 'progress');
+ s += getBool('shockwave', 'autostart');
+ s += getBool('shockwave', 'swliveconnect');
+ s += getStr('shockwave', 'swvolume');
+ s += getStr('shockwave', 'swstretchstyle');
+ s += getStr('shockwave', 'swstretchhalign');
+ s += getStr('shockwave', 'swstretchvalign');
+ break;
+
+ case "wmp":
+ s += getBool('wmp', 'autostart', true);
+ s += getBool('wmp', 'enabled', false);
+ s += getBool('wmp', 'enablecontextmenu', true);
+ s += getBool('wmp', 'fullscreen', false);
+ s += getBool('wmp', 'invokeurls', true);
+ s += getBool('wmp', 'mute', false);
+ s += getBool('wmp', 'stretchtofit', false);
+ s += getBool('wmp', 'windowlessvideo', false);
+ s += getStr('wmp', 'balance');
+ s += getStr('wmp', 'baseurl');
+ s += getStr('wmp', 'captioningid');
+ s += getStr('wmp', 'currentmarker');
+ s += getStr('wmp', 'currentposition');
+ s += getStr('wmp', 'defaultframe');
+ s += getStr('wmp', 'playcount');
+ s += getStr('wmp', 'rate');
+ s += getStr('wmp', 'uimode');
+ s += getStr('wmp', 'volume');
+ break;
+
+ case "rmp":
+ s += getBool('rmp', 'autostart', false);
+ s += getBool('rmp', 'loop', false);
+ s += getBool('rmp', 'autogotourl', true);
+ s += getBool('rmp', 'center', false);
+ s += getBool('rmp', 'imagestatus', true);
+ s += getBool('rmp', 'maintainaspect', false);
+ s += getBool('rmp', 'nojava', false);
+ s += getBool('rmp', 'prefetch', false);
+ s += getBool('rmp', 'shuffle', false);
+ s += getStr('rmp', 'console');
+ s += getStr('rmp', 'controls');
+ s += getStr('rmp', 'numloop');
+ s += getStr('rmp', 'scriptcallbacks');
+ break;
+ }
+
+ s += getStr(null, 'id');
+ s += getStr(null, 'name');
+ s += getStr(null, 'src');
+ s += getStr(null, 'align');
+ s += getStr(null, 'bgcolor');
+ s += getInt(null, 'vspace');
+ s += getInt(null, 'hspace');
+ s += getStr(null, 'width');
+ s += getStr(null, 'height');
+
+ s = s.length > 0 ? s.substring(0, s.length - 1) : s;
+
+ return s;
+}
+
+function setBool(pl, p, n) {
+ if (typeof(pl[n]) == "undefined")
+ return;
+
+ document.forms[0].elements[p + "_" + n].checked = pl[n];
+}
+
+function setStr(pl, p, n) {
+ var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n];
+
+ if (typeof(pl[n]) == "undefined")
+ return;
+
+ if (e.type == "text")
+ e.value = pl[n];
+ else
+ selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]);
+}
+
+function getBool(p, n, d, tv, fv) {
+ var v = document.forms[0].elements[p + "_" + n].checked;
+
+ tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'";
+ fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'";
+
+ return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ',');
+}
+
+function getStr(p, n, d) {
+ var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
+ var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
+
+ if (n == 'src')
+ v = tinyMCEPopup.editor.convertURL(v, 'src', null);
+
+ return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',");
+}
+
+function getInt(p, n, d) {
+ var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
+ var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
+
+ return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ",");
+}
+
+function jsEncode(s) {
+ s = s.replace(new RegExp('\\\\', 'g'), '\\\\');
+ s = s.replace(new RegExp('"', 'g'), '\\"');
+ s = s.replace(new RegExp("'", 'g'), "\\'");
+
+ return s;
+}
+
+function generatePreview(c) {
+ var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
+
+ p.innerHTML = '<!-- x --->';
+
+ nw = parseInt(f.width.value);
+ nh = parseInt(f.height.value);
+
+ if (f.width.value != "" && f.height.value != "") {
+ if (f.constrain.checked) {
+ if (c == 'width' && oldWidth != 0) {
+ wp = nw / oldWidth;
+ nh = Math.round(wp * nh);
+ f.height.value = nh;
+ } else if (c == 'height' && oldHeight != 0) {
+ hp = nh / oldHeight;
+ nw = Math.round(hp * nw);
+ f.width.value = nw;
+ }
+ }
+ }
+
+ if (f.width.value != "")
+ oldWidth = nw;
+
+ if (f.height.value != "")
+ oldHeight = nh;
+
+ // After constrain
+ pl = serializeParameters();
+
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
+ case "flash":
+ cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
+ codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
+ type = 'application/x-shockwave-flash';
+ break;
+
+ case "shockwave":
+ cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000';
+ codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
+ type = 'application/x-director';
+ break;
+
+ case "qt":
+ cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
+ codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
+ type = 'video/quicktime';
+ break;
+
+ case "wmp":
+ cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6';
+ codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
+ type = 'application/x-mplayer2';
+ break;
+
+ case "rmp":
+ cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';
+ codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
+ type = 'audio/x-pn-realaudio-plugin';
+ break;
+ }
+
+ if (pl == '') {
+ p.innerHTML = '';
+ return;
+ }
+
+ pl = tinyMCEPopup.editor.plugins.media._parse(pl);
+
+ if (!pl.src) {
+ p.innerHTML = '';
+ return;
+ }
+
+ pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src);
+ pl.width = !pl.width ? 100 : pl.width;
+ pl.height = !pl.height ? 100 : pl.height;
+ pl.id = !pl.id ? 'obj' : pl.id;
+ pl.name = !pl.name ? 'eobj' : pl.name;
+ pl.align = !pl.align ? '' : pl.align;
+
+ h += '<object classid="clsid:' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
+
+ for (n in pl) {
+ h += '<param name="' + n + '" value="' + pl[n] + '">';
+
+ // Add extra url parameter if it's an absolute URL
+ if (n == 'src' && pl[n].indexOf('://') != -1)
+ h += '<param name="url" value="' + pl[n] + '" />';
+ }
+
+ h += '<embed type="' + type + '" ';
+
+ for (n in pl)
+ h += n + '="' + pl[n] + '" ';
+
+ h += '></embed></object>';
+
+ p.innerHTML = "<!-- x --->" + h;
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/wp-includes/js/tinymce/plugins/media/media.htm b/wp-includes/js/tinymce/plugins/media/media.htm
new file mode 100644
index 0000000..32e0967
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/media/media.htm
@@ -0,0 +1,824 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#media_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/media.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <link href="css/media.css" rel="stylesheet" type="text/css" />
+ <base target="_self" />
+</head>
+<body style="display: none">
+ <form onsubmit="insertMedia();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');generatePreview();" onmousedown="return false;">{#media_dlg.general}</a></span></li>
+ <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#media_dlg.advanced}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#media_dlg.general}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="media_type">{#media_dlg.type}</label></td>
+ <td>
+ <select id="media_type" name="media_type" onchange="changedType(this.value);generatePreview();">
+ <option value="flash">Flash</option>
+ <!-- <option value="flv">Flash video (FLV)</option> -->
+ <option value="qt">Quicktime</option>
+ <option value="shockwave">Shockware</option>
+ <option value="wmp">Windows Media</option>
+ <option value="rmp">Real Media</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="src">{#media_dlg.file}</label></td>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="switchType(this.value);generatePreview();" /></td>
+ <td id="filebrowsercontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr id="linklistrow">
+ <td><label for="linklist">{#media_dlg.list}</label></td>
+ <td id="linklistcontainer">&nbsp;</td>
+ </tr>
+ <tr>
+ <td><label for="width">{#media_dlg.size}</label></td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="text" id="width" name="width" value="" class="size" onchange="generatePreview('width');" /> x <input type="text" id="height" name="height" value="" class="size" onchange="generatePreview('height');" /></td>
+ <td>&nbsp;&nbsp;<input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
+ <td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset>
+ <legend>{#media_dlg.preview}</legend>
+ <div id="prev"></div>
+ </fieldset>
+ </div>
+
+ <div id="advanced_panel" class="panel">
+ <fieldset>
+ <legend>{#media_dlg.advanced}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0" width="100%">
+ <tr>
+ <td><label for="id">{#media_dlg.id}</label></td>
+ <td><input type="text" id="id" name="id" onchange="generatePreview();" /></td>
+ <td><label for="name">{#media_dlg.name}</label></td>
+ <td><input type="text" id="name" name="name" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="align">{#media_dlg.align}</label></td>
+ <td>
+ <select id="align" name="align" onchange="generatePreview();">
+ <option value="">{#not_set}</option>
+ <option value="top">{#media_dlg.align_top}</option>
+ <option value="right">{#media_dlg.align_right}</option>
+ <option value="bottom">{#media_dlg.align_bottom}</option>
+ <option value="left">{#media_dlg.align_left}</option>
+ </select>
+ </td>
+
+ <td><label for="bgcolor">{#media_dlg.bgcolor}</label></td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');generatePreview();" /></td>
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="vspace">{#media_dlg.vspace}</label></td>
+ <td><input type="text" id="vspace" name="vspace" class="number" onchange="generatePreview();" /></td>
+ <td><label for="hspace">{#media_dlg.hspace}</label></td>
+ <td><input type="text" id="hspace" name="hspace" class="number" onchange="generatePreview();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="flash_options">
+ <legend>{#media_dlg.flash_options}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="flash_quality">{#media_dlg.quality}</label></td>
+ <td>
+ <select id="flash_quality" name="flash_quality" onchange="generatePreview();">
+ <option value="">{#not_set}</option>
+ <option value="high">high</option>
+ <option value="low">low</option>
+ <option value="autolow">autolow</option>
+ <option value="autohigh">autohigh</option>
+ <option value="best">best</option>
+ </select>
+ </td>
+
+ <td><label for="flash_scale">{#media_dlg.scale}</label></td>
+ <td>
+ <select id="flash_scale" name="flash_scale" onchange="generatePreview();">
+ <option value="">{#not_set}</option>
+ <option value="showall">showall</option>
+ <option value="noborder">noborder</option>
+ <option value="exactfit">exactfit</option>
+ <option value="noscale">noscale</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="flash_wmode">{#media_dlg.wmode}</label></td>
+ <td>
+ <select id="flash_wmode" name="flash_wmode" onchange="generatePreview();">
+ <option value="">{#not_set}</option>
+ <option value="window">window</option>
+ <option value="opaque">opaque</option>
+ <option value="transparent">transparent</option>
+ </select>
+ </td>
+
+ <td><label for="flash_salign">{#media_dlg.salign}</label></td>
+ <td>
+ <select id="flash_salign" name="flash_salign" onchange="generatePreview();">
+ <option value="">{#not_set}</option>
+ <option value="l">{#media_dlg.align_left}</option>
+ <option value="t">{#media_dlg.align_top}</option>
+ <option value="r">{#media_dlg.align_right}</option>
+ <option value="b">{#media_dlg.align_bottom}</option>
+ <option value="tl">{#media_dlg.align_top_left}</option>
+ <option value="tr">{#media_dlg.align_top_right}</option>
+ <option value="bl">{#media_dlg.align_bottom_left}</option>
+ <option value="br">{#media_dlg.align_bottom_right}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flash_play">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flash_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flash_menu">{#media_dlg.menu}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="generatePreview();" /></td>
+ <td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <table>
+ <tr>
+ <td><label for="flash_base">{#media_dlg.base}</label></td>
+ <td><input type="text" id="flash_base" name="flash_base" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td>
+ <td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="generatePreview();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="flv_options">
+ <legend>{#media_dlg.flv_options}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="flv_scalemode">{#media_dlg.flv_scalemode}</label></td>
+ <td>
+ <select id="flv_scalemode" name="flv_scalemode" onchange="generatePreview();">
+ <option value="">{#not_set}</option>
+ <option value="none">none</option>
+ <option value="double">double</option>
+ <option value="full">full</option>
+ </select>
+ </td>
+
+ <td><label for="flv_buffer">{#media_dlg.flv_buffer}</label></td>
+ <td><input type="text" id="flv_buffer" name="flv_buffer" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="flv_startimage">{#media_dlg.flv_startimage}</label></td>
+ <td><input type="text" id="flv_startimage" name="flv_startimage" onchange="generatePreview();" /></td>
+
+ <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td>
+ <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="flv_defaultvolume">{#media_dlg.flv_defaultvolume}</label></td>
+ <td><input type="text" id="flv_defaultvolume" name="flv_defaultvolume" onchange="generatePreview();" /></td>
+
+ <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td>
+ <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_hiddengui" name="flv_hiddengui" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flv_hiddengui">{#media_dlg.flv_hiddengui}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_autostart" name="flv_autostart" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flv_autostart">{#media_dlg.flv_autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_loop" name="flv_loop" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flv_loop">{#media_dlg.flv_loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_showscalemodes" name="flv_showscalemodes" onchange="generatePreview();" /></td>
+ <td><label for="flv_showscalemodes">{#media_dlg.flv_showscalemodes}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_smoothvideo" name="flash_flv_flv_smoothvideosmoothvideo" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flv_smoothvideo">{#media_dlg.flv_smoothvideo}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_jscallback" name="flv_jscallback" onchange="generatePreview();" /></td>
+ <td><label for="flv_jscallback">{#media_dlg.flv_jscallback}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="qt_options">
+ <legend>{#media_dlg.qt_options}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="qt_loop" name="qt_loop" onchange="generatePreview();" /></td>
+ <td><label for="qt_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="qt_autoplay" name="qt_autoplay" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="qt_autoplay">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="qt_cache" name="qt_cache" onchange="generatePreview();" /></td>
+ <td><label for="qt_cache">{#media_dlg.cache}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="qt_controller" name="qt_controller" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="qt_controller">{#media_dlg.controller}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="qt_correction" name="qt_correction" onchange="generatePreview();" /></td>
+ <td><label for="qt_correction">{#media_dlg.correction}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="qt_enablejavascript" name="qt_enablejavascript" onchange="generatePreview();" /></td>
+ <td><label for="qt_enablejavascript">{#media_dlg.enablejavascript}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="qt_kioskmode" name="qt_kioskmode" onchange="generatePreview();" /></td>
+ <td><label for="qt_kioskmode">{#media_dlg.kioskmode}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="qt_autohref" name="qt_autohref" onchange="generatePreview();" /></td>
+ <td><label for="qt_autohref">{#media_dlg.autohref}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="qt_playeveryframe" name="qt_playeveryframe" onchange="generatePreview();" /></td>
+ <td><label for="qt_playeveryframe">{#media_dlg.playeveryframe}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="qt_targetcache" name="qt_targetcache" onchange="generatePreview();" /></td>
+ <td><label for="qt_targetcache">{#media_dlg.targetcache}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="qt_scale">{#media_dlg.scale}</label></td>
+ <td><select id="qt_scale" name="qt_scale" class="mceEditableSelect" onchange="generatePreview();">
+ <option value="">{#not_set}</option>
+ <option value="tofit">tofit</option>
+ <option value="aspect">aspect</option>
+ </select>
+ </td>
+
+ <td colspan="2">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td><label for="qt_starttime">{#media_dlg.starttime}</label></td>
+ <td><input type="text" id="qt_starttime" name="qt_starttime" onchange="generatePreview();" /></td>
+
+ <td><label for="qt_endtime">{#media_dlg.endtime}</label></td>
+ <td><input type="text" id="qt_endtime" name="qt_endtime" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="qt_target">{#media_dlg.target}</label></td>
+ <td><input type="text" id="qt_target" name="qt_target" onchange="generatePreview();" /></td>
+
+ <td><label for="qt_href">{#media_dlg.href}</label></td>
+ <td><input type="text" id="qt_href" name="qt_href" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="qt_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td>
+ <td><input type="text" id="qt_qtsrcchokespeed" name="qt_qtsrcchokespeed" onchange="generatePreview();" /></td>
+
+ <td><label for="qt_volume">{#media_dlg.volume}</label></td>
+ <td><input type="text" id="qt_volume" name="qt_volume" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="qt_qtsrc">{#media_dlg.qtsrc}</label></td>
+ <td colspan="4">
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="qt_qtsrc" name="qt_qtsrc" onchange="generatePreview();" /></td>
+ <td id="qtsrcfilebrowsercontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="wmp_options">
+ <legend>{#media_dlg.wmp_options}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="wmp_autostart" name="wmp_autostart" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="wmp_autostart">{#media_dlg.autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="wmp_enabled" name="wmp_enabled" onchange="generatePreview();" /></td>
+ <td><label for="wmp_enabled">{#media_dlg.enabled}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="wmp_enablecontextmenu" name="wmp_enablecontextmenu" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="wmp_enablecontextmenu">{#media_dlg.menu}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="wmp_fullscreen" name="wmp_fullscreen" onchange="generatePreview();" /></td>
+ <td><label for="wmp_fullscreen">{#media_dlg.fullscreen}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="wmp_invokeurls" name="wmp_invokeurls" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="wmp_invokeurls">{#media_dlg.invokeurls}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="wmp_mute" name="wmp_mute" onchange="generatePreview();" /></td>
+ <td><label for="wmp_mute">{#media_dlg.mute}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="wmp_stretchtofit" name="wmp_stretchtofit" onchange="generatePreview();" /></td>
+ <td><label for="wmp_stretchtofit">{#media_dlg.stretchtofit}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="wmp_windowlessvideo" name="wmp_windowlessvideo" onchange="generatePreview();" /></td>
+ <td><label for="wmp_windowlessvideo">{#media_dlg.windowlessvideo}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="wmp_balance">{#media_dlg.balance}</label></td>
+ <td><input type="text" id="wmp_balance" name="wmp_balance" onchange="generatePreview();" /></td>
+
+ <td><label for="wmp_baseurl">{#media_dlg.baseurl}</label></td>
+ <td><input type="text" id="wmp_baseurl" name="wmp_baseurl" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="wmp_captioningid">{#media_dlg.captioningid}</label></td>
+ <td><input type="text" id="wmp_captioningid" name="wmp_captioningid" onchange="generatePreview();" /></td>
+
+ <td><label for="wmp_currentmarker">{#media_dlg.currentmarker}</label></td>
+ <td><input type="text" id="wmp_currentmarker" name="wmp_currentmarker" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="wmp_currentposition">{#media_dlg.currentposition}</label></td>
+ <td><input type="text" id="wmp_currentposition" name="wmp_currentposition" onchange="generatePreview();" /></td>
+
+ <td><label for="wmp_defaultframe">{#media_dlg.defaultframe}</label></td>
+ <td><input type="text" id="wmp_defaultframe" name="wmp_defaultframe" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="wmp_playcount">{#media_dlg.playcount}</label></td>
+ <td><input type="text" id="wmp_playcount" name="wmp_playcount" onchange="generatePreview();" /></td>
+
+ <td><label for="wmp_rate">{#media_dlg.rate}</label></td>
+ <td><input type="text" id="wmp_rate" name="wmp_rate" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="wmp_uimode">{#media_dlg.uimode}</label></td>
+ <td><input type="text" id="wmp_uimode" name="wmp_uimode" onchange="generatePreview();" /></td>
+
+ <td><label for="wmp_volume">{#media_dlg.volume}</label></td>
+ <td><input type="text" id="wmp_volume" name="wmp_volume" onchange="generatePreview();" /></td>
+ </tr>
+
+ </table>
+ </fieldset>
+
+ <fieldset id="rmp_options">
+ <legend>{#media_dlg.rmp_options}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="rmp_autostart" name="rmp_autostart" onchange="generatePreview();" /></td>
+ <td><label for="rmp_autostart">{#media_dlg.autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="rmp_loop" name="rmp_loop" onchange="generatePreview();" /></td>
+ <td><label for="rmp_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="rmp_autogotourl" name="rmp_autogotourl" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="rmp_autogotourl">{#media_dlg.autogotourl}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="rmp_center" name="rmp_center" onchange="generatePreview();" /></td>
+ <td><label for="rmp_center">{#media_dlg.center}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="rmp_imagestatus" name="rmp_imagestatus" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="rmp_imagestatus">{#media_dlg.imagestatus}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="rmp_maintainaspect" name="rmp_maintainaspect" onchange="generatePreview();" /></td>
+ <td><label for="rmp_maintainaspect">{#media_dlg.maintainaspect}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="rmp_nojava" name="rmp_nojava" onchange="generatePreview();" /></td>
+ <td><label for="rmp_nojava">{#media_dlg.nojava}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="rmp_prefetch" name="rmp_prefetch" onchange="generatePreview();" /></td>
+ <td><label for="rmp_prefetch">{#media_dlg.prefetch}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="rmp_shuffle" name="rmp_shuffle" onchange="generatePreview();" /></td>
+ <td><label for="rmp_shuffle">{#media_dlg.shuffle}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ &nbsp;
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="rmp_console">{#media_dlg.console}</label></td>
+ <td><input type="text" id="rmp_console" name="rmp_console" onchange="generatePreview();" /></td>
+
+ <td><label for="rmp_controls">{#media_dlg.controls}</label></td>
+ <td><input type="text" id="rmp_controls" name="rmp_controls" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="rmp_numloop">{#media_dlg.numloop}</label></td>
+ <td><input type="text" id="rmp_numloop" name="rmp_numloop" onchange="generatePreview();" /></td>
+
+ <td><label for="rmp_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td>
+ <td><input type="text" id="rmp_scriptcallbacks" name="rmp_scriptcallbacks" onchange="generatePreview();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="shockwave_options">
+ <legend>{#media_dlg.shockwave_options}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td>
+ <td>
+ <select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="generatePreview();">
+ <option value="none">{#not_set}</option>
+ <option value="meet">Meet</option>
+ <option value="fill">Fill</option>
+ <option value="stage">Stage</option>
+ </select>
+ </td>
+
+ <td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td>
+ <td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td>
+ <td>
+ <select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="generatePreview();">
+ <option value="none">{#not_set}</option>
+ <option value="left">{#media_dlg.align_left}</option>
+ <option value="center">{#media_dlg.align_center}</option>
+ <option value="right">{#media_dlg.align_right}</option>
+ </select>
+ </td>
+
+ <td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td>
+ <td>
+ <select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="generatePreview();">
+ <option value="none">{#not_set}</option>
+ <option value="meet">Meet</option>
+ <option value="fill">Fill</option>
+ <option value="stage">Stage</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="generatePreview();" checked="checked" /></td>
+ <td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="generatePreview();" checked="checked" /></td>
+ <td><label for="shockwave_sound">{#media_dlg.sound}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="generatePreview();" /></td>
+ <td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="generatePreview();" checked="checked" /></td>
+ <td><label for="shockwave_progress">{#media_dlg.progress}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <div style="float: left">
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+
+ <div style="float: right">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ </div>
+ </div>
+ </form>
+</body>
+</html>
diff --git a/wp-includes/js/tinymce/plugins/paste/images/pastetext.gif b/wp-includes/js/tinymce/plugins/paste/images/pastetext.gif
deleted file mode 100644
index e381cc6..0000000
--- a/wp-includes/js/tinymce/plugins/paste/images/pastetext.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/paste/images/pasteword.gif b/wp-includes/js/tinymce/plugins/paste/images/pasteword.gif
deleted file mode 100644
index 0ccb008..0000000
--- a/wp-includes/js/tinymce/plugins/paste/images/pasteword.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/paste/images/selectall.gif b/wp-includes/js/tinymce/plugins/paste/images/selectall.gif
deleted file mode 100644
index c4f9901..0000000
--- a/wp-includes/js/tinymce/plugins/paste/images/selectall.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/paste/jscripts/pastetext.js b/wp-includes/js/tinymce/plugins/paste/js/pastetext.js
index 4c07691..2807387 100644
--- a/wp-includes/js/tinymce/plugins/paste/jscripts/pastetext.js
+++ b/wp-includes/js/tinymce/plugins/paste/js/pastetext.js
@@ -1,38 +1,42 @@
-function saveContent() {
- if (document.forms[0].htmlSource.value == '') {
- tinyMCEPopup.close();
- return false;
- }
-
- tinyMCEPopup.execCommand('mcePasteText', false, {
- html : document.forms[0].htmlSource.value,
- linebreaks : document.forms[0].linebreaks.checked
- });
-
- tinyMCEPopup.close();
-}
-
-function onLoadInit() {
- tinyMCEPopup.resizeToInnerSize();
-
- // Remove Gecko spellchecking
- if (tinyMCE.isGecko)
- document.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
-
- resizeInputs();
-}
-
-var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
-
-function resizeInputs() {
- if (!tinyMCE.isMSIE) {
- wHeight = self.innerHeight-80;
- wWidth = self.innerWidth-17;
- } else {
- wHeight = document.body.clientHeight-80;
- wWidth = document.body.clientWidth-17;
- }
-
- document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
- document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
-}
+tinyMCEPopup.requireLangPack();
+
+function saveContent() {
+ if (document.forms[0].htmlSource.value == '') {
+ tinyMCEPopup.close();
+ return false;
+ }
+
+ tinyMCEPopup.execCommand('mcePasteText', false, {
+ html : document.forms[0].htmlSource.value,
+ linebreaks : document.forms[0].linebreaks.checked
+ });
+
+ tinyMCEPopup.close();
+}
+
+function onLoadInit() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ // Remove Gecko spellchecking
+ if (tinymce.isGecko)
+ document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck");
+
+ resizeInputs();
+}
+
+var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
+
+function resizeInputs() {
+ if (!tinymce.isIE) {
+ wHeight = self.innerHeight-80;
+ wWidth = self.innerWidth-17;
+ } else {
+ wHeight = document.body.clientHeight-80;
+ wWidth = document.body.clientWidth-17;
+ }
+
+ document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
+ document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
+}
+
+tinyMCEPopup.onInit.add(onLoadInit); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/paste/jscripts/pasteword.js b/wp-includes/js/tinymce/plugins/paste/js/pasteword.js
index b243a10..ea9c29c 100644
--- a/wp-includes/js/tinymce/plugins/paste/jscripts/pasteword.js
+++ b/wp-includes/js/tinymce/plugins/paste/js/pasteword.js
@@ -1,52 +1,56 @@
-function saveContent() {
- var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;
-
- if (html == ''){
- tinyMCEPopup.close();
- return false;
- }
-
- tinyMCEPopup.execCommand('mcePasteWord', false, html);
- tinyMCEPopup.close();
-}
-
-function onLoadInit() {
- tinyMCEPopup.resizeToInnerSize();
-
- // Fix for endless reloading in FF
- window.setTimeout('createIFrame();', 10);
-}
-
-function createIFrame() {
- document.getElementById('iframecontainer').innerHTML = '<iframe id="frmData" name="frmData" class="sourceIframe" src="blank.htm" height="280" width="400" frameborder="0" style="background-color:#FFFFFF; width:100%;" dir="ltr" wrap="soft"></iframe>';
-}
-
-var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
-
-function initIframe(doc) {
- var dir = tinyMCE.selectedInstance.settings['directionality'];
-
- doc.body.dir = dir;
-
- // Remove Gecko spellchecking
- if (tinyMCE.isGecko)
- doc.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
-
- resizeInputs();
-}
-
-function resizeInputs() {
- if (!tinyMCE.isMSIE) {
- wHeight = self.innerHeight - 80;
- wWidth = self.innerWidth - 18;
- } else {
- wHeight = document.body.clientHeight - 80;
- wWidth = document.body.clientWidth - 18;
- }
-
- var elm = document.getElementById('frmData');
- if (elm) {
- elm.style.height = Math.abs(wHeight) + 'px';
- elm.style.width = Math.abs(wWidth) + 'px';
- }
-}
+tinyMCEPopup.requireLangPack();
+
+function saveContent() {
+ var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;
+
+ if (html == ''){
+ tinyMCEPopup.close();
+ return false;
+ }
+
+ tinyMCEPopup.execCommand('mcePasteWord', false, html);
+ tinyMCEPopup.close();
+}
+
+function onLoadInit() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ // Fix for endless reloading in FF
+ window.setTimeout(createIFrame, 10);
+}
+
+function createIFrame() {
+ document.getElementById('iframecontainer').innerHTML = '<iframe id="frmData" name="frmData" class="sourceIframe" src="blank.htm" height="280" width="400" frameborder="0" style="background-color:#FFFFFF; width:100%;" dir="ltr" wrap="soft"></iframe>';
+}
+
+var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
+
+function initIframe(doc) {
+ var dir = tinyMCEPopup.editor.settings.directionality;
+
+ doc.body.dir = dir;
+
+ // Remove Gecko spellchecking
+ if (tinymce.isGecko)
+ doc.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck");
+
+ resizeInputs();
+}
+
+function resizeInputs() {
+ if (!tinymce.isIE) {
+ wHeight = self.innerHeight - 80;
+ wWidth = self.innerWidth - 18;
+ } else {
+ wHeight = document.body.clientHeight - 80;
+ wWidth = document.body.clientWidth - 18;
+ }
+
+ var elm = document.getElementById('frmData');
+ if (elm) {
+ elm.style.height = Math.abs(wHeight) + 'px';
+ elm.style.width = Math.abs(wWidth) + 'px';
+ }
+}
+
+tinyMCEPopup.onInit.add(onLoadInit);
diff --git a/wp-includes/js/tinymce/plugins/paste/langs/en.js b/wp-includes/js/tinymce/plugins/paste/langs/en.js
deleted file mode 100644
index b125d51..0000000
--- a/wp-includes/js/tinymce/plugins/paste/langs/en.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// UK lang variables
-
-tinyMCE.addToLang('',{
-paste_text_desc : 'Paste as Plain Text',
-paste_text_title : 'Use CTRL+V on your keyboard to paste the text into the window.',
-paste_text_linebreaks : 'Keep linebreaks',
-paste_word_desc : 'Paste from Word',
-paste_word_title : 'Use CTRL+V on your keyboard to paste the text into the window.',
-selectall_desc : 'Select All'
-});
diff --git a/wp-includes/js/tinymce/plugins/safari/blank.htm b/wp-includes/js/tinymce/plugins/safari/blank.htm
new file mode 100644
index 0000000..266808c
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/safari/blank.htm
@@ -0,0 +1 @@
+<!-- WebKit --> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/safari/editor_plugin.js b/wp-includes/js/tinymce/plugins/safari/editor_plugin.js
new file mode 100644
index 0000000..960fc71
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/safari/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var Event=tinymce.dom.Event,grep=tinymce.grep,each=tinymce.each,inArray=tinymce.inArray,isOldWebKit=tinymce.isOldWebKit;tinymce.create('tinymce.plugins.Safari',{init:function(ed){var t=this,dom;if(!tinymce.isWebKit)return;t.editor=ed;t.webKitFontSizes=['x-small','small','medium','large','x-large','xx-large','-webkit-xxx-large'];t.namedFontSizes=['xx-small','x-small','small','medium','large','x-large','xx-large'];ed.onKeyUp.add(function(ed,e){var h;if(e.keyCode==46||e.keyCode==8){h=ed.getBody().innerHTML;if(!/<(img|hr)/.test(h)&&tinymce.trim(h.replace(/<[^>]+>/g,'')).length==0)ed.setContent('',{format:'raw'});}});ed.addCommand('FormatBlock',function(u,v){var dom=ed.dom,e=dom.getParent(ed.selection.getNode(),dom.isBlock);if(e)dom.replace(dom.create(v),e,1);else ed.getDoc().execCommand("FormatBlock",false,v);});ed.addCommand('mceInsertContent',function(u,v){ed.getDoc().execCommand("InsertText",false,'mce_marker');ed.getBody().innerHTML=ed.getBody().innerHTML.replace(/mce_marker/g,v+'<span id="_mce_tmp">XX</span>');ed.selection.select(ed.dom.get('_mce_tmp'));ed.getDoc().execCommand("Delete",false,' ');});ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&(e.shiftKey||ed.settings.force_br_newlines&&ed.selection.getNode().nodeName!='LI')){t._insertBR(ed);Event.cancel(e);}});ed.addQueryValueHandler('FontSize',function(u,v){var e,v;if((e=ed.dom.getParent(ed.selection.getStart(),'span'))&&(v=e.style.fontSize))return tinymce.inArray(t.namedFontSizes,v)+1;if((e=ed.dom.getParent(ed.selection.getEnd(),'span'))&&(v=e.style.fontSize))return tinymce.inArray(t.namedFontSizes,v)+1;return ed.getDoc().queryCommandValue('FontSize');});ed.addQueryValueHandler('FontName',function(u,v){var e,v;if((e=ed.dom.getParent(ed.selection.getStart(),'span'))&&(v=e.style.fontFamily))return v.replace(/, /g,',');if((e=ed.dom.getParent(ed.selection.getEnd(),'span'))&&(v=e.style.fontFamily))return v.replace(/, /g,',');return ed.getDoc().queryCommandValue('FontName');});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName=='IMG'){t.selElm=e;ed.selection.select(e);}else t.selElm=null;});ed.onBeforeExecCommand.add(function(ed,c,b){var r=t.bookmarkRng;if(r){ed.selection.setRng(r);t.bookmarkRng=null;}});ed.onInit.add(function(){t._fixWebKitSpans();ed.windowManager.onOpen.add(function(){var r=ed.selection.getRng();if(r.startContainer!=ed.getDoc()){t.bookmarkRng=r.cloneRange();}});ed.windowManager.onClose.add(function(){t.bookmarkRng=null;});if(isOldWebKit)t._patchSafari2x(ed);});ed.onSetContent.add(function(){dom=ed.dom;each(['strong','b','em','u','strike','sub','sup','a'],function(v){each(grep(dom.select(v)).reverse(),function(n){var nn=n.nodeName.toLowerCase(),st;if(nn=='a'){if(n.name)dom.replace(dom.create('img',{mce_name:'a',name:n.name,'class':'mceItemAnchor'}),n);return;}switch(nn){case'b':case'strong':if(nn=='b')nn='strong';st='font-weight: bold;';break;case'em':st='font-style: italic;';break;case'u':st='text-decoration: underline;';break;case'sub':st='vertical-align: sub;';break;case'sup':st='vertical-align: super;';break;case'strike':st='text-decoration: line-through;';break;}dom.replace(dom.create('span',{mce_name:nn,style:st,'class':'Apple-style-span'}),n,1);});});});ed.onPreProcess.add(function(ed,o){dom=ed.dom;each(grep(o.node.getElementsByTagName('span')).reverse(),function(n){var v,bg;if(o.get){if(dom.hasClass(n,'Apple-style-span')){bg=n.style.backgroundColor;switch(dom.getAttrib(n,'mce_name')){case'font':if(!ed.settings.convert_fonts_to_spans)dom.setAttrib(n,'style','');break;case'strong':case'em':case'sub':case'sup':dom.setAttrib(n,'style','');break;case'strike':case'u':if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');else dom.setAttrib(n,'mce_name','');break;default:if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');}if(bg)n.style.backgroundColor=bg;}}if(dom.hasClass(n,'mceItemRemoved'))dom.remove(n,1);});});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<br \/><\/(h[1-6]|div|p|address|pre)>/g,'</$1>');o.content=o.content.replace(/ id=\"undefined\"/g,'');});},_fixWebKitSpans:function(){var t=this,ed=t.editor;if(!isOldWebKit){Event.add(ed.getDoc(),'DOMNodeInserted',function(e){e=e.target;if(e&&e.nodeType==1)t._fixAppleSpan(e);});}else{ed.onExecCommand.add(function(){each(ed.dom.select('span'),function(n){t._fixAppleSpan(n);});ed.nodeChanged();});}},_fixAppleSpan:function(e){var ed=this.editor,dom=ed.dom,fz=this.webKitFontSizes,fzn=this.namedFontSizes,s=ed.settings,st,p;if(dom.getAttrib(e,'mce_fixed'))return;if(e.nodeName=='SPAN'&&e.className=='Apple-style-span'){st=e.style;if(!s.convert_fonts_to_spans){if(st.fontSize){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'size',inArray(fz,st.fontSize)+1);}if(st.fontFamily){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'face',st.fontFamily);}if(st.color){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'color',dom.toHex(st.color));}if(st.backgroundColor){dom.setAttrib(e,'mce_name','font');dom.setStyle(e,'background-color',st.backgroundColor);}}else{if(st.fontSize)dom.setStyle(e,'fontSize',fzn[inArray(fz,st.fontSize)]);}if(st.fontWeight=='bold')dom.setAttrib(e,'mce_name','strong');if(st.fontStyle=='italic')dom.setAttrib(e,'mce_name','em');if(st.textDecoration=='underline')dom.setAttrib(e,'mce_name','u');if(st.textDecoration=='line-through')dom.setAttrib(e,'mce_name','strike');if(st.verticalAlign=='super')dom.setAttrib(e,'mce_name','sup');if(st.verticalAlign=='sub')dom.setAttrib(e,'mce_name','sub');dom.setAttrib(e,'mce_fixed','1');}},_patchSafari2x:function(ed){var t=this,setContent,getNode,dom=ed.dom,lr;if(ed.windowManager.onBeforeOpen){ed.windowManager.onBeforeOpen.add(function(){r=ed.selection.getRng();});}ed.selection.select=function(n){this.getSel().setBaseAndExtent(n,0,n,1);};getNode=ed.selection.getNode;ed.selection.getNode=function(){return t.selElm||getNode.call(this);};ed.selection.getRng=function(){var t=this,s=t.getSel(),d=ed.getDoc(),r,rb,ra,di;if(s.anchorNode){r=d.createRange();try{rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(1);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(1);di=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;r.setStart(di?s.anchorNode:s.focusNode,di?s.anchorOffset:s.focusOffset);r.setEnd(di?s.focusNode:s.anchorNode,di?s.focusOffset:s.anchorOffset);lr=r;}catch(ex){}}return r||lr;};setContent=ed.selection.setContent;ed.selection.setContent=function(h,s){var r=this.getRng(),b;try{setContent.call(this,h,s);}catch(ex){b=dom.create('body');b.innerHTML=h;each(b.childNodes,function(n){r.insertNode(n.cloneNode(true));});}};},_insertBR:function(ed){var dom=ed.dom,s=ed.selection,r=s.getRng(),br;r.insertNode(br=dom.create('br'));r.setStartAfter(br);r.setEndAfter(br);s.setRng(r);if(s.getSel().focusNode==br.previousSibling){s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'),br));s.collapse(1);}ed.getWin().scrollTo(0,dom.getPos(s.getRng().startContainer).y);}});tinymce.PluginManager.add('safari',tinymce.plugins.Safari);})(); \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php
new file mode 100644
index 0000000..00c9f9f
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php
@@ -0,0 +1,158 @@
+<?php
+/**
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
+ */
+
+class GoogleSpell extends SpellChecker {
+ /**
+ * Spellchecks an array of words.
+ *
+ * @param {String} $lang Language code like sv or en.
+ * @param {Array} $words Array of words to spellcheck.
+ * @return {Array} Array of misspelled words.
+ */
+ function &checkWords($lang, $words) {
+ $wordstr = implode(' ', $words);
+ $matches = $this->_getMatches($lang, $wordstr);
+ $words = array();
+
+ for ($i=0; $i<count($matches); $i++)
+ $words[] = $this->_unhtmlentities(mb_substr($wordstr, $matches[$i][1], $matches[$i][2], "UTF-8"));
+
+ return $words;
+ }
+
+ /**
+ * Returns suggestions of for a specific word.
+ *
+ * @param {String} $lang Language code like sv or en.
+ * @param {String} $word Specific word to get suggestions for.
+ * @return {Array} Array of suggestions for the specified word.
+ */
+ function &getSuggestions($lang, $word) {
+ $sug = array();
+ $osug = array();
+ $matches = $this->_getMatches($lang, $word);
+
+ if (count($matches) > 0)
+ $sug = explode("\t", utf8_encode($this->_unhtmlentities($matches[0][4])));
+
+ // Remove empty
+ foreach ($sug as $item) {
+ if ($item)
+ $osug[] = $item;
+ }
+
+ return $osug;
+ }
+
+ function &_getMatches($lang, $str) {
+ $server = "www.google.com";
+ $port = 443;
+ $path = "/tbproxy/spell?lang=" . $lang . "&hl=en";
+ $host = "www.google.com";
+ $url = "https://" . $server;
+
+ // Setup XML request
+ $xml = '<?xml version="1.0" encoding="utf-8" ?><spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1"><text>' . $str . '</text></spellrequest>';
+
+ $header = "POST ".$path." HTTP/1.0 \r\n";
+ $header .= "MIME-Version: 1.0 \r\n";
+ $header .= "Content-type: application/PTI26 \r\n";
+ $header .= "Content-length: ".strlen($xml)." \r\n";
+ $header .= "Content-transfer-encoding: text \r\n";
+ $header .= "Request-number: 1 \r\n";
+ $header .= "Document-type: Request \r\n";
+ $header .= "Interface-Version: Test 1.4 \r\n";
+ $header .= "Connection: close \r\n\r\n";
+ $header .= $xml;
+
+ // Use curl if it exists
+ if (function_exists('curl_init')) {
+ // Use curl
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL,$url);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
+ $xml = curl_exec($ch);
+ curl_close($ch);
+ } else {
+ // Use raw sockets
+ $fp = fsockopen("ssl://" . $server, $port, $errno, $errstr, 30);
+ if ($fp) {
+ // Send request
+ fwrite($fp, $header);
+
+ // Read response
+ $xml = "";
+ while (!feof($fp))
+ $xml .= fgets($fp, 128);
+
+ fclose($fp);
+ } else
+ echo "Could not open SSL connection to google.";
+ }
+
+ // Grab and parse content
+ $matches = array();
+ preg_match_all('/<c o="([^"]*)" l="([^"]*)" s="([^"]*)">([^<]*)<\/c>/', $xml, $matches, PREG_SET_ORDER);
+
+ return $matches;
+ }
+
+ function _unhtmlentities($string) {
+ $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
+ $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
+
+ $trans_tbl = get_html_translation_table(HTML_ENTITIES);
+ $trans_tbl = array_flip($trans_tbl);
+
+ return strtr($string, $trans_tbl);
+ }
+}
+
+// Patch in multibyte support
+if (!function_exists('mb_substr')) {
+ function mb_substr($str, $start, $len = '', $encoding="UTF-8"){
+ $limit = strlen($str);
+
+ for ($s = 0; $start > 0;--$start) {// found the real start
+ if ($s >= $limit)
+ break;
+
+ if ($str[$s] <= "\x7F")
+ ++$s;
+ else {
+ ++$s; // skip length
+
+ while ($str[$s] >= "\x80" && $str[$s] <= "\xBF")
+ ++$s;
+ }
+ }
+
+ if ($len == '')
+ return substr($str, $s);
+ else
+ for ($e = $s; $len > 0; --$len) {//found the real end
+ if ($e >= $limit)
+ break;
+
+ if ($str[$e] <= "\x7F")
+ ++$e;
+ else {
+ ++$e;//skip length
+
+ while ($str[$e] >= "\x80" && $str[$e] <= "\xBF" && $e < $limit)
+ ++$e;
+ }
+ }
+
+ return substr($str, $s, $e - $s);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/HttpClient.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/HttpClient.class.php
deleted file mode 100755
index cae27f0..0000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/HttpClient.class.php
+++ /dev/null
@@ -1,339 +0,0 @@
-<?php
-
-/* Version 0.9, 6th April 2003 - Simon Willison ( http://simon.incutio.com/ )
- Manual: http://scripts.incutio.com/httpclient/
-*/
-
-class HttpClient {
- // Request vars
- var $host;
- var $port;
- var $path;
- var $method;
- var $postdata = '';
- var $cookies = array();
- var $referer;
- var $accept = 'text/xml,application/xml,application/xhtml+xml,text/html,text/plain,image/png,image/jpeg,image/gif,*/*';
- var $accept_encoding = 'gzip';
- var $accept_language = 'en-us';
- var $user_agent = 'Incutio HttpClient v0.9';
- // Options
- var $timeout = 20;
- var $use_gzip = true;
- var $persist_cookies = true; // If true, received cookies are placed in the $this->cookies array ready for the next request
- // Note: This currently ignores the cookie path (and time) completely. Time is not important,
- // but path could possibly lead to security problems.
- var $persist_referers = true; // For each request, sends path of last request as referer
- var $debug = false;
- var $handle_redirects = true; // Auaomtically redirect if Location or URI header is found
- var $max_redirects = 5;
- var $headers_only = false; // If true, stops receiving once headers have been read.
- // Basic authorization variables
- var $username;
- var $password;
- // Response vars
- var $status;
- var $headers = array();
- var $content = '';
- var $errormsg;
- // Tracker variables
- var $redirect_count = 0;
- var $cookie_host = '';
- function HttpClient($host, $port=80) {
- $this->host = $host;
- $this->port = $port;
- }
- function get($path, $data = false) {
- $this->path = $path;
- $this->method = 'GET';
- if ($data) {
- $this->path .= '?'.$this->buildQueryString($data);
- }
- return $this->doRequest();
- }
- function post($path, $data) {
- $this->path = $path;
- $this->method = 'POST';
- $this->postdata = $this->buildQueryString($data);
- return $this->doRequest();
- }
- function buildQueryString($data) {
- $querystring = '';
- if (is_array($data)) {
- // Change data in to postable data
- foreach ($data as $key => $val) {
- if (is_array($val)) {
- foreach ($val as $val2) {
- $querystring .= urlencode($key).'='.urlencode($val2).'&';
- }
- } else {
- $querystring .= urlencode($key).'='.urlencode($val).'&';
- }
- }
- $querystring = substr($querystring, 0, -1); // Eliminate unnecessary &
- } else {
- $querystring = $data;
- }
- return $querystring;
- }
- function doRequest() {
- // Performs the actual HTTP request, returning true or false depending on outcome
- if (!$fp = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout)) {
- // Set error message
- switch($errno) {
- case -3:
- $this->errormsg = 'Socket creation failed (-3)';
- case -4:
- $this->errormsg = 'DNS lookup failure (-4)';
- case -5:
- $this->errormsg = 'Connection refused or timed out (-5)';
- default:
- $this->errormsg = 'Connection failed ('.$errno.')';
- $this->errormsg .= ' '.$errstr;
- $this->debug($this->errormsg);
- }
- return false;
- }
- socket_set_timeout($fp, $this->timeout);
- $request = $this->buildRequest();
- $this->debug('Request', $request);
- fwrite($fp, $request);
- // Reset all the variables that should not persist between requests
- $this->headers = array();
- $this->content = '';
- $this->errormsg = '';
- // Set a couple of flags
- $inHeaders = true;
- $atStart = true;
- // Now start reading back the response
- while (!feof($fp)) {
- $line = fgets($fp, 4096);
- if ($atStart) {
- // Deal with first line of returned data
- $atStart = false;
- if (!preg_match('/HTTP\/(\\d\\.\\d)\\s*(\\d+)\\s*(.*)/', $line, $m)) {
- $this->errormsg = "Status code line invalid: ".htmlentities($line);
- $this->debug($this->errormsg);
- return false;
- }
- $http_version = $m[1]; // not used
- $this->status = $m[2];
- $status_string = $m[3]; // not used
- $this->debug(trim($line));
- continue;
- }
- if ($inHeaders) {
- if (trim($line) == '') {
- $inHeaders = false;
- $this->debug('Received Headers', $this->headers);
- if ($this->headers_only) {
- break; // Skip the rest of the input
- }
- continue;
- }
- if (!preg_match('/([^:]+):\\s*(.*)/', $line, $m)) {
- // Skip to the next header
- continue;
- }
- $key = strtolower(trim($m[1]));
- $val = trim($m[2]);
- // Deal with the possibility of multiple headers of same name
- if (isset($this->headers[$key])) {
- if (is_array($this->headers[$key])) {
- $this->headers[$key][] = $val;
- } else {
- $this->headers[$key] = array($this->headers[$key], $val);
- }
- } else {
- $this->headers[$key] = $val;
- }
- continue;
- }
- // We're not in the headers, so append the line to the contents
- $this->content .= $line;
- }
- fclose($fp);
- // If data is compressed, uncompress it
- if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] == 'gzip') {
- $this->debug('Content is gzip encoded, unzipping it');
- $this->content = substr($this->content, 10); // See http://www.php.net/manual/en/function.gzencode.php
- $this->content = gzinflate($this->content);
- }
- // If $persist_cookies, deal with any cookies
- if ($this->persist_cookies && isset($this->headers['set-cookie']) && $this->host == $this->cookie_host) {
- $cookies = $this->headers['set-cookie'];
- if (!is_array($cookies)) {
- $cookies = array($cookies);
- }
- foreach ($cookies as $cookie) {
- if (preg_match('/([^=]+)=([^;]+);/', $cookie, $m)) {
- $this->cookies[$m[1]] = $m[2];
- }
- }
- // Record domain of cookies for security reasons
- $this->cookie_host = $this->host;
- }
- // If $persist_referers, set the referer ready for the next request
- if ($this->persist_referers) {
- $this->debug('Persisting referer: '.$this->getRequestURL());
- $this->referer = $this->getRequestURL();
- }
- // Finally, if handle_redirects and a redirect is sent, do that
- if ($this->handle_redirects) {
- if (++$this->redirect_count >= $this->max_redirects) {
- $this->errormsg = 'Number of redirects exceeded maximum ('.$this->max_redirects.')';
- $this->debug($this->errormsg);
- $this->redirect_count = 0;
- return false;
- }
- $location = isset($this->headers['location']) ? $this->headers['location'] : '';
- $uri = isset($this->headers['uri']) ? $this->headers['uri'] : '';
- if ($location || $uri) {
- $url = parse_url($location.$uri);
- // This will FAIL if redirect is to a different site
- return $this->get($url['path']);
- }
- }
- return true;
- }
- function buildRequest() {
- $headers = array();
- $headers[] = "{$this->method} {$this->path} HTTP/1.0"; // Using 1.1 leads to all manner of problems, such as "chunked" encoding
- $headers[] = "Host: {$this->host}";
- $headers[] = "User-Agent: {$this->user_agent}";
- $headers[] = "Accept: {$this->accept}";
- if ($this->use_gzip) {
- $headers[] = "Accept-encoding: {$this->accept_encoding}";
- }
- $headers[] = "Accept-language: {$this->accept_language}";
- if ($this->referer) {
- $headers[] = "Referer: {$this->referer}";
- }
- // Cookies
- if ($this->cookies) {
- $cookie = 'Cookie: ';
- foreach ($this->cookies as $key => $value) {
- $cookie .= "$key=$value; ";
- }
- $headers[] = $cookie;
- }
- // Basic authentication
- if ($this->username && $this->password) {
- $headers[] = 'Authorization: BASIC '.base64_encode($this->username.':'.$this->password);
- }
- // If this is a POST, set the content type and length
- if ($this->postdata) {
- $headers[] = 'Content-Type: application/x-www-form-urlencoded';
- $headers[] = 'Content-Length: '.strlen($this->postdata);
- }
- $request = implode("\r\n", $headers)."\r\n\r\n".$this->postdata;
- return $request;
- }
- function getStatus() {
- return $this->status;
- }
- function getContent() {
- return $this->content;
- }
- function getHeaders() {
- return $this->headers;
- }
- function getHeader($header) {
- $header = strtolower($header);
- if (isset($this->headers[$header])) {
- return $this->headers[$header];
- } else {
- return false;
- }
- }
- function getError() {
- return $this->errormsg;
- }
- function getCookies() {
- return $this->cookies;
- }
- function getRequestURL() {
- $url = 'http://'.$this->host;
- if ($this->port != 80) {
- $url .= ':'.$this->port;
- }
- $url .= $this->path;
- return $url;
- }
- // Setter methods
- function setUserAgent($string) {
- $this->user_agent = $string;
- }
- function setAuthorization($username, $password) {
- $this->username = $username;
- $this->password = $password;
- }
- function setCookies($array) {
- $this->cookies = $array;
- }
- // Option setting methods
- function useGzip($boolean) {
- $this->use_gzip = $boolean;
- }
- function setPersistCookies($boolean) {
- $this->persist_cookies = $boolean;
- }
- function setPersistReferers($boolean) {
- $this->persist_referers = $boolean;
- }
- function setHandleRedirects($boolean) {
- $this->handle_redirects = $boolean;
- }
- function setMaxRedirects($num) {
- $this->max_redirects = $num;
- }
- function setHeadersOnly($boolean) {
- $this->headers_only = $boolean;
- }
- function setDebug($boolean) {
- $this->debug = $boolean;
- }
- // "Quick" static methods
- function quickGet($url) {
- $bits = parse_url($url);
- $host = $bits['host'];
- $port = isset($bits['port']) ? $bits['port'] : 80;
- $path = isset($bits['path']) ? $bits['path'] : '/';
- if (isset($bits['query'])) {
- $path .= '?'.$bits['query'];
- }
- $client = new HttpClient($host, $port);
- if (!$client->get($path)) {
- return false;
- } else {
- return $client->getContent();
- }
- }
- function quickPost($url, $data) {
- $bits = parse_url($url);
- $host = $bits['host'];
- $port = isset($bits['port']) ? $bits['port'] : 80;
- $path = isset($bits['path']) ? $bits['path'] : '/';
- $client = new HttpClient($host, $port);
- if (!$client->post($path, $data)) {
- return false;
- } else {
- return $client->getContent();
- }
- }
- function debug($msg, $object = false) {
- if ($this->debug) {
- print '<div style="border: 1px solid red; padding: 0.5em; margin: 0.5em;"><strong>HttpClient Debug:</strong> '.$msg;
- if ($object) {
- ob_start();
- print_r($object);
- $content = htmlentities(ob_get_contents());
- ob_end_clean();
- print '<pre>'.$content.'</pre>';
- }
- print '</div>';
- }
- }
-}
-
-?> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php
new file mode 100644
index 0000000..48af873
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
+ */
+
+class PSpell extends SpellChecker {
+ /**
+ * Spellchecks an array of words.
+ *
+ * @param {String} $lang Language code like sv or en.
+ * @param {Array} $words Array of words to spellcheck.
+ * @return {Array} Array of misspelled words.
+ */
+ function &checkWords($lang, $words) {
+ $plink = $this->_getPLink($lang);
+
+ $outWords = array();
+ foreach ($words as $word) {
+ if (!pspell_check($plink, trim($word)))
+ $outWords[] = utf8_encode($word);
+ }
+
+ return $outWords;
+ }
+
+ /**
+ * Returns suggestions of for a specific word.
+ *
+ * @param {String} $lang Language code like sv or en.
+ * @param {String} $word Specific word to get suggestions for.
+ * @return {Array} Array of suggestions for the specified word.
+ */
+ function &getSuggestions($lang, $word) {
+ $words = pspell_suggest($this->_getPLink($lang), $word);
+
+ for ($i=0; $i<count($words); $i++)
+ $words[$i] = utf8_encode($words[$i]);
+
+ return $words;
+ }
+
+ /**
+ * Opens a link for pspell.
+ */
+ function &_getPLink($lang) {
+ // Check for native PSpell support
+ if (!function_exists("pspell_new"))
+ $this->throwError("PSpell support not found in PHP installation.");
+
+ // Setup PSpell link
+ $plink = pspell_new(
+ $lang,
+ $this->_config['PSpell.spelling'],
+ $this->_config['PSpell.jargon'],
+ $this->_config['PSpell.encoding'],
+ $this->_config['PSpell.mode']
+ );
+
+ // Setup PSpell link
+/* if (!$plink) {
+ $pspellConfig = pspell_config_create(
+ $lang,
+ $this->_config['PSpell.spelling'],
+ $this->_config['PSpell.jargon'],
+ $this->_config['PSpell.encoding']
+ );
+
+ $plink = pspell_new_config($pspell_config);
+ }*/
+
+ if (!$plink)
+ $this->throwError("No PSpell link found opened.");
+
+ return $plink;
+ }
+}
+
+?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php
new file mode 100644
index 0000000..779e837
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php
@@ -0,0 +1,112 @@
+<?php
+/**
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
+ */
+
+class PSpellShell extends SpellChecker {
+ /**
+ * Spellchecks an array of words.
+ *
+ * @param {String} $lang Language code like sv or en.
+ * @param {Array} $words Array of words to spellcheck.
+ * @return {Array} Array of misspelled words.
+ */
+ function &checkWords($lang, $words) {
+ $cmd = $this->_getCMD($lang);
+
+ if ($fh = fopen($this->_tmpfile, "w")) {
+ fwrite($fh, "!\n");
+
+ foreach($words as $key => $value)
+ fwrite($fh, "^" . $value . "\n");
+
+ fclose($fh);
+ } else
+ $this->throwError("PSpell support was not found.");
+
+ $data = shell_exec($cmd);
+ @unlink($this->_tmpfile);
+
+ $returnData = array();
+ $dataArr = preg_split("/[\r\n]/", $data, -1, PREG_SPLIT_NO_EMPTY);
+
+ foreach ($dataArr as $dstr) {
+ $matches = array();
+
+ // Skip this line.
+ if (strpos($dstr, "@") === 0)
+ continue;
+
+ preg_match("/\& ([^ ]+) .*/i", $dstr, $matches);
+
+ if (!empty($matches[1]))
+ $returnData[] = utf8_encode(trim($matches[1]));
+ }
+
+ return $returnData;
+ }
+
+ /**
+ * Returns suggestions of for a specific word.
+ *
+ * @param {String} $lang Language code like sv or en.
+ * @param {String} $word Specific word to get suggestions for.
+ * @return {Array} Array of suggestions for the specified word.
+ */
+ function &getSuggestions($lang, $word) {
+ $cmd = $this->_getCMD($lang);
+
+ if (function_exists("mb_convert_encoding"))
+ $word = mb_convert_encoding($word, "ISO-8859-1", mb_detect_encoding($word, "UTF-8"));
+ else
+ $word = utf8_encode($word);
+
+ if ($fh = fopen($this->_tmpfile, "w")) {
+ fwrite($fh, "!\n");
+ fwrite($fh, "^$word\n");
+ fclose($fh);
+ } else
+ $this->throwError("Error opening tmp file.");
+
+ $data = shell_exec($cmd);
+ @unlink($this->_tmpfile);
+
+ $returnData = array();
+ $dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
+
+ foreach($dataArr as $dstr) {
+ $matches = array();
+
+ // Skip this line.
+ if (strpos($dstr, "@") === 0)
+ continue;
+
+ preg_match("/\&[^:]+:(.*)/i", $dstr, $matches);
+
+ if (!empty($matches[1])) {
+ $words = array_slice(explode(',', $matches[1]), 0, 10);
+
+ for ($i=0; $i<count($words); $i++)
+ $words[$i] = trim($words[$i]);
+
+ return $words;
+ }
+ }
+
+ return array();
+ }
+
+ function _getCMD($lang) {
+ $this->_tmpfile = tempnam($this->_config['PSpellShell.tmp'], "tinyspell");
+
+ if(preg_match("#win#i", php_uname()))
+ return $this->_config['PSpellShell.aspell'] . " -a --lang=". $lang . " --encoding=utf-8 -H < " . $this->_tmpfile . " 2>&1";
+
+ return "cat ". $this->_tmpfile ." | " . $this->_config['PSpellShell.aspell'] . " -a --encoding=utf-8 -H --lang=". $lang;
+ }
+}
+
+?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php
new file mode 100644
index 0000000..ca7b143
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
+ */
+
+class SpellChecker {
+ /**
+ * Constructor.
+ *
+ * @param $config Configuration name/value array.
+ */
+ function SpellChecker(&$config) {
+ $this->_config = $config;
+ }
+
+ /**
+ * Simple loopback function everything that gets in will be send back.
+ *
+ * @param $args.. Arguments.
+ * @return {Array} Array of all input arguments.
+ */
+ function &loopback(/* args.. */) {
+ return func_get_args();
+ }
+
+ /**
+ * Spellchecks an array of words.
+ *
+ * @param {String} $lang Language code like sv or en.
+ * @param {Array} $words Array of words to spellcheck.
+ * @return {Array} Array of misspelled words.
+ */
+ function &checkWords($lang, $words) {
+ return $words;
+ }
+
+ /**
+ * Returns suggestions of for a specific word.
+ *
+ * @param {String} $lang Language code like sv or en.
+ * @param {String} $word Specific word to get suggestions for.
+ * @return {Array} Array of suggestions for the specified word.
+ */
+ function &getSuggestions($lang, $word) {
+ return array();
+ }
+
+ /**
+ * Throws an error message back to the user. This will stop all execution.
+ *
+ * @param {String} $str Message to send back to user.
+ */
+ function throwError($str) {
+ die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
+ }
+}
+
+?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php
deleted file mode 100755
index 0127ff1..0000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php
+++ /dev/null
@@ -1,126 +0,0 @@
-<?php
-/* *
- * Tiny Spelling Interface for TinyMCE Spell Checking.
- *
- * Copyright © 2006 Moxiecode Systems AB
- */
-
-class TinyGoogleSpell {
- var $lang;
-
- function TinyGoogleSpell(&$config, $lang, $mode, $spelling, $jargon, $encoding) {
- $this->lang = $lang;
- }
-
- // Returns array with bad words or false if failed.
- function checkWords($word_array) {
- $words = array();
- $wordstr = implode(' ', $word_array);
-
- $matches = $this->_getMatches($wordstr);
-
- for ($i=0; $i<count($matches); $i++)
- $words[] = $this->unhtmlentities(mb_substr($wordstr, $matches[$i][1], $matches[$i][2], "UTF-8"));
-
- return $words;
- }
-
- function unhtmlentities($string) {
- $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
- $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
-
- $trans_tbl = get_html_translation_table(HTML_ENTITIES);
- $trans_tbl = array_flip($trans_tbl);
-
- return strtr($string, $trans_tbl);
- }
-
- // Returns array with suggestions or false if failed.
- function getSuggestion($word) {
- $sug = array();
-
- $matches = $this->_getMatches($word);
-
- if (count($matches) > 0)
- $sug = explode("\t", utf8_encode($this->unhtmlentities($matches[0][4])));
-
- return $sug;
- }
-
- function _xmlChars($string) {
- $trans = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES);
-
- foreach ($trans as $k => $v)
- $trans[$k] = "&#".ord($k).";";
-
- return strtr($string, $trans);
- }
-
- function _getMatches($word_list) {
- $server = "www.google.com";
- $port = 443;
- $path = "/tbproxy/spell?lang=" . $this->lang . "&hl=en";
- $host = "www.google.com";
- $url = "https://" . $server;
-
- // Setup XML request
- $xml = '<?xml version="1.0" encoding="utf-8" ?><spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1"><text>' . $word_list . '</text></spellrequest>';
-
- $header = "POST ".$path." HTTP/1.0 \r\n";
- $header .= "MIME-Version: 1.0 \r\n";
- $header .= "Content-type: application/PTI26 \r\n";
- $header .= "Content-length: ".strlen($xml)." \r\n";
- $header .= "Content-transfer-encoding: text \r\n";
- $header .= "Request-number: 1 \r\n";
- $header .= "Document-type: Request \r\n";
- $header .= "Interface-Version: Test 1.4 \r\n";
- $header .= "Connection: close \r\n\r\n";
- $header .= $xml;
- //$this->_debugData($xml);
-
- // Use curl if it exists
- if (function_exists('curl_init')) {
- // Use curl
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,$url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- $xml = curl_exec($ch);
- curl_close($ch);
- } else {
- // Use raw sockets
- $fp = fsockopen("ssl://" . $server, $port, $errno, $errstr, 30);
- if ($fp) {
- // Send request
- fwrite($fp, $header);
-
- // Read response
- $xml = "";
- while (!feof($fp))
- $xml .= fgets($fp, 128);
-
- fclose($fp);
- } else
- echo "Could not open SSL connection to google.";
- }
-
- //$this->_debugData($xml);
-
- // Grab and parse content
- preg_match_all('/<c o="([^"]*)" l="([^"]*)" s="([^"]*)">([^<]*)<\/c>/', $xml, $matches, PREG_SET_ORDER);
-
- return $matches;
- }
-
- function _debugData($data) {
- $fh = @fopen("debug.log", 'a+');
- @fwrite($fh, $data);
- @fclose($fh);
- }
-}
-
-// Setup classname, should be the same as the name of the spellchecker class
-$spellCheckerConfig['class'] = "TinyGoogleSpell";
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php
deleted file mode 100755
index 21fb194..0000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/* *
- * Tiny Spelling Interface for TinyMCE Spell Checking.
- *
- * Copyright © 2006 Moxiecode Systems AB
- *
- */
-
-class TinyPSpell {
- var $lang;
- var $mode;
- var $string;
- var $plink;
- var $errorMsg;
-
- var $jargon;
- var $spelling;
- var $encoding;
-
- function TinyPSpell(&$config, $lang, $mode, $spelling, $jargon, $encoding) {
- $this->lang = $lang;
- $this->mode = $mode;
- $this->plink = false;
- $this->errorMsg = array();
-
- if (!function_exists("pspell_new")) {
- $this->errorMsg[] = "PSpell not found.";
- return;
- }
-
- $this->plink = pspell_new($this->lang, $this->spelling, $this->jargon, $this->encoding, $this->mode);
- }
-
- // Returns array with bad words or false if failed.
- function checkWords($wordArray) {
- if (!$this->plink) {
- $this->errorMsg[] = "No PSpell link found for checkWords.";
- return array();
- }
-
- $wordError = array();
- foreach($wordArray as $word) {
- if(!pspell_check($this->plink, trim($word)))
- $wordError[] = $word;
- }
-
- return $wordError;
- }
-
- // Returns array with suggestions or false if failed.
- function getSuggestion($word) {
- if (!$this->plink) {
- $this->errorMsg[] = "No PSpell link found for getSuggestion.";
- return array();
- }
-
- return pspell_suggest($this->plink, $word);
- }
-}
-
-// Setup classname, should be the same as the name of the spellchecker class
-$spellCheckerConfig['class'] = "TinyPspell";
-
-?> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php
deleted file mode 100755
index 5723d2f..0000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php
+++ /dev/null
@@ -1,121 +0,0 @@
-<?php
-/* *
- * Tiny Spelling Interface for TinyMCE Spell Checking.
- *
- * Copyright © 2006 Moxiecode Systems AB
- *
- */
-
-
-class TinyPspellShell {
- var $lang;
- var $mode;
- var $string;
- var $error;
- var $errorMsg;
-
- var $cmd;
- var $tmpfile;
-
- var $jargon;
- var $spelling;
- var $encoding;
-
- function TinyPspellShell(&$config, $lang, $mode, $spelling, $jargon, $encoding) {
- $this->lang = $lang;
- $this->mode = $mode;
- $this->error = false;
- $this->errorMsg = array();
-
- $this->tmpfile = tempnam($config['tinypspellshell.tmp'], "tinyspell");
-
- if(preg_match("#win#i",php_uname()))
- $this->cmd = $config['tinypspellshell.aspell'] . " -a --lang=". $this->lang." --encoding=utf-8 -H < $this->tmpfile 2>&1";
- else
- $this->cmd = "cat ". $this->tmpfile ." | " . $config['tinypspellshell.aspell'] . " -a --encoding=utf-8 -H --lang=". $this->lang;
- }
-
- // Returns array with bad words or false if failed.
- function checkWords($wordArray) {
- if ($fh = fopen($this->tmpfile, "w")) {
- fwrite($fh, "!\n");
- foreach($wordArray as $key => $value)
- fwrite($fh, "^" . $value . "\n");
- fclose($fh);
- } else {
- $this->errorMsg[] = "PSpell not found.";
- return array();
- }
-
- $data = shell_exec($this->cmd);
- @unlink($this->tmpfile);
-
- $returnData = array();
- $dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
-
- foreach($dataArr as $dstr) {
- $matches = array();
-
- // Skip this line.
- if (strpos($dstr, "@") === 0)
- continue;
-
- preg_match("/\& (.*) .* .*: .*/i", $dstr, $matches);
-
- if (!empty($matches[1]))
- $returnData[] = $matches[1];
- }
-
- return $returnData;
- }
-
- // Returns array with suggestions or false if failed.
- function getSuggestion($word) {
- if (function_exists("mb_convert_encoding"))
- $word = mb_convert_encoding($word, "ISO-8859-1", mb_detect_encoding($word, "UTF-8"));
- else
- $word = utf8_encode($word);
-
- if ($fh = fopen($this->tmpfile, "w")) {
- fwrite($fh, "!\n");
- fwrite($fh, "^$word\n");
- fclose($fh);
- } else
- die("Error opening tmp file.");
-
- $data = shell_exec($this->cmd);
-
- @unlink($this->tmpfile);
-
- $returnData = array();
- $dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
-
- foreach($dataArr as $dstr) {
- $matches = array();
-
- // Skip this line.
- if (strpos($dstr, "@") === 0)
- continue;
-
- preg_match("/\& .* .* .*: (.*)/i", $dstr, $matches);
-
- if (!empty($matches[1])) {
- // For some reason, the exec version seems to add commas?
- $returnData[] = str_replace(",", "", $matches[1]);
- }
- }
- return $returnData;
- }
-
- function _debugData($data) {
- $fh = @fopen("debug.log", 'a+');
- @fwrite($fh, $data);
- @fclose($fh);
- }
-
-}
-
-// Setup classname, should be the same as the name of the spellchecker class
-$spellCheckerConfig['class'] = "TinyPspellShell";
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php
new file mode 100644
index 0000000..1c46116
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php
@@ -0,0 +1,595 @@
+<?php
+/**
+ * $Id: JSON.php 40 2007-06-18 11:43:15Z spocke $
+ *
+ * @package MCManager.utils
+ * @author Moxiecode
+ * @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved.
+ */
+
+define('JSON_BOOL', 1);
+define('JSON_INT', 2);
+define('JSON_STR', 3);
+define('JSON_FLOAT', 4);
+define('JSON_NULL', 5);
+define('JSON_START_OBJ', 6);
+define('JSON_END_OBJ', 7);
+define('JSON_START_ARRAY', 8);
+define('JSON_END_ARRAY', 9);
+define('JSON_KEY', 10);
+define('JSON_SKIP', 11);
+
+define('JSON_IN_ARRAY', 30);
+define('JSON_IN_OBJECT', 40);
+define('JSON_IN_BETWEEN', 50);
+
+class Moxiecode_JSONReader {
+ var $_data, $_len, $_pos;
+ var $_value, $_token;
+ var $_location, $_lastLocations;
+ var $_needProp;
+
+ function Moxiecode_JSONReader($data) {
+ $this->_data = $data;
+ $this->_len = strlen($data);
+ $this->_pos = -1;
+ $this->_location = JSON_IN_BETWEEN;
+ $this->_lastLocations = array();
+ $this->_needProp = false;
+ }
+
+ function getToken() {
+ return $this->_token;
+ }
+
+ function getLocation() {
+ return $this->_location;
+ }
+
+ function getTokenName() {
+ switch ($this->_token) {
+ case JSON_BOOL:
+ return 'JSON_BOOL';
+
+ case JSON_INT:
+ return 'JSON_INT';
+
+ case JSON_STR:
+ return 'JSON_STR';
+
+ case JSON_FLOAT:
+ return 'JSON_FLOAT';
+
+ case JSON_NULL:
+ return 'JSON_NULL';
+
+ case JSON_START_OBJ:
+ return 'JSON_START_OBJ';
+
+ case JSON_END_OBJ:
+ return 'JSON_END_OBJ';
+
+ case JSON_START_ARRAY:
+ return 'JSON_START_ARRAY';
+
+ case JSON_END_ARRAY:
+ return 'JSON_END_ARRAY';
+
+ case JSON_KEY:
+ return 'JSON_KEY';
+ }
+
+ return 'UNKNOWN';
+ }
+
+ function getValue() {
+ return $this->_value;
+ }
+
+ function readToken() {
+ $chr = $this->read();
+
+ if ($chr != null) {
+ switch ($chr) {
+ case '[':
+ $this->_lastLocation[] = $this->_location;
+ $this->_location = JSON_IN_ARRAY;
+ $this->_token = JSON_START_ARRAY;
+ $this->_value = null;
+ $this->readAway();
+ return true;
+
+ case ']':
+ $this->_location = array_pop($this->_lastLocation);
+ $this->_token = JSON_END_ARRAY;
+ $this->_value = null;
+ $this->readAway();
+
+ if ($this->_location == JSON_IN_OBJECT)
+ $this->_needProp = true;
+
+ return true;
+
+ case '{':
+ $this->_lastLocation[] = $this->_location;
+ $this->_location = JSON_IN_OBJECT;
+ $this->_needProp = true;
+ $this->_token = JSON_START_OBJ;
+ $this->_value = null;
+ $this->readAway();
+ return true;
+
+ case '}':
+ $this->_location = array_pop($this->_lastLocation);
+ $this->_token = JSON_END_OBJ;
+ $this->_value = null;
+ $this->readAway();
+
+ if ($this->_location == JSON_IN_OBJECT)
+ $this->_needProp = true;
+
+ return true;
+
+ // String
+ case '"':
+ case '\'':
+ return $this->_readString($chr);
+
+ // Null
+ case 'n':
+ return $this->_readNull();
+
+ // Bool
+ case 't':
+ case 'f':
+ return $this->_readBool($chr);
+
+ default:
+ // Is number
+ if (is_numeric($chr) || $chr == '-' || $chr == '.')
+ return $this->_readNumber($chr);
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ function _readBool($chr) {
+ $this->_token = JSON_BOOL;
+ $this->_value = $chr == 't';
+
+ if ($chr == 't')
+ $this->skip(3); // rue
+ else
+ $this->skip(4); // alse
+
+ $this->readAway();
+
+ if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
+ $this->_needProp = true;
+
+ return true;
+ }
+
+ function _readNull() {
+ $this->_token = JSON_NULL;
+ $this->_value = null;
+
+ $this->skip(3); // ull
+ $this->readAway();
+
+ if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
+ $this->_needProp = true;
+
+ return true;
+ }
+
+ function _readString($quote) {
+ $output = "";
+ $this->_token = JSON_STR;
+ $endString = false;
+
+ while (($chr = $this->peek()) != -1) {
+ switch ($chr) {
+ case '\\':
+ // Read away slash
+ $this->read();
+
+ // Read escape code
+ $chr = $this->read();
+ switch ($chr) {
+ case 't':
+ $output .= "\t";
+ break;
+
+ case 'b':
+ $output .= "\b";
+ break;
+
+ case 'f':
+ $output .= "\f";
+ break;
+
+ case 'r':
+ $output .= "\r";
+ break;
+
+ case 'n':
+ $output .= "\n";
+ break;
+
+ case 'u':
+ $output .= $this->_int2utf8(hexdec($this->read(4)));
+ break;
+
+ default:
+ $output .= $chr;
+ break;
+ }
+
+ break;
+
+ case '\'':
+ case '"':
+ if ($chr == $quote)
+ $endString = true;
+
+ $chr = $this->read();
+ if ($chr != -1 && $chr != $quote)
+ $output .= $chr;
+
+ break;
+
+ default:
+ $output .= $this->read();
+ }
+
+ // String terminated
+ if ($endString)
+ break;
+ }
+
+ $this->readAway();
+ $this->_value = $output;
+
+ // Needed a property
+ if ($this->_needProp) {
+ $this->_token = JSON_KEY;
+ $this->_needProp = false;
+ return true;
+ }
+
+ if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
+ $this->_needProp = true;
+
+ return true;
+ }
+
+ function _int2utf8($int) {
+ $int = intval($int);
+
+ switch ($int) {
+ case 0:
+ return chr(0);
+
+ case ($int & 0x7F):
+ return chr($int);
+
+ case ($int & 0x7FF):
+ return chr(0xC0 | (($int >> 6) & 0x1F)) . chr(0x80 | ($int & 0x3F));
+
+ case ($int & 0xFFFF):
+ return chr(0xE0 | (($int >> 12) & 0x0F)) . chr(0x80 | (($int >> 6) & 0x3F)) . chr (0x80 | ($int & 0x3F));
+
+ case ($int & 0x1FFFFF):
+ return chr(0xF0 | ($int >> 18)) . chr(0x80 | (($int >> 12) & 0x3F)) . chr(0x80 | (($int >> 6) & 0x3F)) . chr(0x80 | ($int & 0x3F));
+ }
+ }
+
+ function _readNumber($start) {
+ $value = "";
+ $isFloat = false;
+
+ $this->_token = JSON_INT;
+ $value .= $start;
+
+ while (($chr = $this->peek()) != -1) {
+ if (is_numeric($chr) || $chr == '-' || $chr == '.') {
+ if ($chr == '.')
+ $isFloat = true;
+
+ $value .= $this->read();
+ } else
+ break;
+ }
+
+ $this->readAway();
+
+ if ($isFloat) {
+ $this->_token = JSON_FLOAT;
+ $this->_value = floatval($value);
+ } else
+ $this->_value = intval($value);
+
+ if ($this->_location == JSON_IN_OBJECT && !$this->_needProp)
+ $this->_needProp = true;
+
+ return true;
+ }
+
+ function readAway() {
+ while (($chr = $this->peek()) != null) {
+ if ($chr != ':' && $chr != ',' && $chr != ' ')
+ return;
+
+ $this->read();
+ }
+ }
+
+ function read($len = 1) {
+ if ($this->_pos < $this->_len) {
+ if ($len > 1) {
+ $str = substr($this->_data, $this->_pos + 1, $len);
+ $this->_pos += $len;
+
+ return $str;
+ } else
+ return $this->_data[++$this->_pos];
+ }
+
+ return null;
+ }
+
+ function skip($len) {
+ $this->_pos += $len;
+ }
+
+ function peek() {
+ if ($this->_pos < $this->_len)
+ return $this->_data[$this->_pos + 1];
+
+ return null;
+ }
+}
+
+/**
+ * This class handles JSON stuff.
+ *
+ * @package MCManager.utils
+ */
+class Moxiecode_JSON {
+ function Moxiecode_JSON() {
+ }
+
+ function decode($input) {
+ $reader = new Moxiecode_JSONReader($input);
+
+ return $this->readValue($reader);
+ }
+
+ function readValue(&$reader) {
+ $this->data = array();
+ $this->parents = array();
+ $this->cur =& $this->data;
+ $key = null;
+ $loc = JSON_IN_ARRAY;
+
+ while ($reader->readToken()) {
+ switch ($reader->getToken()) {
+ case JSON_STR:
+ case JSON_INT:
+ case JSON_BOOL:
+ case JSON_FLOAT:
+ case JSON_NULL:
+ switch ($reader->getLocation()) {
+ case JSON_IN_OBJECT:
+ $this->cur[$key] = $reader->getValue();
+ break;
+
+ case JSON_IN_ARRAY:
+ $this->cur[] = $reader->getValue();
+ break;
+
+ default:
+ return $reader->getValue();
+ }
+ break;
+
+ case JSON_KEY:
+ $key = $reader->getValue();
+ break;
+
+ case JSON_START_OBJ:
+ case JSON_START_ARRAY:
+ if ($loc == JSON_IN_OBJECT)
+ $this->addArray($key);
+ else
+ $this->addArray(null);
+
+ $cur =& $obj;
+
+ $loc = $reader->getLocation();
+ break;
+
+ case JSON_END_OBJ:
+ case JSON_END_ARRAY:
+ $loc = $reader->getLocation();
+
+ if (count($this->parents) > 0) {
+ $this->cur =& $this->parents[count($this->parents) - 1];
+ array_pop($this->parents);
+ }
+ break;
+ }
+ }
+
+ return $this->data[0];
+ }
+
+ // This method was needed since PHP is crapy and doesn't have pointers/references
+ function addArray($key) {
+ $this->parents[] =& $this->cur;
+ $ar = array();
+
+ if ($key)
+ $this->cur[$key] =& $ar;
+ else
+ $this->cur[] =& $ar;
+
+ $this->cur =& $ar;
+ }
+
+ function getDelim($index, &$reader) {
+ switch ($reader->getLocation()) {
+ case JSON_IN_ARRAY:
+ case JSON_IN_OBJECT:
+ if ($index > 0)
+ return ",";
+ break;
+ }
+
+ return "";
+ }
+
+ function encode($input) {
+ switch (gettype($input)) {
+ case 'boolean':
+ return $input ? 'true' : 'false';
+
+ case 'integer':
+ return (int) $input;
+
+ case 'float':
+ case 'double':
+ return (float) $input;
+
+ case 'NULL':
+ return 'null';
+
+ case 'string':
+ return $this->encodeString($input);
+
+ case 'array':
+ return $this->_encodeArray($input);
+
+ case 'object':
+ return $this->_encodeArray(get_object_vars($input));
+ }
+
+ return '';
+ }
+
+ function encodeString($input) {
+ // Needs to be escaped
+ if (preg_match('/[^a-zA-Z0-9]/', $input)) {
+ $output = '';
+
+ for ($i=0; $i<strlen($input); $i++) {
+ switch ($input[$i]) {
+ case "\b":
+ $output .= "\\b";
+ break;
+
+ case "\t":
+ $output .= "\\t";
+ break;
+
+ case "\f":
+ $output .= "\\f";
+ break;
+
+ case "\r":
+ $output .= "\\r";
+ break;
+
+ case "\n":
+ $output .= "\\n";
+ break;
+
+ case '\\':
+ $output .= "\\\\";
+ break;
+
+ case '\'':
+ $output .= "\\'";
+ break;
+
+ case '"':
+ $output .= '\"';
+ break;
+
+ default:
+ $byte = ord($input[$i]);
+
+ if (($byte & 0xE0) == 0xC0) {
+ $char = pack('C*', $byte, ord($input[$i + 1]));
+ $i += 1;
+ $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
+ } if (($byte & 0xF0) == 0xE0) {
+ $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2]));
+ $i += 2;
+ $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
+ } if (($byte & 0xF8) == 0xF0) {
+ $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3])));
+ $i += 3;
+ $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
+ } if (($byte & 0xFC) == 0xF8) {
+ $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3]), ord($input[$i + 4])));
+ $i += 4;
+ $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
+ } if (($byte & 0xFE) == 0xFC) {
+ $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3]), ord($input[$i + 4]), ord($input[$i + 5])));
+ $i += 5;
+ $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char)));
+ } else if ($byte < 128)
+ $output .= $input[$i];
+ }
+ }
+
+ return '"' . $output . '"';
+ }
+
+ return '"' . $input . '"';
+ }
+
+ function _utf82utf16($utf8) {
+ if (function_exists('mb_convert_encoding'))
+ return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
+
+ switch (strlen($utf8)) {
+ case 1:
+ return $utf8;
+
+ case 2:
+ return chr(0x07 & (ord($utf8[0]) >> 2)) . chr((0xC0 & (ord($utf8[0]) << 6)) | (0x3F & ord($utf8[1])));
+
+ case 3:
+ return chr((0xF0 & (ord($utf8[0]) << 4)) | (0x0F & (ord($utf8[1]) >> 2))) . chr((0xC0 & (ord($utf8[1]) << 6)) | (0x7F & ord($utf8[2])));
+ }
+
+ return '';
+ }
+
+ function _encodeArray($input) {
+ $output = '';
+ $isIndexed = true;
+
+ $keys = array_keys($input);
+ for ($i=0; $i<count($keys); $i++) {
+ if (!is_int($keys[$i])) {
+ $output .= $this->encodeString($keys[$i]) . ':' . $this->encode($input[$keys[$i]]);
+ $isIndexed = false;
+ } else
+ $output .= $this->encode($input[$keys[$i]]);
+
+ if ($i != count($keys) - 1)
+ $output .= ',';
+ }
+
+ return $isIndexed ? '[' . $output . ']' : '{' . $output . '}';
+ }
+}
+
+?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php
new file mode 100644
index 0000000..a1fb4cd
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php
@@ -0,0 +1,268 @@
+<?php
+/**
+ * $Id: Logger.class.php 10 2007-05-27 10:55:12Z spocke $
+ *
+ * @package MCFileManager.filesystems
+ * @author Moxiecode
+ * @copyright Copyright © 2005, Moxiecode Systems AB, All rights reserved.
+ */
+
+// File type contstants
+define('MC_LOGGER_DEBUG', 0);
+define('MC_LOGGER_INFO', 10);
+define('MC_LOGGER_WARN', 20);
+define('MC_LOGGER_ERROR', 30);
+define('MC_LOGGER_FATAL', 40);
+
+/**
+ * Logging utility class. This class handles basic logging with levels, log rotation and custom log formats. It's
+ * designed to be compact but still powerful and flexible.
+ */
+class Moxiecode_Logger {
+ // Private fields
+ var $_path;
+ var $_filename;
+ var $_maxSize;
+ var $_maxFiles;
+ var $_maxSizeBytes;
+ var $_level;
+ var $_format;
+
+ /**
+ * Constructs a new logger instance.
+ */
+ function Moxiecode_Logger() {
+ $this->_path = "";
+ $this->_filename = "{level}.log";
+ $this->setMaxSize("100k");
+ $this->_maxFiles = 10;
+ $this->_level = MC_LOGGER_DEBUG;
+ $this->_format = "[{time}] [{level}] {message}";
+ }
+
+ /**
+ * Sets the current log level, use the MC_LOGGER constants.
+ *
+ * @param int $level Log level instance for example MC_LOGGER_DEBUG.
+ */
+ function setLevel($level) {
+ if (is_string($level)) {
+ switch (strtolower($level)) {
+ case "debug":
+ $level = MC_LOGGER_DEBUG;
+ break;
+
+ case "info":
+ $level = MC_LOGGER_INFO;
+ break;
+
+ case "warn":
+ case "warning":
+ $level = MC_LOGGER_WARN;
+ break;
+
+ case "error":
+ $level = MC_LOGGER_ERROR;
+ break;
+
+ case "fatal":
+ $level = MC_LOGGER_FATAL;
+ break;
+
+ default:
+ $level = MC_LOGGER_FATAL;
+ }
+ }
+
+ $this->_level = $level;
+ }
+
+ /**
+ * Returns the current log level for example MC_LOGGER_DEBUG.
+ *
+ * @return int Current log level for example MC_LOGGER_DEBUG.
+ */
+ function getLevel() {
+ return $this->_level;
+ }
+
+ function setPath($path) {
+ $this->_path = $path;
+ }
+
+ function getPath() {
+ return $this->_path;
+ }
+
+ function setFileName($file_name) {
+ $this->_filename = $file_name;
+ }
+
+ function getFileName() {
+ return $this->_filename;
+ }
+
+ function setFormat($format) {
+ $this->_format = $format;
+ }
+
+ function getFormat() {
+ return $this->_format;
+ }
+
+ function setMaxSize($size) {
+ // Fix log max size
+ $logMaxSizeBytes = intval(preg_replace("/[^0-9]/", "", $size));
+
+ // Is KB
+ if (strpos((strtolower($size)), "k") > 0)
+ $logMaxSizeBytes *= 1024;
+
+ // Is MB
+ if (strpos((strtolower($size)), "m") > 0)
+ $logMaxSizeBytes *= (1024 * 1024);
+
+ $this->_maxSizeBytes = $logMaxSizeBytes;
+ $this->_maxSize = $size;
+ }
+
+ function getMaxSize() {
+ return $this->_maxSize;
+ }
+
+ function setMaxFiles($max_files) {
+ $this->_maxFiles = $max_files;
+ }
+
+ function getMaxFiles() {
+ return $this->_maxFiles;
+ }
+
+ function debug($msg) {
+ $args = func_get_args();
+ $this->_logMsg(MC_LOGGER_DEBUG, implode(', ', $args));
+ }
+
+ function info($msg) {
+ $args = func_get_args();
+ $this->_logMsg(MC_LOGGER_INFO, implode(', ', $args));
+ }
+
+ function warn($msg) {
+ $args = func_get_args();
+ $this->_logMsg(MC_LOGGER_WARN, implode(', ', $args));
+ }
+
+ function error($msg) {
+ $args = func_get_args();
+ $this->_logMsg(MC_LOGGER_ERROR, implode(', ', $args));
+ }
+
+ function fatal($msg) {
+ $args = func_get_args();
+ $this->_logMsg(MC_LOGGER_FATAL, implode(', ', $args));
+ }
+
+ function isDebugEnabled() {
+ return $this->_level >= MC_LOGGER_DEBUG;
+ }
+
+ function isInfoEnabled() {
+ return $this->_level >= MC_LOGGER_INFO;
+ }
+
+ function isWarnEnabled() {
+ return $this->_level >= MC_LOGGER_WARN;
+ }
+
+ function isErrorEnabled() {
+ return $this->_level >= MC_LOGGER_ERROR;
+ }
+
+ function isFatalEnabled() {
+ return $this->_level >= MC_LOGGER_FATAL;
+ }
+
+ function _logMsg($level, $message) {
+ $roll = false;
+
+ if ($level < $this->_level)
+ return;
+
+ $logFile = $this->toOSPath($this->_path . "/" . $this->_filename);
+
+ switch ($level) {
+ case MC_LOGGER_DEBUG:
+ $levelName = "DEBUG";
+ break;
+
+ case MC_LOGGER_INFO:
+ $levelName = "INFO";
+ break;
+
+ case MC_LOGGER_WARN:
+ $levelName = "WARN";
+ break;
+
+ case MC_LOGGER_ERROR:
+ $levelName = "ERROR";
+ break;
+
+ case MC_LOGGER_FATAL:
+ $levelName = "FATAL";
+ break;
+ }
+
+ $logFile = str_replace('{level}', strtolower($levelName), $logFile);
+
+ $text = $this->_format;
+ $text = str_replace('{time}', date("Y-m-d H:i:s"), $text);
+ $text = str_replace('{level}', strtolower($levelName), $text);
+ $text = str_replace('{message}', $message, $text);
+ $message = $text . "\r\n";
+
+ // Check filesize
+ if (file_exists($logFile)) {
+ $size = @filesize($logFile);
+
+ if ($size + strlen($message) > $this->_maxSizeBytes)
+ $roll = true;
+ }
+
+ // Roll if the size is right
+ if ($roll) {
+ for ($i=$this->_maxFiles-1; $i>=1; $i--) {
+ $rfile = $this->toOSPath($logFile . "." . $i);
+ $nfile = $this->toOSPath($logFile . "." . ($i+1));
+
+ if (@file_exists($rfile))
+ @rename($rfile, $nfile);
+ }
+
+ @rename($logFile, $this->toOSPath($logFile . ".1"));
+
+ // Delete last logfile
+ $delfile = $this->toOSPath($logFile . "." . ($this->_maxFiles + 1));
+ if (@file_exists($delfile))
+ @unlink($delfile);
+ }
+
+ // Append log line
+ if (($fp = @fopen($logFile, "a")) != null) {
+ @fputs($fp, $message);
+ @fflush($fp);
+ @fclose($fp);
+ }
+ }
+
+ /**
+ * Converts a Unix path to OS specific path.
+ *
+ * @param String $path Unix path to convert.
+ */
+ function toOSPath($path) {
+ return str_replace("/", DIRECTORY_SEPARATOR, $path);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css b/wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css
deleted file mode 100755
index f2c6ac7..0000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css
+++ /dev/null
@@ -1,35 +0,0 @@
-.mceMsgBox {
- border: 1px solid gray;
- padding: 8px;
-}
-
-.mceMsgBox span {
- vertical-align: top;
- color: #555555;
-}
-
-/* Misc */
-
-.mceBlockBox {
- display: none;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 100;
- filter:progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=60);
- -moz-opacity:0.6;
- opacity: 0.6;
- background-color: white;
-}
-
-.mceMsgBox {
- display: none;
- z-index: 101;
- position: absolute;
- left: 0;
- top: 0;
- font-family: Arial, Verdana, Tahoma, Helvetica;
- font-weight: bold;
- font-size: 11px;
- background-color: #FFF;
-}
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/images/spellchecker.gif b/wp-includes/js/tinymce/plugins/spellchecker/images/spellchecker.gif
deleted file mode 100755
index 294a9d2..0000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/images/spellchecker.gif
+++ /dev/null
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/images/wline.gif b/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif
index 7d0a4db..7d0a4db 100755..100644
--- a/wp-includes/js/tinymce/plugins/spellchecker/images/wline.gif
+++ b/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php b/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php
new file mode 100644
index 0000000..9a12145
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php
@@ -0,0 +1,98 @@
+<?php
+/**
+ * general.php
+ *
+ * @package MCManager.includes
+ * @author Moxiecode
+ * @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved.
+ */
+
+@error_reporting(E_ALL ^ E_NOTICE);
+$config = array();
+
+require_once(dirname(__FILE__) . "/../classes/utils/Logger.php");
+require_once(dirname(__FILE__) . "/../classes/utils/JSON.php");
+require_once(dirname(__FILE__) . "/../config.php");
+require_once(dirname(__FILE__) . "/../classes/SpellChecker.php");
+
+if (isset($config['general.engine']))
+ require_once(dirname(__FILE__) . "/../classes/" . $config["general.engine"] . ".php");
+
+/**
+ * Returns an request value by name without magic quoting.
+ *
+ * @param String $name Name of parameter to get.
+ * @param String $default_value Default value to return if value not found.
+ * @return String request value by name without magic quoting or default value.
+ */
+function getRequestParam($name, $default_value = false, $sanitize = false) {
+ if (!isset($_REQUEST[$name]))
+ return $default_value;
+
+ if (is_array($_REQUEST[$name])) {
+ $newarray = array();
+
+ foreach ($_REQUEST[$name] as $name => $value)
+ $newarray[formatParam($name, $sanitize)] = formatParam($value, $sanitize);
+
+ return $newarray;
+ }
+
+ return formatParam($_REQUEST[$name], $sanitize);
+}
+
+function &getLogger() {
+ global $mcLogger, $man;
+
+ if (isset($man))
+ $mcLogger = $man->getLogger();
+
+ if (!$mcLogger) {
+ $mcLogger = new Moxiecode_Logger();
+
+ // Set logger options
+ $mcLogger->setPath(dirname(__FILE__) . "/../logs");
+ $mcLogger->setMaxSize("100kb");
+ $mcLogger->setMaxFiles("10");
+ $mcLogger->setFormat("{time} - {message}");
+ }
+
+ return $mcLogger;
+}
+
+function debug($msg) {
+ $args = func_get_args();
+
+ $log = getLogger();
+ $log->debug(implode(', ', $args));
+}
+
+function info($msg) {
+ $args = func_get_args();
+
+ $log = getLogger();
+ $log->info(implode(', ', $args));
+}
+
+function error($msg) {
+ $args = func_get_args();
+
+ $log = getLogger();
+ $log->error(implode(', ', $args));
+}
+
+function warn($msg) {
+ $args = func_get_args();
+
+ $log = getLogger();
+ $log->warn(implode(', ', $args));
+}
+
+function fatal($msg) {
+ $args = func_get_args();
+
+ $log = getLogger();
+ $log->fatal(implode(', ', $args));
+}
+
+?> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/langs/en.js b/wp-includes/js/tinymce/plugins/spellchecker/langs/en.js
deleted file mode 100755
index 02fdac5..0000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/langs/en.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// UK lang variables
-
-tinyMCE.addToLang('spellchecker',{
- desc : 'Toggle spellchecker',
- menu : 'Spellchecker settings',
- ignore_word : 'Ignore word',
- ignore_words : 'Ignore all',
- langs : 'Languages',
- wait : 'Please wait...',
- swait : 'Spellchecking, please wait...',
- sug : 'Suggestions',
- no_sug : 'No suggestions',
- no_mpell : 'No misspellings found.',
- mpell_found : 'Found {$words} misspellings.'
-});
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/rpc.php b/wp-includes/js/tinymce/plugins/spellchecker/rpc.php
new file mode 100644
index 0000000..d7b7436
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/spellchecker/rpc.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * $Id: rpc.php 354 2007-11-05 20:48:49Z spocke $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
+ */
+
+require_once("./includes/general.php");
+
+// Set RPC response headers
+header('Content-Type: text/plain');
+header('Content-Encoding: UTF-8');
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+$raw = "";
+
+// Try param
+if (isset($_POST["json_data"]))
+ $raw = getRequestParam("json_data");
+
+// Try globals array
+if (!$raw && isset($_GLOBALS) && isset($_GLOBALS["HTTP_RAW_POST_DATA"]))
+ $raw = $_GLOBALS["HTTP_RAW_POST_DATA"];
+
+// Try globals variable
+if (!$raw && isset($HTTP_RAW_POST_DATA))
+ $raw = $HTTP_RAW_POST_DATA;
+
+// Try stream
+if (!$raw) {
+ if (!function_exists('file_get_contents')) {
+ $fp = fopen("php://input", "r");
+ if ($fp) {
+ $raw = "";
+
+ while (!feof($fp))
+ $raw = fread($fp, 1024);
+
+ fclose($fp);
+ }
+ } else
+ $raw = "" . file_get_contents("php://input");
+}
+
+// No input data
+if (!$raw)
+ die('{"result":null,"id":null,"error":{"errstr":"Could not get raw post data.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
+
+// Get JSON data
+$json = new Moxiecode_JSON();
+$input = $json->decode($raw);
+
+// Execute RPC
+if (isset($config['general.engine'])) {
+ $spellchecker = new $config['general.engine']($config);
+ $result = call_user_func_array(array($spellchecker, $input['method']), $input['params']);
+} else
+ die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
+
+// Request and response id should always be the same
+$output = array(
+ "id" => $input->id,
+ "result" => $result,
+ "error" => null
+);
+
+// Return JSON encoded string
+echo $json->encode($output);
+
+?> \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php b/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php
deleted file mode 100755
index 6b977c6..0000000
--- a/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php
+++ /dev/null
@@ -1,164 +0,0 @@
-<?php
-/**
- * $RCSfile: tinyspell.php,v $
- * $Revision: 1.1 $
- * $Date: 2006/03/14 17:33:47 $
- *
- * @author Moxiecode
- * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
- */
-
- // Ignore the Notice errors for now.
- error_reporting(E_ALL ^ E_NOTICE);
-
- require_once("config.php");
-
- $id = sanitize($_POST['id'], "loose");
-
- if (!$spellCheckerConfig['enabled']) {
- header('Content-type: text/xml; charset=utf-8');
- echo '<?xml version="1.0" encoding="utf-8" ?><res id="' . $id . '" error="true" msg="You must enable the spellchecker by modifying the config.php file." />';
- die;
- }
-
- // Basic config
- $defaultLanguage = $spellCheckerConfig['default.language'];
- $defaultMode = $spellCheckerConfig['default.mode'];
-
- // Normaly not required to configure
- $defaultSpelling = $spellCheckerConfig['default.spelling'];
- $defaultJargon = $spellCheckerConfig['default.jargon'];
- $defaultEncoding = $spellCheckerConfig['default.encoding'];
- $outputType = "xml"; // Do not change
-
- // Get input parameters.
-
- $check = urldecode(getRequestParam('check'));
- $cmd = sanitize(getRequestParam('cmd'));
- $lang = sanitize(getRequestParam('lang'), "strict");
- $mode = sanitize(getRequestParam('mode'), "strict");
- $spelling = sanitize(getRequestParam('spelling'), "strict");
- $jargon = sanitize(getRequestParam('jargon'), "strict");
- $encoding = sanitize(getRequestParam('encoding'), "strict");
- $sg = sanitize(getRequestParam('sg'), "bool");
- $words = array();
-
- $validRequest = true;
-
- if (empty($check))
- $validRequest = false;
-
- if (empty($lang))
- $lang = $defaultLanguage;
-
- if (empty($mode))
- $mode = $defaultMode;
-
- if (empty($spelling))
- $spelling = $defaultSpelling;
-
- if (empty($jargon))
- $jargon = $defaultJargon;
-
- if (empty($encoding))
- $encoding = $defaultEncoding;
-
- function sanitize($str, $type="strict") {
- switch ($type) {
- case "strict":
- $str = preg_replace("/[^a-zA-Z0-9_\-]/i", "", $str);
- break;
- case "loose":
- $str = preg_replace("/</i", "&gt;", $str);
- $str = preg_replace("/>/i", "&lt;", $str);
- break;
- case "bool":
- if ($str == "true" || $str == true)
- $str = true;
- else
- $str = false;
- break;
- }
-
- return $str;
- }
-
- function getRequestParam($name, $default_value = false) {
- if (!isset($_REQUEST[$name]))
- return $default_value;
-
- if (!isset($_GLOBALS['magic_quotes_gpc']))
- $_GLOBALS['magic_quotes_gpc'] = ini_get("magic_quotes_gpc");
-
- if (isset($_GLOBALS['magic_quotes_gpc'])) {
- if (is_array($_REQUEST[$name])) {
- $newarray = array();
-
- foreach($_REQUEST[$name] as $name => $value)
- $newarray[stripslashes($name)] = stripslashes($value);
-
- return $newarray;
- }
- return stripslashes($_REQUEST[$name]);
- }
-
- return $_REQUEST[$name];
- }
-
- $result = array();
- $tinyspell = new $spellCheckerConfig['class']($spellCheckerConfig, $lang, $mode, $spelling, $jargon, $encoding);
-
- if (count($tinyspell->errorMsg) == 0) {
- switch($cmd) {
- case "spell":
- // Space for non-exec version and \n for the exec version.
- $words = preg_split("/ |\n/", $check, -1, PREG_SPLIT_NO_EMPTY);
- $result = $tinyspell->checkWords($words);
- break;
-
- case "suggest":
- $result = $tinyspell->getSuggestion($check);
- break;
-
- default:
- // Just use this for now.
- $tinyspell->errorMsg[] = "No command.";
- $outputType = $outputType . "error";
- break;
- }
- } else
- $outputType = $outputType . "error";
-
- if (!$result)
- $result = array();
-
- // Output data
- switch($outputType) {
- case "xml":
- header('Content-type: text/xml; charset=utf-8');
- $body = '<?xml version="1.0" encoding="utf-8" ?>';
- $body .= "\n";
-
- if (count($result) == 0)
- $body .= '<res id="' . $id . '" cmd="'. $cmd .'" />';
- else
- $body .= '<res id="' . $id . '" cmd="'. $cmd .'">'. urlencode(implode(" ", $result)) .'</res>';
-
- echo $body;
- break;
- case "xmlerror";
- header('Content-type: text/xml; charset=utf-8');
- $body = '<?xml version="1.0" encoding="utf-8" ?>';
- $body .= "\n";
- $body .= '<res id="' . $id . '" cmd="'. $cmd .'" error="true" msg="'. implode(" ", $tinyspell->errorMsg) .'" />';
- echo $body;
- break;
- case "html":
- var_dump($result);
- break;
- case "htmlerror":
- echo "Error";
- break;
- }
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/wordpress/css/content.css b/wp-includes/js/tinymce/plugins/wordpress/css/content.css
new file mode 100644
index 0000000..a542e6e
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/wordpress/css/content.css
@@ -0,0 +1,15 @@
+
+.mceWPnextpage, .mceWPmore {
+ border: 0px;
+ border-top: 1px dotted #cccccc;
+ display: block;
+ width: 100%;
+ height: 12px;
+ margin-top: 15px;
+}
+.mceWPmore {
+ background: #ffffff url(../img/more_bug.gif) no-repeat right top;
+}
+.mceWPnextpage {
+ background: #ffffff url(../img/page_bug.gif) no-repeat right top;
+} \ No newline at end of file
diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/help.gif b/wp-includes/js/tinymce/plugins/wordpress/img/help.gif
index 51a1ee4..51a1ee4 100644
--- a/wp-includes/js/tinymce/plugins/wordpress/images/help.gif
+++ b/wp-includes/js/tinymce/plugins/wordpress/img/help.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/more.gif b/wp-includes/js/tinymce/plugins/wordpress/img/more.gif
index 4ff564d..4ff564d 100644
--- a/wp-includes/js/tinymce/plugins/wordpress/images/more.gif
+++ b/wp-includes/js/tinymce/plugins/wordpress/img/more.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/more_bug.gif b/wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif
index 4589cb4..4589cb4 100644
--- a/wp-includes/js/tinymce/plugins/wordpress/images/more_bug.gif
+++ b/wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/page.gif b/wp-includes/js/tinymce/plugins/wordpress/img/page.gif
index 1cea78a..1cea78a 100644
--- a/wp-includes/js/tinymce/plugins/wordpress/images/page.gif
+++ b/wp-includes/js/tinymce/plugins/wordpress/img/page.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/page_bug.gif b/wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif
index 9ea3565..9ea3565 100644
--- a/wp-includes/js/tinymce/plugins/wordpress/images/page_bug.gif
+++ b/wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/toolbars.gif b/wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif
index dcb7066..dcb7066 100755..100644
--- a/wp-includes/js/tinymce/plugins/wordpress/images/toolbars.gif
+++ b/wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif b/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif
new file mode 100644
index 0000000..3884865
--- /dev/null
+++ b/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif
Binary files differ
diff --git a/wp-includes/js/tinymce/plugins/wordpress/langs/en.js b/wp-includes/js/tinymce/plugins/wordpress/langs/en.js
deleted file mode 100644
index b431fb6..0000000
--- a/wp-includes/js/tinymce/plugins/wordpress/langs/en.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// EN lang variables
-
-if (navigator.userAgent.indexOf('Mac OS') != -1) {
-// Mac OS browsers use Ctrl to hit accesskeys
- var metaKey = 'Ctrl';
-}
-else if (navigator.userAgent.indexOf('Firefox/2') != -1) {
-// Firefox 2.x uses Alt+Shift to hit accesskeys
- var metaKey = 'Alt+Shift';
-}
-else {
- var metaKey = 'Alt';
-}
-
-tinyMCE.addToLang('',{
-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)',
-wordpress_more_alt : 'More...',
-wordpress_page_alt : '...page...',
-help_button_title : 'Help (' + metaKey + '+h)',
-bold_desc : 'Bold (Ctrl+B)',
-italic_desc : 'Italic (Ctrl+I)',
-underline_desc : 'Underline (Ctrl+U)',
-link_desc : 'Insert/edit link (' + metaKey + '+a)',
-unlink_desc : 'Unlink (' + metaKey + '+s)',
-image_desc : 'Insert/edit image (' + metaKey + '+m)',
-striketrough_desc : 'Strikethrough (' + metaKey + '+k)',
-justifyleft_desc : 'Align left (' + metaKey + '+f)',
-justifycenter_desc : 'Align center (' + metaKey + '+c)',
-justifyright_desc : 'Align right (' + metaKey + '+r)',
-justifyfull_desc : 'Align full (' + metaKey + '+j)',
-bullist_desc : 'Unordered list (' + metaKey + '+l)',
-numlist_desc : 'Ordered list (' + metaKey + '+o)',
-outdent_desc : 'Outdent (' + metaKey + '+w)',
-indent_desc : 'Indent list/blockquote (' + metaKey + '+q)'
-});
diff --git a/wp-includes/js/tinymce/plugins/wordpress/wordpress.css b/wp-includes/js/tinymce/plugins/wordpress/wordpress.css
deleted file mode 100644
index 00b454f..0000000
--- a/wp-includes/js/tinymce/plugins/wordpress/wordpress.css
+++ /dev/null
@@ -1,81 +0,0 @@
-.mce_plugin_wordpress_more {
- border: 0px;
- border-top: 1px dotted #cccccc;
- display:block;
- background-color: #ffffff;
- margin-top:15px;
- background-image: url(images/more_bug.gif);
- background-repeat: no-repeat;
- background-position: right top;
-}
-
-.mce_plugin_wordpress_page {
- border: 0px;
- border-top: 1px dotted #cccccc;
- display:block;
- background-color: #ffffff;
- margin-top:15px;
- background-image: url(images/page_bug.gif);
- background-repeat: no-repeat;
- background-position: right top;
-}
-
-/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
-/* You can extend this CSS by adding your own CSS file with the the content_css option */
-
-body {
- background: #fff;
- font: 1em/1.3em Georgia, "Times New Roman", Times, serif;
- padding: .5em;
-}
-
-td {
- font-size: 10px;
-}
-
-pre {
- font-family: "Courier New", fixed;
- font-size: 11px;
- line-height: 13px;
-}
-
-.mceVisualAid {
- border: 1px dashed #BBBBBB !important;
-}
-
-.mceItemAnchor {
- width: 12px;
- line-height: 6px;
- overflow: hidden;
- padding-left: 12px;
- background-position: bottom;
- background-repeat: no-repeat;
-}
-
-/* Important is needed in Gecko browsers inorder to style links */
-/*
-a {
- color: green !important;
-}
-*/
-
-/* Style selection range colors in Gecko browsers */
-/*
-::-moz-selection {
- background-color: red;
- color: green;
-}
-*/
-
-/* MSIE specific */
-
-* html body {
- scrollbar-3dlight-color: #F0F0EE;
- scrollbar-arrow-color: #676662;
- scrollbar-base-color: #F0F0EE;
- scrollbar-darkshadow-color: #DDDDDD;
- scrollbar-face-color: #E0E0DD;
- scrollbar-highlight-color: #F0F0EE;
- scrollbar-shadow-color: #F0F0EE;
- scrollbar-track-color: #F5F5F5;
-}
diff --git a/wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js b/wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js
deleted file mode 100644
index 204e447..0000000
--- a/wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('wphelp', '');
-
-function TinyMCE_wphelp_getControlHTML(control_name) {
- switch (control_name) {
- case "wphelp":
- var titleHelp = tinyMCE.getLang('lang_help_button_title');
- var buttons = '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceWordPressHelp\')" target="_self" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceWordPressHelp\');return false;"><img id="{$editor_id}_help" src="{$pluginurl}/images/help.gif" title="'+titleHelp+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
- var hiddenControls = '<div class="zerosize">'
- + '<input type="button" accesskey="b" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Bold\',false);" />'
- + '<input type="button" accesskey="i" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Italic\',false);" />'
- + '<input type="button" accesskey="d" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Strikethrough\',false);" />'
- + '<input type="button" accesskey="l" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertUnorderedList\',false);" />'
- + '<input type="button" accesskey="o" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertOrderedList\',false);" />'
- + '<input type="button" accesskey="w" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Outdent\',false);" />'
- + '<input type="button" accesskey="q" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Indent\',false);" />'
- + '<input type="button" accesskey="f" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyLeft\',false);" />'
- + '<input type="button" accesskey="c" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyCenter\',false);" />'
- + '<input type="button" accesskey="r" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyRight\',false);" />'
- + '<input type="button" accesskey="a" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceLink\',true);" />'
- + '<input type="button" accesskey="s" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'unlink\',false);" />'
- + '<input type="button" accesskey="m" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceImage\',true);" />'
- + '<input type="button" accesskey="t" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');" />'
- + '<input type="button" accesskey="u" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Undo\',false);" />'
- + '<input type="button" accesskey="y" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Redo\',false);" />'
- + '<input type="button" accesskey="e" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceCodeEditor\',false);" />'
- + '<input type="button" accesskey="h" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceWordPressHelp\',false);" />'
- + '</div>';
- return buttons+hiddenControls;
- }
-
- return "";
-}
-
-function TinyMCE_wphelp_execCommand(editor_id, element, command, user_interface, value) {
-
- // 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'
- };
-
- tinyMCE.openWindow(template, args);
- return true;
- }
-
- // Pass to next handler in chain
- return false;
-}
diff --git a/wp-includes/js/tinymce/plugins/wphelp/images/help.gif b/wp-includes/js/tinymce/plugins/wphelp/images/help.gif
deleted file mode 100644
index 51a1ee4..0000000
--- a/wp-includes/js/tinymce/plugins/wphelp/images/help.gif
+++ /dev/null
Binary files differ
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 b7b2aba..0000000
--- 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)'
-});