mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Latest TinyMCE, has new load options and bugfixes.
git-svn-id: http://svn.automattic.com/wordpress/trunk@8512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a465f3ac7d
commit
fddd74d5b9
@ -64,7 +64,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' );
|
||||
?>
|
||||
{
|
||||
"betaManifestVersion" : 1,
|
||||
"version" : "<?php echo $man_version; ?>_20080712",
|
||||
"version" : "<?php echo $man_version; ?>_20080730",
|
||||
"entries" : [
|
||||
<?php echo $defaults; ?>
|
||||
|
||||
@ -103,67 +103,54 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' );
|
||||
{ "url" : "images/no.png" },
|
||||
{ "url" : "images/yes.png" },
|
||||
|
||||
{ "url" : "../wp-includes/images/crystal/archive.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/audio.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/code.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/default.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/document.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/interactive.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/text.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/video.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/spreadsheet.png" },
|
||||
{ "url" : "../wp-includes/images/rss.png" },
|
||||
{ "url" : "../wp-includes/js/thickbox/loadingAnimation.gif" },
|
||||
{ "url" : "../wp-includes/js/thickbox/tb-close.png" },
|
||||
{ "url" : "../wp-includes/js/swfupload/swfupload_f9.swf" },
|
||||
|
||||
{ "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/utils/form_utils.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/utils/editable_selects.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/js/pastetext.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/media/js/media.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/image.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=311" },
|
||||
<?php if ( is_file('../wp-includes/js/tinymce/tiny_mce.js') ) { ?>
|
||||
{ "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/utils/form_utils.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/utils/editable_selects.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/js/pastetext.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/media/js/media.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/image.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311e" },
|
||||
{ "url" : "../wp-includes/js/tinymce/tiny_mce.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/tiny_mce.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js?ver=311b" },
|
||||
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311e" },
|
||||
{ "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311b" },
|
||||
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311e" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311b" },
|
||||
{ "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311b" },
|
||||
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/img/icons.gif" },
|
||||
{ "url" : "../wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg" },
|
||||
@ -203,5 +190,20 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' );
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/image.gif" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/media.gif" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/video.gif" },
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/audio.gif" }
|
||||
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/audio.gif" },
|
||||
<?php } ?>
|
||||
|
||||
{ "url" : "../wp-includes/images/crystal/archive.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/audio.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/code.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/default.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/document.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/interactive.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/text.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/video.png" },
|
||||
{ "url" : "../wp-includes/images/crystal/spreadsheet.png" },
|
||||
{ "url" : "../wp-includes/images/rss.png" },
|
||||
{ "url" : "../wp-includes/js/thickbox/loadingAnimation.gif" },
|
||||
{ "url" : "../wp-includes/js/thickbox/tb-close.png" },
|
||||
{ "url" : "../wp-includes/js/swfupload/swfupload_f9.swf" }
|
||||
]}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<script type="text/javascript" src="../../tiny_mce.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../tiny_mce.js?ver=311b"></script>
|
||||
<script type="text/javascript">
|
||||
function patchCallback(settings, key) {
|
||||
if (settings[key])
|
||||
|
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
<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?ver=311" />
|
||||
<link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css?ver=311b" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -183,7 +183,7 @@ function insertMedia() {
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
if (!AutoValidator.validate(f)) {
|
||||
alert(ed.getLang('invalid_data'));
|
||||
tinyMCEPopup.alert(ed.getLang('invalid_data'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#media_dlg.title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="js/media.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/editable_selects.js?ver=311"></script>
|
||||
<link href="css/media.css?ver=311" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="js/media.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/editable_selects.js?ver=311b"></script>
|
||||
<link href="css/media.css?ver=311b" rel="stylesheet" type="text/css" />
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body style="display: none">
|
||||
|
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>blank_page</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link href="css/blank.css?ver=311" rel="stylesheet" type="text/css" />
|
||||
<link href="css/blank.css?ver=311b" rel="stylesheet" type="text/css" />
|
||||
<base target="_self" />
|
||||
<script type="text/javascript">
|
||||
function init() {
|
||||
|
@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<title>{#paste.paste_text_desc}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="js/pastetext.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="js/pastetext.js?ver=311b"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
|
||||
|
@ -2,9 +2,9 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>{#paste.paste_word_desc}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="js/pasteword.js?ver=311"></script>
|
||||
<link href="css/pasteword.css?ver=311" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="js/pasteword.js?ver=311b"></script>
|
||||
<link href="css/pasteword.css?ver=311b" rel="stylesheet" type="text/css" />
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
|
||||
|
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
|
||||
*
|
||||
* This class was contributed by Michel Weimerskirch.
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
class EnchantSpell extends SpellChecker {
|
||||
/**
|
||||
* Spellchecks an array of words.
|
||||
*
|
||||
* @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
|
||||
* @param Array $words Array of words to check.
|
||||
* @return Array of misspelled words.
|
||||
*/
|
||||
function &checkWords($lang, $words) {
|
||||
$r = enchant_broker_init();
|
||||
|
||||
if (enchant_broker_dict_exists($r,$lang)) {
|
||||
$d = enchant_broker_request_dict($r, $lang);
|
||||
|
||||
$returnData = array();
|
||||
foreach($words as $key => $value) {
|
||||
$correct = enchant_dict_check($d, $value);
|
||||
if(!$correct) {
|
||||
$returnData[] = trim($value);
|
||||
}
|
||||
}
|
||||
|
||||
return $returnData;
|
||||
enchant_broker_free_dict($d);
|
||||
} else {
|
||||
|
||||
}
|
||||
enchant_broker_free($r);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns suggestions for a specific word.
|
||||
*
|
||||
* @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
|
||||
* @param String $word Specific word to get suggestions for.
|
||||
* @return Array of suggestions for the specified word.
|
||||
*/
|
||||
function &getSuggestions($lang, $word) {
|
||||
$r = enchant_broker_init();
|
||||
$suggs = array();
|
||||
|
||||
if (enchant_broker_dict_exists($r,$lang)) {
|
||||
$d = enchant_broker_request_dict($r, $lang);
|
||||
$suggs = enchant_dict_suggest($d, $word);
|
||||
|
||||
enchant_broker_free_dict($d);
|
||||
} else {
|
||||
|
||||
}
|
||||
enchant_broker_free($r);
|
||||
|
||||
return $suggs;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -103,9 +103,9 @@ class PSpellShell extends SpellChecker {
|
||||
$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 $this->_config['PSpellShell.aspell'] . " -a --lang=". escapeshellarg($lang) . " --encoding=utf-8 -H < " . $this->_tmpfile . " 2>&1";
|
||||
|
||||
return "cat ". $this->_tmpfile ." | " . $this->_config['PSpellShell.aspell'] . " -a --encoding=utf-8 -H --lang=". $lang;
|
||||
return "cat ". $this->_tmpfile ." | " . $this->_config['PSpellShell.aspell'] . " -a --encoding=utf-8 -H --lang=". escapeshellarg($lang);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
$config['general.engine'] = 'GoogleSpell';
|
||||
//$config['general.engine'] = 'PSpell';
|
||||
//$config['general.engine'] = 'PSpellShell';
|
||||
//$config['general.remote_rpc_url'] = 'http://some.other.site/some/url/rpc.php';
|
||||
|
||||
// PSpell settings
|
||||
$config['PSpell.mode'] = PSPELL_FAST;
|
||||
|
@ -15,7 +15,7 @@
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
version : "2.0.2"
|
||||
};
|
||||
},
|
||||
|
||||
@ -312,7 +312,7 @@
|
||||
},
|
||||
|
||||
_sendRPC : function(m, p, cb) {
|
||||
var t = this, url = t.editor.getParam("spellchecker_rpc_url", this.url+"/rpc.php");
|
||||
var t = this, url = t.editor.getParam("spellchecker_rpc_url", this.url+'/rpc.php');
|
||||
|
||||
if (url == '{backend}') {
|
||||
t.editor.setProgressState(0);
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* $Id: rpc.php 354 2007-11-05 20:48:49Z spocke $
|
||||
* $Id: rpc.php 822 2008-04-28 13:45:03Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
@ -51,6 +51,42 @@ if (!$raw) {
|
||||
if (!$raw)
|
||||
die('{"result":null,"id":null,"error":{"errstr":"Could not get raw post data.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
|
||||
|
||||
// Passthrough request to remote server
|
||||
if (isset($config['general.remote_rpc_url'])) {
|
||||
$url = parse_url($config['general.remote_rpc_url']);
|
||||
|
||||
// Setup request
|
||||
$req = "POST " . $url["path"] . " HTTP/1.0\r\n";
|
||||
$req .= "Connection: close\r\n";
|
||||
$req .= "Host: " . $url['host'] . "\r\n";
|
||||
$req .= "Content-Length: " . strlen($raw) . "\r\n";
|
||||
$req .= "\r\n" . $raw;
|
||||
|
||||
if (!isset($url['port']) || !$url['port'])
|
||||
$url['port'] = 80;
|
||||
|
||||
$errno = $errstr = "";
|
||||
|
||||
$socket = fsockopen($url['host'], intval($url['port']), $errno, $errstr, 30);
|
||||
if ($socket) {
|
||||
// Send request headers
|
||||
fputs($socket, $req);
|
||||
|
||||
// Read response headers and data
|
||||
$resp = "";
|
||||
while (!feof($socket))
|
||||
$resp .= fgets($socket, 4096);
|
||||
|
||||
fclose($socket);
|
||||
|
||||
// Split response header/data
|
||||
$resp = explode("\r\n\r\n", $resp);
|
||||
echo $resp[1]; // Output body
|
||||
}
|
||||
|
||||
die();
|
||||
}
|
||||
|
||||
// Get JSON data
|
||||
$json = new Moxiecode_JSON();
|
||||
$input = $json->decode($raw);
|
||||
|
@ -5,13 +5,13 @@
|
||||
<title></title>
|
||||
|
||||
<script type="text/javascript" src="js/editimage.js?ver=311e"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js?ver=311b"></script>
|
||||
|
||||
<link rel="stylesheet" href="css/editimage.css?ver=311e" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="../../../../../wp-admin/css/media.css?ver=2.6" type="text/css" media="all" />
|
||||
<script type="text/javascript">
|
||||
if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') )
|
||||
document.write('<link rel="stylesheet" href="css/editimage-rtl.css?ver=311" type="text/css" media="all" />');
|
||||
document.write('<link rel="stylesheet" href="css/editimage-rtl.css?ver=311b" type="text/css" media="all" />');
|
||||
</script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.about_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js?ver=311"></script>
|
||||
<script type="text/javascript" src="js/about.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="js/about.js?ver=311b"></script>
|
||||
</head>
|
||||
<body id="about" style="display: none">
|
||||
<div class="tabs">
|
||||
|
@ -2,8 +2,8 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.anchor_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="js/anchor.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="js/anchor.js?ver=311b"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body style="display: none">
|
||||
|
@ -3,8 +3,8 @@
|
||||
<head>
|
||||
<title>{#advanced_dlg.charmap_title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="js/charmap.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="js/charmap.js?ver=311b"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body id="charmap" style="display:none">
|
||||
|
@ -2,9 +2,9 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.colorpicker_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js?ver=311"></script>
|
||||
<script type="text/javascript" src="js/color_picker.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="js/color_picker.js?ver=311b"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body id="colorpicker" style="display: none">
|
||||
|
@ -2,10 +2,10 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.image_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script>
|
||||
<script type="text/javascript" src="js/image.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="js/image.js?ver=311b"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body id="image" style="display: none">
|
||||
|
@ -2,11 +2,11 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advanced_dlg.link_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js?ver=311"></script>
|
||||
<script type="text/javascript" src="js/link.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="js/link.js?ver=311b"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body id="link" style="display: none">
|
||||
|
@ -34,7 +34,7 @@ input.checkbox {border:1px none #000000; background:transparent; vertical-align:
|
||||
.input_noborder {border:0;}
|
||||
|
||||
/* Buttons */
|
||||
#insert, #cancel, input.mceButton, .updateButton {
|
||||
#insert, #cancel, #apply, .mceActionPanel .button, input.mceButton, .updateButton {
|
||||
border: 1px solid #bbb;
|
||||
margin:0;
|
||||
padding:0 0 1px;
|
||||
|
@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>{#advanced_dlg.code_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="js/source_editor.js?ver=311"></script>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script>
|
||||
<script type="text/javascript" src="js/source_editor.js?ver=311b"></script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
|
||||
|
2
wp-includes/js/tinymce/tiny_mce.js
vendored
2
wp-includes/js/tinymce/tiny_mce.js
vendored
File diff suppressed because one or more lines are too long
@ -180,16 +180,6 @@ $initArray = apply_filters('tiny_mce_before_init', $initArray);
|
||||
// Setting "valid_elements", "invalid_elements" and "extended_valid_elements" can be done through "tiny_mce_before_init".
|
||||
// Best is to use the default cleanup by not specifying valid_elements, as TinyMCE contains full set of XHTML 1.0.
|
||||
|
||||
// support for deprecated actions
|
||||
ob_start();
|
||||
do_action('mce_options');
|
||||
$mce_deprecated = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$mce_deprecated = (string) $mce_deprecated;
|
||||
if ( strlen( $mce_deprecated ) < 10 || ! strpos( $mce_deprecated, ':' ) || ! strpos( $mce_deprecated, ',' ) )
|
||||
$mce_deprecated = '';
|
||||
|
||||
// Settings for the gzip compression and cache
|
||||
$disk_cache = ( ! isset($initArray['disk_cache']) || false == $initArray['disk_cache'] ) ? false : true;
|
||||
$compress = ( ! isset($initArray['compress']) || false == $initArray['compress'] ) ? false : true;
|
||||
@ -225,7 +215,7 @@ if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
|
||||
// Setup cache info
|
||||
if ( $disk_cache ) {
|
||||
|
||||
$cacheKey = apply_filters('tiny_mce_version', '20080712');
|
||||
$cacheKey = apply_filters('tiny_mce_version', '20080730');
|
||||
|
||||
foreach ( $initArray as $v )
|
||||
$cacheKey .= $v;
|
||||
@ -268,11 +258,10 @@ if ( $disk_cache && is_file($cache_file) && is_readable($cache_file) ) {
|
||||
foreach ( $initArray as $k => $v )
|
||||
$mce_options .= $k . ':"' . $v . '",';
|
||||
|
||||
if ( $mce_deprecated ) $mce_options .= $mce_deprecated;
|
||||
|
||||
$mce_options = rtrim( trim($mce_options), '\n\r,' );
|
||||
|
||||
$content = 'var tinyMCEPreInit = { settings : { themes : "' . $theme . '", plugins : "' . $initArray['plugins'] . '", languages : "' . $language . '", debug : false }, base : "' . $baseurl . '", suffix : "", query : "ver=311" };';
|
||||
// Pre-init settings
|
||||
$content = 'var tinyMCEPreInit = { base : "'. $baseurl .'", suffix : "", query : "ver=311b", mceInit : {' . $mce_options . '}};' . "\n";
|
||||
|
||||
// Load patch
|
||||
$content .= getFileContents( 'tiny_mce_ext.js' );
|
||||
@ -280,9 +269,6 @@ $content .= getFileContents( 'tiny_mce_ext.js' );
|
||||
// Add core
|
||||
$content .= getFileContents( 'tiny_mce.js' );
|
||||
|
||||
// Patch loading functions
|
||||
$content .= 'tinyMCEPreInit.start();';
|
||||
|
||||
// Add all languages (WP)
|
||||
include_once( dirname(__FILE__).'/langs/wp-langs.php' );
|
||||
$content .= $strings;
|
||||
@ -294,8 +280,14 @@ $content .= getFileContents( 'themes/' . $theme . '/editor_template.js' );
|
||||
foreach ( $plugins as $plugin )
|
||||
$content .= getFileContents( 'plugins/' . $plugin . '/editor_plugin.js' );
|
||||
|
||||
// Add external plugins and init
|
||||
$content .= $ext_plugins . 'tinyMCE.init({' . $mce_options . '});';
|
||||
// Add external plugins
|
||||
$content .= $ext_plugins;
|
||||
|
||||
// Mark translations as done
|
||||
$content .= 'tinyMCEPreInit.start();' . "\n";
|
||||
|
||||
// Init
|
||||
$content .= 'tinyMCE.init(tinyMCEPreInit.mceInit);';
|
||||
|
||||
// Generate GZIP'd content
|
||||
if ( '.gz' == $cache_ext ) {
|
||||
@ -308,23 +300,22 @@ echo $content;
|
||||
|
||||
// Write file
|
||||
if ( '' != $cacheKey && is_dir($cache_path) && is_readable($cache_path) ) {
|
||||
|
||||
$old_cache = array();
|
||||
$handle = opendir($cache_path);
|
||||
while ( false !== ( $file = readdir($handle) ) ) {
|
||||
if ( $file == '.' || $file == '..' ) continue;
|
||||
$saved = filectime("$cache_path/$file");
|
||||
if ( strpos($file, 'tinymce_') !== false && substr($file, -3) == $cache_ext ) $old_cache["$saved"] = $file;
|
||||
$old_cache[] = filemtime("$cache_path/$file") . strval($file);
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
krsort($old_cache);
|
||||
rsort($old_cache);
|
||||
if ( 1 >= $old_cache_max ) $del_cache = $old_cache;
|
||||
else $del_cache = array_slice( $old_cache, ($old_cache_max - 1) );
|
||||
|
||||
foreach ( $del_cache as $key )
|
||||
foreach ( $del_cache as $key ) {
|
||||
$key = substr($key, 10);
|
||||
@unlink("$cache_path/$key");
|
||||
|
||||
}
|
||||
putFileContents( $cache_file, $content );
|
||||
}
|
||||
|
||||
|
20
wp-includes/js/tinymce/tiny_mce_ext.js
vendored
20
wp-includes/js/tinymce/tiny_mce_ext.js
vendored
@ -1,32 +1,20 @@
|
||||
|
||||
tinyMCEPreInit.start = function() {
|
||||
var t = this, each = tinymce.each, s = t.settings, sl = tinymce.ScriptLoader, ln = s.languages, th = s.themes;
|
||||
|
||||
function load(u, sp) {
|
||||
var o;
|
||||
|
||||
if (!sp)
|
||||
u = t.base + u;
|
||||
|
||||
o = {url : u, state : 2};
|
||||
sl.queue.push(o);
|
||||
sl.lookup[o.url] = o;
|
||||
};
|
||||
var t = this, sl = tinymce.ScriptLoader, ln = t.mceInit.language, th = t.mceInit.theme, pl = t.mceInit.plugins;
|
||||
|
||||
sl.markDone(t.base + '/langs/' + ln + '.js');
|
||||
|
||||
load('/themes/' + th + '/editor_template' + t.suffix + '.js');
|
||||
sl.markDone(t.base + '/themes/' + th + '/langs/' + ln + '.js');
|
||||
sl.markDone(t.base + '/themes/' + th + '/langs/' + ln + '_dlg.js');
|
||||
|
||||
each(s.plugins.split(','), function(n) {
|
||||
tinymce.each(pl.split(','), function(n) {
|
||||
if (n && n.charAt(0) != '-') {
|
||||
load('/plugins/' + n + '/editor_plugin' + t.suffix + '.js');
|
||||
|
||||
sl.markDone(t.base + '/plugins/' + n + '/langs/' + ln + '.js');
|
||||
sl.markDone(t.base + '/plugins/' + n + '/langs/' + ln + '_dlg.js');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
tinyMCEPreInit.load_ext = function(url,lang) {
|
||||
var sl = tinymce.ScriptLoader;
|
||||
|
||||
|
11
wp-includes/js/tinymce/tiny_mce_popup.js
vendored
11
wp-includes/js/tinymce/tiny_mce_popup.js
vendored
@ -21,10 +21,11 @@ tinyMCEPopup = {
|
||||
tinyMCE = w.tinyMCE;
|
||||
t.editor = tinymce.EditorManager.activeEditor;
|
||||
t.params = t.editor.windowManager.params;
|
||||
t.features = t.editor.windowManager.features;
|
||||
|
||||
// Setup local DOM
|
||||
t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document);
|
||||
t.dom.loadCSS(t.editor.settings.popup_css);
|
||||
t.dom.loadCSS(t.features.popup_css || t.editor.settings.popup_css);
|
||||
|
||||
// Setup on init listeners
|
||||
t.listeners = [];
|
||||
@ -127,6 +128,14 @@ tinyMCEPopup = {
|
||||
this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
|
||||
},
|
||||
|
||||
confirm : function(t, cb, s) {
|
||||
this.editor.windowManager.confirm(t, cb, s, window);
|
||||
},
|
||||
|
||||
alert : function(tx, cb, s) {
|
||||
this.editor.windowManager.alert(tx, cb, s, window);
|
||||
},
|
||||
|
||||
close : function() {
|
||||
var t = this;
|
||||
|
||||
|
@ -6,7 +6,7 @@ header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<title><?php _e('Rich Editor Help') ?></title>
|
||||
<script type="text/javascript" src="tiny_mce_popup.js?ver=311"></script>
|
||||
<script type="text/javascript" src="tiny_mce_popup.js?ver=311b"></script>
|
||||
<?php
|
||||
wp_admin_css( 'global', true );
|
||||
wp_admin_css( 'wp-admin', true );
|
||||
|
@ -37,7 +37,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080710' );
|
||||
|
||||
// Modify this version when tinyMCE plugins are changed.
|
||||
$mce_version = apply_filters('tiny_mce_version', '20080712');
|
||||
$mce_version = apply_filters('tiny_mce_version', '20080730');
|
||||
$scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
|
||||
|
||||
$scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
|
||||
|
Loading…
Reference in New Issue
Block a user