Update TinyMCE to 3.2.0 and remove compression, fixes #7827

git-svn-id: http://svn.automattic.com/wordpress/trunk@9064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-10-02 16:30:14 +00:00
parent 3d29e571fb
commit cfc2109116
33 changed files with 845 additions and 229 deletions

View File

@ -33,6 +33,21 @@ addLoadEvent = function(func) {if (typeof jQuery != "undefined") jQuery(document
</script> </script>
<?php <?php
switch ( $pagenow ) {
case 'post.php':
add_action( 'admin_head-post.php', 'wp_tiny_mce' );
break;
case 'post-new.php':
add_action( 'admin_head-post-new.php', 'wp_tiny_mce' );
break;
case 'page.php':
add_action( 'admin_head-page.php', 'wp_tiny_mce' );
break;
case 'page-new.php':
add_action( 'admin_head-page-new.php', 'wp_tiny_mce' );
break;
}
$hook_suffixes = array(); $hook_suffixes = array();
if ( isset($page_hook) ) if ( isset($page_hook) )

View File

@ -86,8 +86,9 @@ wp_default_styles($wp_styles);
$defaults = $man_version = ''; $defaults = $man_version = '';
foreach ( $wp_scripts->registered as $script ) { foreach ( $wp_scripts->registered as $script ) {
if ( empty($script->src) || strpos($script->src, 'tiny_mce_config.php') ) continue; if ( empty($script->src) ) continue;
$ver = empty($script->ver) ? $wp_version : $script->ver; $ver = empty($script->ver) ? $wp_version : $script->ver;
if ( 'editor' == $script->handle ) $mce_ver = $script->ver;
$src = str_replace( array( '/wp-admin/', '/wp-includes/' ), array( '', '../wp-includes/' ), $script->src ); $src = str_replace( array( '/wp-admin/', '/wp-includes/' ), array( '', '../wp-includes/' ), $script->src );
$defaults .= '{ "url" : "' . $src . '?ver=' . $ver . '" },' . "\n"; $defaults .= '{ "url" : "' . $src . '?ver=' . $ver . '" },' . "\n";
$man_version .= $ver; $man_version .= $ver;
@ -122,10 +123,17 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' );
?> ?>
{ {
"betaManifestVersion" : 1, "betaManifestVersion" : 1,
"version" : "<?php echo $man_version; ?>_20080823", "version" : "<?php echo $man_version; ?>_20081002",
"entries" : [ "entries" : [
<?php echo $defaults; ?> <?php echo $defaults; ?>
{ "url" : "images/logo50.png" },
{ "url" : "images/menu-open.png" },
{ "url" : "images/menu-closed.png" },
{ "url" : "images/del.png" },
{ "url" : "images/list.gif" },
{ "url" : "images/exc.gif" },
{ "url" : "images/align-center.png" }, { "url" : "images/align-center.png" },
{ "url" : "images/align-left.png" }, { "url" : "images/align-left.png" },
{ "url" : "images/align-none.png" }, { "url" : "images/align-none.png" },
@ -163,52 +171,65 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' );
{ "url" : "images/se.png" }, { "url" : "images/se.png" },
<?php if ( is_file('../wp-includes/js/tinymce/tiny_mce.js') ) { ?> <?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/tiny_mce.js", "src" : "../wp-includes/js/tinymce/tiny_mce.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=311b" }, { "url" : "../wp-includes/js/tinymce/langs/wp-langs-en.js", "src" : "../wp-includes/js/tinymce/langs/wp-langs-en.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=311b" }, { "url" : "../wp-includes/js/tinymce/wordpress.css", "src" : "../wp-includes/js/tinymce/wordpress.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "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=311f" },
{ "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=311b" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js", "src" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js", "src" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/autosave/editor_plugin.js", "src" : "../wp-includes/js/tinymce/plugins/autosave/editor_plugin.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js", "src" : "../wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/paste/editor_plugin.js", "src" : "../wp-includes/js/tinymce/plugins/paste/editor_plugin.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/wordpress/editor_plugin.js", "src" : "../wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/media/editor_plugin.js", "src" : "../wp-includes/js/tinymce/plugins/media/editor_plugin.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js", "src" : "../wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js", "src" : "../wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js", "src" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "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=311f" },
{ "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/source_editor.htm", "src" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm", "src" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm", "src" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm", "src" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm", "src" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm", "src" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/media/media.htm", "src" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm", "src" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm", "src" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311f" }, { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm", "src" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm", "src" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm", "src" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html", "src" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js", "src" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/utils/mctabs.js", "src" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/utils/validate.js", "src" : "../wp-includes/js/tinymce/utils/validate.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/utils/form_utils.js", "src" : "../wp-includes/js/tinymce/utils/form_utils.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/utils/editable_selects.js", "src" : "../wp-includes/js/tinymce/utils/editable_selects.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js", "src" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/paste/js/pastetext.js", "src" : "../wp-includes/js/tinymce/plugins/paste/js/pastetext.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/media/js/media.js", "src" : "../wp-includes/js/tinymce/plugins/media/js/media.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js", "src" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js", "src" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/image.js", "src" : "../wp-includes/js/tinymce/themes/advanced/js/image.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js", "src" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js", "src" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js", "src" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js", "src" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js", "src" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css", "src" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css", "src" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css", "src" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css", "src" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css", "src" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css", "src" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css", "src" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css", "src" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css", "src" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css", "src" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css", "src" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css", "src" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=<?php echo $mce_ver; ?>", "ignoreQuery" : true },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/img/icons.gif" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/img/icons.gif" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg" },

View File

@ -985,77 +985,240 @@ function wp_create_post_autosave( $post_id ) {
} }
/** /**
* Adds a trimmed down version of the tinyMCE editor used on the Write -> Post screen. * wp_tiny_mce() - adds the TinyMCE editor used on the Write and Edit screens.
*
* Has option to output a trimmed down version used in Press This.
* *
* @package WordPress * @package WordPress
* @since 2.6.0 * @since 2.7
*/ */
function wp_teeny_mce( $args = null ) { function wp_tiny_mce( $teeny = false ) {
if ( !user_can_richedit() ) if ( ! user_can_richedit() )
return; return;
$defaults = array(
'buttons1' => 'bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,undo,redo,link,unlink'
);
$args = wp_parse_args( $args, $defaults );
if ( is_array( $args['buttons1'] ) )
$args['buttons1'] = join( ',', $args['buttons1'] );
$language = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) );
?>
<script type="text/javascript" src="<?php echo clean_url( site_url( 'wp-includes/js/tinymce/tiny_mce.js' ) ); ?>"></script>
<script type="text/javascript">
/* <![CDATA[ */
<?php
// Add TinyMCE languages
@include_once( ABSPATH . WPINC . '/js/tinymce/langs/wp-langs.php' );
if ( isset($strings) )
echo $strings;
?>
(function() {
var base = tinymce.baseURL, sl = tinymce.ScriptLoader, ln = "<?php echo $language; ?>";
sl.markDone(base + '/langs/' + ln + '.js');
sl.markDone(base + '/themes/advanced/langs/' + ln + '.js');
sl.markDone(base + '/themes/advanced/langs/' + ln + '_dlg.js');
})();
var wpTeenyMCEInit = function() { $baseurl = includes_url('js/tinymce');
tinyMCE.init({
mode: "textareas", $mce_css = $baseurl . '/wordpress.css';
editor_selector: "mceEditor", $mce_css = apply_filters('mce_css', $mce_css);
language : "<?php echo $language; ?>",
width: "100%", $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1
theme : "advanced",
theme_advanced_buttons1 : "<?php echo $args['buttons1']; ?>", /*
theme_advanced_buttons2 : "", The following filter allows localization scripts to change the languages displayed in the spellchecker's drop-down menu.
theme_advanced_buttons3 : "", By default it uses Google's spellchecker API, but can be configured to use PSpell/ASpell if installed on the server.
theme_advanced_toolbar_location : "top", The + sign marks the default language. More information:
theme_advanced_toolbar_align : "left", http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker
theme_advanced_statusbar_location : "bottom", */
theme_advanced_resizing : true, $mce_spellchecker_languages = apply_filters('mce_spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv');
theme_advanced_resize_horizontal : false,
skin : "wp_theme", if ( $teeny ) {
dialog_type : "modal", $plugins = apply_filters( 'teeny_mce_plugins', array('safari', 'inlinepopups', 'media', 'autosave', 'fullscreen') );
relative_urls : false, $ext_plugins = '';
remove_script_host : false, } else {
convert_urls : false, $plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'wpeditimage' );
apply_source_formatting : false,
remove_linebreaks : true, /*
accessibility_focus : false, The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'.
tab_focus : ":next", It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin.
plugins : "safari,inlinepopups", The url should be absolute and should include the js file name to be loaded. Example:
entities : "38,amp,60,lt,62,gt", array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' )
force_p_newlines : true, If the plugin uses a button, it should be added with one of the "$mce_buttons" filters.
save_callback : 'switchEditors.saveCallback' */
}); $mce_external_plugins = apply_filters('mce_external_plugins', array());
};
wpTeenyMCEInit(); $ext_plugins = "\n";
/* ]]> */ if ( ! empty($mce_external_plugins) ) {
/*
The following filter loads external language files for TinyMCE plugins.
It takes an associative array 'plugin_name' => 'path', where path is the
include path to the file. The language file should follow the same format as
/tinymce/langs/wp-langs.php and should define a variable $strings that
holds all translated strings. Example:
$strings = 'tinyMCE.addI18n("' . $mce_locale . '.mypluginname_dlg",{tab_general:"General", ... })';
*/
$mce_external_languages = apply_filters('mce_external_languages', array());
$loaded_langs = array();
$strings = '';
if ( ! empty($mce_external_languages) ) {
foreach ( $mce_external_languages as $name => $path ) {
if ( is_file($path) && is_readable($path) ) {
include_once($path);
$ext_plugins .= $strings;
$loaded_langs[] = $name;
}
}
}
foreach ( $mce_external_plugins as $name => $url ) {
if ( is_ssl() ) $url = str_replace('http://', 'https://', $url);
$plugins[] = '-' . $name;
if ( in_array($name, $loaded_langs) ) {
$plugurl = dirname($url);
$ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";
}
$ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";
}
}
}
$plugins = implode($plugins, ',');
if ( $teeny ) {
$mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold, italic, underline, blockquote, separator, strikethrough, bullist, numlist,justifyleft, justifycenter, justifyright, undo, redo, link, unlink, fullscreen') );
$mce_buttons = implode($mce_buttons, ',');
$mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = '';
} else {
$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'link', 'unlink', 'wp_more', '|', 'spellchecker', 'fullscreen', 'wp_adv' ));
$mce_buttons = implode($mce_buttons, ',');
$mce_buttons_2 = apply_filters('mce_buttons_2', array('formatselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' ));
$mce_buttons_2 = implode($mce_buttons_2, ',');
$mce_buttons_3 = apply_filters('mce_buttons_3', array());
$mce_buttons_3 = implode($mce_buttons_3, ',');
$mce_buttons_4 = apply_filters('mce_buttons_4', array());
$mce_buttons_4 = implode($mce_buttons_4, ',');
}
$no_captions = ( apply_filters( 'disable_captions', '' ) ) ? true : false;
// TinyMCE init settings
$initArray = array (
'mode' => 'none',
'onpageload' => 'switchEditors.edInit',
'width' => '100%',
'theme' => 'advanced',
'skin' => 'wp_theme',
'theme_advanced_buttons1' => "$mce_buttons",
'theme_advanced_buttons2' => "$mce_buttons_2",
'theme_advanced_buttons3' => "$mce_buttons_3",
'theme_advanced_buttons4' => "$mce_buttons_4",
'language' => "$mce_locale",
'spellchecker_languages' => "$mce_spellchecker_languages",
'theme_advanced_toolbar_location' => 'top',
'theme_advanced_toolbar_align' => 'left',
'theme_advanced_statusbar_location' => 'bottom',
'theme_advanced_resizing' => true,
'theme_advanced_resize_horizontal' => false,
'dialog_type' => 'modal',
'relative_urls' => false,
'remove_script_host' => false,
'convert_urls' => false,
'apply_source_formatting' => false,
'remove_linebreaks' => true,
'paste_convert_middot_lists' => true,
'paste_remove_spans' => true,
'paste_remove_styles' => true,
'gecko_spellcheck' => true,
'entities' => '38,amp,60,lt,62,gt',
'accessibility_focus' => false,
'tab_focus' => ':next',
'content_css' => "$mce_css",
'save_callback' => 'switchEditors.saveCallback',
'wpeditimage_disable_captions' => $no_captions,
'plugins' => "$plugins",
'strict_loading_mode' => true
);
// For people who really REALLY know what they're doing with TinyMCE
// You can modify initArray to add, remove, change elements of the config before tinyMCE.init
// 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.
if ( $teeny ) {
$initArray = apply_filters('teeny_mce_before_init', $initArray);
} else {
$initArray = apply_filters('tiny_mce_before_init', $initArray);
}
$language = $initArray['language'];
$ver = apply_filters('tiny_mce_version', '200');
/*
foreach ( $initArray as $v )
$ver .= $v;
if ( ! empty($mce_external_plugins) ) {
foreach ( $mce_external_plugins as $n => $v )
$ver .= $n;
}
$ver = md5( $ver );
// Use cached translations file if exists
$langs_file = ABSPATH . WPINC . '/js/tinymce/langs/wp-langs-' . $language . '.js';
if ( is_file($langs_file) && is_readable($langs_file) ) {
if ( $ver != get_option('mce_refresh_check') ) {
@unlink($langs_file);
update_option('mce_refresh_check', $ver);
} else {
$lang = false;
}
}
*/
if ( 'en' != $language )
include_once(ABSPATH . WPINC . '/js/tinymce/langs/wp-langs.php');
$mce_options = '';
foreach ( $initArray as $k => $v )
$mce_options .= $k . ':"' . $v . '", ';
$mce_options = rtrim( trim($mce_options), '\n\r,' ); ?>
<script type="text/javascript">
tinyMCEPreInit = {
base : "<?php echo $baseurl; ?>",
suffix : "",
query : "ver=<?php echo $ver; ?>",
mceInit : {<?php echo $mce_options; ?>},
go : function() {
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');
sl.markDone(t.base + '/themes/' + th + '/langs/' + ln + '.js');
sl.markDone(t.base + '/themes/' + th + '/langs/' + ln + '_dlg.js');
tinymce.each(pl.split(','), function(n) {
if (n && n.charAt(0) != '-') {
sl.markDone(t.base + '/plugins/' + n + '/langs/' + ln + '.js');
sl.markDone(t.base + '/plugins/' + n + '/langs/' + ln + '_dlg.js');
}
});
},
load_ext : function(url,lang) {
var sl = tinymce.ScriptLoader;
sl.markDone(url + '/langs/' + lang + '.js');
sl.markDone(url + '/langs/' + lang + '_dlg.js');
}
};
</script>
<script type="text/javascript" src="<?php echo $baseurl; ?>/tiny_mce.js?ver=<?php echo $ver; ?>"></script>
<?php if ( 'en' == $language ) { ?>
<script type="text/javascript" src="<?php echo $baseurl; ?>/langs/wp-langs-<?php echo $language; ?>.js?ver=<?php echo $ver; ?>"></script>
<?php } ?>
<script type="text/javascript">
<?php if ( 'en' != $language && isset($lang) ) echo $lang; ?>
<?php if ( $ext_plugins ) echo $ext_plugins; ?>
// Mark translations as done
tinyMCEPreInit.go();
// Init
tinyMCE.init(tinyMCEPreInit.mceInit);
</script> </script>
<?php <?php

View File

@ -305,51 +305,14 @@ die;
do_action('admin_print_styles'); do_action('admin_print_styles');
do_action('admin_print_scripts'); do_action('admin_print_scripts');
do_action('admin_head'); do_action('admin_head');
if ( user_can_richedit() ) {
add_filter( 'teeny_mce_before_init', create_function( '$a', '$a["onpageload"] = ""; $a["mode"] = "textareas"; $a["editor_selector"] = "mceEditor"; return $a;' ) );
wp_tiny_mce( true );
}
?> ?>
<script type="text/javascript"> <script type="text/javascript">
<?php if ( user_can_richedit() ) {
$language = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) );
// Add TinyMCE languages
@include_once( dirname(__FILE__).'/../wp-includes/js/tinymce/langs/wp-langs.php' );
if ( isset($strings) ) echo $strings; ?>
(function() {
var base = tinymce.baseURL, sl = tinymce.ScriptLoader, ln = "<?php echo $language; ?>";
sl.markDone(base + '/langs/' + ln + '.js');
sl.markDone(base + '/themes/advanced/langs/' + ln + '.js');
sl.markDone(base + '/themes/advanced/langs/' + ln + '_dlg.js');
})();
tinyMCE.init({
mode: "textareas",
editor_selector: "mceEditor",
language : "<?php echo $language; ?>",
width: "100%",
height: "300",
theme : "advanced",
theme_advanced_buttons1 : "bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,justifyleft, justifycenter, justifyright, undo,redo,link,unlink",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false,
skin : "wp_theme",
dialog_type : "modal",
relative_urls : false,
remove_script_host : false,
convert_urls : false,
apply_source_formatting : false,
remove_linebreaks : true,
accessibility_focus : false,
tab_focus : ":next",
plugins : "safari, inlinepopups, media",
entities : "38,amp,60,lt,62,gt",
force_p_newlines : true,
save_callback : 'switchEditors.saveCallback'
});
<?php } ?>
jQuery('#tags-input').hide(); jQuery('#tags-input').hide();
tag_update_quickclicks(); tag_update_quickclicks();
// add the quickadd form // add the quickadd form
@ -534,12 +497,13 @@ die;
<h2 id="content_type"><label for="content"><?php _e('Post') ?></label></h2> <h2 id="content_type"><label for="content"><?php _e('Post') ?></label></h2>
<div class="editor-container"> <div class="editor-container">
<textarea name="content" id="content" style="width:100%;" class="mceEditor" rows="15"><?php if ($selection) { echo wp_richedit_pre($selection); } ?><p>via <a href="<?php echo $url ?>"><?php echo $title; ?></a></p><?php if($selection) echo '.'; ?></textarea> <textarea name="content" id="content" style="width:100%;" class="mceEditor" rows="15">
<?php if ($selection) echo wp_richedit_pre($selection); ?>
<p>via <a href="<?php echo $url ?>"><?php echo $title; ?></a>.</p>
</textarea>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
</body> </body>

View File

@ -0,0 +1,429 @@
tinyMCE.addI18n({en:{
common:{
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
apply:"Apply",
insert:"Insert",
update:"Update",
cancel:"Cancel",
close:"Close",
browse:"Browse",
class_name:"Class",
not_set:"-- Not set --",
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.",
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
invalid_data:"Error: Invalid values entered, these are marked in red.",
more_colors:"More colors"
},
contextmenu:{
align:"Alignment",
left:"Left",
center:"Center",
right:"Right",
full:"Full"
},
insertdatetime:{
date_fmt:"%Y-%m-%d",
time_fmt:"%H:%M:%S",
insertdate_desc:"Insert date",
inserttime_desc:"Insert time",
months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
months_short:"Jan_January_abbreviation,Feb_February_abbreviation,Mar_March_abbreviation,Apr_April_abbreviation,May_May_abbreviation,Jun_June_abbreviation,Jul_July_abbreviation,Aug_August_abbreviation,Sep_September_abbreviation,Oct_October_abbreviation,Nov_November_abbreviation,Dec_December_abbreviation",
day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"
},
print:{
print_desc:"Print"
},
preview:{
preview_desc:"Preview"
},
directionality:{
ltr_desc:"Direction left to right",
rtl_desc:"Direction right to left"
},
layer:{
insertlayer_desc:"Insert new layer",
forward_desc:"Move forward",
backward_desc:"Move backward",
absolute_desc:"Toggle absolute positioning",
content:"New layer..."
},
save:{
save_desc:"Save",
cancel_desc:"Cancel all changes"
},
nonbreaking:{
nonbreaking_desc:"Insert non-breaking space character"
},
iespell:{
iespell_desc:"Run spell checking",
download:"ieSpell not detected. Do you want to install it now?"
},
advhr:{
advhr_desc:"Horizontale rule"
},
emotions:{
emotions_desc:"Emotions"
},
searchreplace:{
search_desc:"Find",
replace_desc:"Find/Replace"
},
advimage:{
image_desc:"Insert/edit image"
},
advlink:{
link_desc:"Insert/edit link"
},
xhtmlxtras:{
cite_desc:"Citation",
abbr_desc:"Abbreviation",
acronym_desc:"Acronym",
del_desc:"Deletion",
ins_desc:"Insertion",
attribs_desc:"Insert/Edit Attributes"
},
style:{
desc:"Edit CSS Style"
},
paste:{
paste_text_desc:"Paste as Plain Text",
paste_word_desc:"Paste from Word",
selectall_desc:"Select All"
},
paste_dlg:{
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
text_linebreaks:"Keep linebreaks",
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
},
table:{
desc:"Inserts a new table",
row_before_desc:"Insert row before",
row_after_desc:"Insert row after",
delete_row_desc:"Delete row",
col_before_desc:"Insert column before",
col_after_desc:"Insert column after",
delete_col_desc:"Remove column",
split_cells_desc:"Split merged table cells",
merge_cells_desc:"Merge table cells",
row_desc:"Table row properties",
cell_desc:"Table cell properties",
props_desc:"Table properties",
paste_row_before_desc:"Paste table row before",
paste_row_after_desc:"Paste table row after",
cut_row_desc:"Cut table row",
copy_row_desc:"Copy table row",
del:"Delete table",
row:"Row",
col:"Column",
cell:"Cell"
},
autosave:{
unload_msg:"The changes you made will be lost if you navigate away from this page."
},
fullscreen:{
desc:"Toggle fullscreen mode (Alt+Shift+G)"
},
media:{
desc:"Insert / edit embedded media",
delta_width:"0",
delta_height:"0",
edit:"Edit embedded media"
},
fullpage:{
desc:"Document properties"
},
template:{
desc:"Insert predefined template content"
},
visualchars:{
desc:"Visual control characters on/off."
},
spellchecker:{
desc:"Toggle spellchecker (Alt+Shift+N)",
menu:"Spellchecker settings",
ignore_word:"Ignore word",
ignore_words:"Ignore all",
langs:"Languages",
wait:"Please wait...",
sug:"Suggestions",
no_sug:"No suggestions",
no_mpell:"No misspellings found."
},
pagebreak:{
desc:"Insert page break."
}}});
tinyMCE.addI18n("en.advanced",{
style_select:"Styles",
font_size:"Font size",
fontdefault:"Font family",
block:"Format",
paragraph:"Paragraph",
div:"Div",
address:"Address",
pre:"Preformatted",
h1:"Heading 1",
h2:"Heading 2",
h3:"Heading 3",
h4:"Heading 4",
h5:"Heading 5",
h6:"Heading 6",
blockquote:"Blockquote",
code:"Code",
samp:"Code sample",
dt:"Definition term ",
dd:"Definition description",
bold_desc:"Bold (Ctrl / Alt+Shift + B)",
italic_desc:"Italic (Ctrl / Alt+Shift + I)",
underline_desc:"Underline",
striketrough_desc:"Strikethrough (Alt+Shift+D)",
justifyleft_desc:"Align left (Alt+Shift+L)",
justifycenter_desc:"Align center (Alt+Shift+C)",
justifyright_desc:"Align right (Alt+Shift+R)",
justifyfull_desc:"Align full (Alt+Shift+J)",
bullist_desc:"Unordered list (Alt+Shift+U)",
numlist_desc:"Ordered list (Alt+Shift+O)",
outdent_desc:"Outdent",
indent_desc:"Indent",
undo_desc:"Undo (Ctrl+Z)",
redo_desc:"Redo (Ctrl+Y)",
link_desc:"Insert/edit link (Alt+Shift+A)",
link_delta_width:"0",
link_delta_height:"0",
unlink_desc:"Unlink (Alt+Shift+S)",
image_desc:"Insert/edit image (Alt+Shift+M)",
image_delta_width:"0",
image_delta_height:"0",
cleanup_desc:"Cleanup messy code",
code_desc:"Edit HTML Source",
sub_desc:"Subscript",
sup_desc:"Superscript",
hr_desc:"Insert horizontal ruler",
removeformat_desc:"Remove formatting",
forecolor_desc:"Select text color",
backcolor_desc:"Select background color",
charmap_desc:"Insert custom character",
visualaid_desc:"Toggle guidelines/invisible elements",
anchor_desc:"Insert/edit anchor",
cut_desc:"Cut",
copy_desc:"Copy",
paste_desc:"Paste",
image_props_desc:"Image properties",
newdocument_desc:"New document",
help_desc:"Help",
blockquote_desc:"Blockquote (Alt+Shift+Q)",
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.",
path:"Path",
newdocument:"Are you sure you want to clear all contents?",
toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
more_colors:"More colors",
colorpicker_delta_width:"0",
colorpicker_delta_height:"0"
});
tinyMCE.addI18n("en.advanced_dlg",{
about_title:"About TinyMCE",
about_general:"About",
about_help:"Help",
about_license:"License",
about_plugins:"Plugins",
about_plugin:"Plugin",
about_author:"Author",
about_version:"Version",
about_loaded:"Loaded plugins",
anchor_title:"Insert/edit anchor",
anchor_name:"Anchor name",
code_title:"HTML Source Editor",
code_wordwrap:"Word wrap",
colorpicker_title:"Select a color",
colorpicker_picker_tab:"Picker",
colorpicker_picker_title:"Color picker",
colorpicker_palette_tab:"Palette",
colorpicker_palette_title:"Palette colors",
colorpicker_named_tab:"Named",
colorpicker_named_title:"Named colors",
colorpicker_color:"Color:",
colorpicker_name:"Name:",
charmap_title:"Select custom character",
image_title:"Insert/edit image",
image_src:"Image URL",
image_alt:"Image description",
image_list:"Image list",
image_border:"Border",
image_dimensions:"Dimensions",
image_vspace:"Vertical space",
image_hspace:"Horizontal space",
image_align:"Alignment",
image_align_baseline:"Baseline",
image_align_top:"Top",
image_align_middle:"Middle",
image_align_bottom:"Bottom",
image_align_texttop:"Text top",
image_align_textbottom:"Text bottom",
image_align_left:"Left",
image_align_right:"Right",
link_title:"Insert/edit link",
link_url:"Link URL",
link_target:"Target",
link_target_same:"Open link in the same window",
link_target_blank:"Open link in a new window",
link_titlefield:"Title",
link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
link_list:"Link list"
});
tinyMCE.addI18n("en.media_dlg",{
title:"Insert / edit embedded media",
general:"General",
advanced:"Advanced",
file:"File/URL",
list:"List",
size:"Dimensions",
preview:"Preview",
constrain_proportions:"Constrain proportions",
type:"Type",
id:"Id",
name:"Name",
class_name:"Class",
vspace:"V-Space",
hspace:"H-Space",
play:"Auto play",
loop:"Loop",
menu:"Show menu",
quality:"Quality",
scale:"Scale",
align:"Align",
salign:"SAlign",
wmode:"WMode",
bgcolor:"Background",
base:"Base",
flashvars:"Flashvars",
liveconnect:"SWLiveConnect",
autohref:"AutoHREF",
cache:"Cache",
hidden:"Hidden",
controller:"Controller",
kioskmode:"Kiosk mode",
playeveryframe:"Play every frame",
targetcache:"Target cache",
correction:"No correction",
enablejavascript:"Enable JavaScript",
starttime:"Start time",
endtime:"End time",
href:"Href",
qtsrcchokespeed:"Choke speed",
target:"Target",
volume:"Volume",
autostart:"Auto start",
enabled:"Enabled",
fullscreen:"Fullscreen",
invokeurls:"Invoke URLs",
mute:"Mute",
stretchtofit:"Stretch to fit",
windowlessvideo:"Windowless video",
balance:"Balance",
baseurl:"Base URL",
captioningid:"Captioning id",
currentmarker:"Current marker",
currentposition:"Current position",
defaultframe:"Default frame",
playcount:"Play count",
rate:"Rate",
uimode:"UI Mode",
flash_options:"Flash options",
qt_options:"Quicktime options",
wmp_options:"Windows media player options",
rmp_options:"Real media player options",
shockwave_options:"Shockwave options",
autogotourl:"Auto goto URL",
center:"Center",
imagestatus:"Image status",
maintainaspect:"Maintain aspect",
nojava:"No java",
prefetch:"Prefetch",
shuffle:"Shuffle",
console:"Console",
numloop:"Num loops",
controls:"Controls",
scriptcallbacks:"Script callbacks",
swstretchstyle:"Stretch style",
swstretchhalign:"Stretch H-Align",
swstretchvalign:"Stretch V-Align",
sound:"Sound",
progress:"Progress",
qtsrc:"QT Src",
qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.",
align_top:"Top",
align_right:"Right",
align_bottom:"Bottom",
align_left:"Left",
align_center:"Center",
align_top_left:"Top left",
align_top_right:"Top right",
align_bottom_left:"Bottom left",
align_bottom_right:"Bottom right",
flv_options:"Flash video options",
flv_scalemode:"Scale mode",
flv_buffer:"Buffer",
flv_startimage:"Start image",
flv_starttime:"Start time",
flv_defaultvolume:"Default volume",
flv_hiddengui:"Hidden GUI",
flv_autostart:"Auto start",
flv_loop:"Loop",
flv_showscalemodes:"Show scale modes",
flv_smoothvideo:"Smooth video",
flv_jscallback:"JS Callback"
});
tinyMCE.addI18n("en.wordpress",{
wp_adv_desc:"Show/Hide Kitchen Sink (Alt+Shift+Z)",
wp_more_desc:"Insert More tag (Alt+Shift+T)",
wp_page_desc:"Insert Page break (Alt+Shift+P)",
wp_help_desc:"Help (Alt+Shift+H)",
wp_more_alt:"More...",
wp_page_alt:"Next page...",
add_media:"Add Media",
add_image:"Add an Image",
add_video:"Add Video",
add_audio:"Add Audio"
});
tinyMCE.addI18n("en.wpeditimage",{
edit_img:"Edit Image",
del_img:"Delete Image",
adv_settings:"Advanced Settings",
none:"None",
size:"Size",
thumbnail:"Thumbnail",
medium:"Medium",
full_size:"Full Size",
current_link:"Current Link",
link_to_img:"Link to Image",
link_help:"Enter a link URL or click above for presets.",
adv_img_settings:"Advanced Image Settings",
source:"Source",
width:"Width",
height:"Height",
orig_size:"Original Size",
css:"CSS Class",
adv_link_settings:"Advanced Link Settings",
link_rel:"Link Rel",
height:"Height",
orig_size:"Original Size",
css:"CSS Class",
s60:"60%",
s70:"70%",
s80:"80%",
s90:"90%",
s100:"100%",
s110:"110%",
s120:"120%",
s130:"130%",
img_title:"Edit Image Title",
caption:"Edit Image Caption",
alt:"Edit Alternate Text"
});

View File

@ -1,5 +1,18 @@
<?php <?php
function mce_put_file( $path, $content ) {
if ( function_exists('file_put_contents') )
return @file_put_contents( $path, $content );
$newfile = false;
$fp = @fopen( $path, 'wb' );
if ($fp) {
$newfile = fwrite( $fp, $content );
fclose($fp);
}
return $newfile;
}
// escape text only if it needs translating // escape text only if it needs translating
function mce_escape($text) { function mce_escape($text) {
global $language; global $language;
@ -8,7 +21,7 @@ function mce_escape($text) {
else return js_escape($text); else return js_escape($text);
} }
$strings = 'tinyMCE.addI18n({' . $language . ':{ $lang = 'tinyMCE.addI18n({' . $language . ':{
common:{ common:{
edit_confirm:"' . mce_escape( __('Do you want to use the WYSIWYG mode for this textarea?') ) . '", edit_confirm:"' . mce_escape( __('Do you want to use the WYSIWYG mode for this textarea?') ) . '",
apply:"' . mce_escape( __('Apply') ) . '", apply:"' . mce_escape( __('Apply') ) . '",
@ -438,4 +451,5 @@ caption:"' . mce_escape( __('Edit Image Caption') ) . '",
alt:"' . mce_escape( __('Edit Alternate Text') ) . '" alt:"' . mce_escape( __('Edit Alternate Text') ) . '"
}); });
'; ';
?>
// mce_put_file( ABSPATH . WPINC . '/js/tinymce/langs/wp-langs-' . $language . '.js', $lang );

View File

@ -1 +0,0 @@
Check the TinyMCE documentation for details on this plugin.

View File

@ -1 +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=DOM.doc.documentElement;if(ed.getParam('fullscreen_is_enabled')){if(ed.getParam('fullscreen_new_window'))closeFullscreen();else{DOM.win.setTimeout(function(){tinymce.dom.Event.remove(DOM.win,'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(DOM.doc.body,'overflow',ed.getParam('fullscreen_overflow'));DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'),ed.getParam('fullscreen_scrolly'));tinyMCE.settings=tinyMCE.oldSettings;},10);}return;}if(ed.getParam('fullscreen_new_window')){win=DOM.win.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(DOM.doc.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(DOM.doc.body,'overflow','hidden');de.style.overflow='hidden';vp=DOM.getViewPort();DOM.win.scrollTo(0,0);if(tinymce.isIE)vp.h-=1;n=DOM.add(DOM.doc.body,'div',{id:'mce_fullscreen_container',style:'position:'+(tinymce.isIE6||(tinymce.isIE&&!DOM.boxModel)?'absolute':'fixed')+';top:0;left:0;width:'+vp.w+'px;height:'+vp.h+'px;z-index:200000;'});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.focus();});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(DOM.win,'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);})(); (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=DOM.doc.documentElement;if(ed.getParam('fullscreen_is_enabled')){if(ed.getParam('fullscreen_new_window'))closeFullscreen();else{DOM.win.setTimeout(function(){tinymce.dom.Event.remove(DOM.win,'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(DOM.doc.body,'overflow',ed.getParam('fullscreen_overflow'));DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'),ed.getParam('fullscreen_scrolly'));tinyMCE.settings=tinyMCE.oldSettings;},10);}return;}if(ed.getParam('fullscreen_new_window')){win=DOM.win.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(DOM.doc.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(tinymce.isIE&&(s.fullscreen_html_overflow=='visible'||s.fullscreen_html_overflow=='scroll'))s.fullscreen_html_overflow='auto';if(s.fullscreen_overflow=='0px')s.fullscreen_overflow='';DOM.setStyle(DOM.doc.body,'overflow','hidden');de.style.overflow='hidden';vp=DOM.getViewPort();DOM.win.scrollTo(0,0);if(tinymce.isIE)vp.h-=1;n=DOM.add(DOM.doc.body,'div',{id:'mce_fullscreen_container',style:'position:'+(tinymce.isIE6||(tinymce.isIE&&!DOM.boxModel)?'absolute':'fixed')+';top:0;left:0;width:'+vp.w+'px;height:'+vp.h+'px;z-index:200000;'});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.focus();});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(DOM.win,'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);})();

View File

@ -3,7 +3,7 @@
<head> <head>
<title></title> <title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="../../tiny_mce.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce.js?ver=3201"></script>
<script type="text/javascript"> <script type="text/javascript">
function patchCallback(settings, key) { function patchCallback(settings, key) {
if (settings[key]) if (settings[key])

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>Template for dialogs</title> <title>Template for dialogs</title>
<link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css?ver=311b" /> <link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css?ver=3201" />
</head> </head>
<body> <body>

File diff suppressed because one or more lines are too long

View File

@ -2,13 +2,13 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>{#media_dlg.title}</title> <title>{#media_dlg.title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3201"></script>
<script type="text/javascript" src="js/media.js?ver=311b"></script> <script type="text/javascript" src="js/media.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/mctabs.js?ver=311b"></script> <script type="text/javascript" src="../../utils/mctabs.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/validate.js?ver=311b"></script> <script type="text/javascript" src="../../utils/validate.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/form_utils.js?ver=311b"></script> <script type="text/javascript" src="../../utils/form_utils.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/editable_selects.js?ver=311b"></script> <script type="text/javascript" src="../../utils/editable_selects.js?ver=3201"></script>
<link href="css/media.css?ver=311b" rel="stylesheet" type="text/css" /> <link href="css/media.css?ver=3201" rel="stylesheet" type="text/css" />
<base target="_self" /> <base target="_self" />
</head> </head>
<body style="display: none"> <body style="display: none">

View File

@ -2,7 +2,7 @@
<head> <head>
<title>blank_page</title> <title>blank_page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="css/blank.css?ver=311b" rel="stylesheet" type="text/css" /> <link href="css/blank.css?ver=3201" rel="stylesheet" type="text/css" />
<base target="_self" /> <base target="_self" />
<script type="text/javascript"> <script type="text/javascript">
function init() { function init() {

File diff suppressed because one or more lines are too long

View File

@ -2,8 +2,8 @@
<head> <head>
<title>{#paste.paste_text_desc}</title> <title>{#paste.paste_text_desc}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3201"></script>
<script type="text/javascript" src="js/pastetext.js?ver=311b"></script> <script type="text/javascript" src="js/pastetext.js?ver=3201"></script>
<base target="_self" /> <base target="_self" />
</head> </head>
<body onresize="resizeInputs();" style="display:none; overflow:hidden;"> <body onresize="resizeInputs();" style="display:none; overflow:hidden;">

View File

@ -2,9 +2,9 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>{#paste.paste_word_desc}</title> <title>{#paste.paste_word_desc}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3201"></script>
<script type="text/javascript" src="js/pasteword.js?ver=311b"></script> <script type="text/javascript" src="js/pasteword.js?ver=3201"></script>
<link href="css/pasteword.css?ver=311b" rel="stylesheet" type="text/css" /> <link href="css/pasteword.css?ver=3201" rel="stylesheet" type="text/css" />
<base target="_self" /> <base target="_self" />
</head> </head>
<body onresize="resizeInputs();" style="display:none; overflow:hidden;"> <body onresize="resizeInputs();" style="display:none; overflow:hidden;">

File diff suppressed because one or more lines are too long

View File

@ -210,6 +210,9 @@
do_align : function(n, a) { do_align : function(n, a) {
var P, DL, DIV, cls, c, ed = tinyMCE.activeEditor; var P, DL, DIV, cls, c, ed = tinyMCE.activeEditor;
if ( /^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className) )
return;
P = ed.dom.getParent(n, 'p'); P = ed.dom.getParent(n, 'p');
DL = ed.dom.getParent(n, 'dl'); DL = ed.dom.getParent(n, 'dl');
DIV = ed.dom.getParent(n, 'div'); DIV = ed.dom.getParent(n, 'div');

View File

@ -4,15 +4,15 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title> <title></title>
<script type="text/javascript" src="js/editimage.js?ver=311f"></script> <script type="text/javascript" src="js/editimage.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/form_utils.js?ver=311b"></script> <script type="text/javascript" src="../../utils/form_utils.js?ver=3201"></script>
<link rel="stylesheet" href="css/media26.css?ver=2.6" type="text/css" media="all" /> <link rel="stylesheet" href="css/media26.css?ver=3201" type="text/css" media="all" />
<link rel="stylesheet" href="css/editimage.css?ver=311f" type="text/css" media="all" /> <link rel="stylesheet" href="css/editimage.css?ver=3201" type="text/css" media="all" />
<script type="text/javascript"> <script type="text/javascript">
if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') ) if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') )
document.write('<link rel="stylesheet" href="css/editimage-rtl.css?ver=311b" type="text/css" media="all" />'); document.write('<link rel="stylesheet" href="css/editimage-rtl.css?ver=3201" type="text/css" media="all" />');
</script> </script>
<base target="_self" /> <base target="_self" />
</head> </head>

View File

@ -2,9 +2,9 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>{#advanced_dlg.about_title}</title> <title>{#advanced_dlg.about_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/mctabs.js?ver=311b"></script> <script type="text/javascript" src="../../utils/mctabs.js?ver=3201"></script>
<script type="text/javascript" src="js/about.js?ver=311b"></script> <script type="text/javascript" src="js/about.js?ver=3201"></script>
</head> </head>
<body id="about" style="display: none"> <body id="about" style="display: none">
<div class="tabs"> <div class="tabs">

View File

@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>{#advanced_dlg.anchor_title}</title> <title>{#advanced_dlg.anchor_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3201"></script>
<script type="text/javascript" src="js/anchor.js?ver=311b"></script> <script type="text/javascript" src="js/anchor.js?ver=3201"></script>
<base target="_self" /> <base target="_self" />
</head> </head>
<body style="display: none"> <body style="display: none">

View File

@ -3,8 +3,8 @@
<head> <head>
<title>{#advanced_dlg.charmap_title}</title> <title>{#advanced_dlg.charmap_title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3201"></script>
<script type="text/javascript" src="js/charmap.js?ver=311b"></script> <script type="text/javascript" src="js/charmap.js?ver=3201"></script>
<base target="_self" /> <base target="_self" />
</head> </head>
<body id="charmap" style="display:none"> <body id="charmap" style="display:none">

View File

@ -2,9 +2,9 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>{#advanced_dlg.colorpicker_title}</title> <title>{#advanced_dlg.colorpicker_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/mctabs.js?ver=311b"></script> <script type="text/javascript" src="../../utils/mctabs.js?ver=3201"></script>
<script type="text/javascript" src="js/color_picker.js?ver=311b"></script> <script type="text/javascript" src="js/color_picker.js?ver=3201"></script>
<base target="_self" /> <base target="_self" />
</head> </head>
<body id="colorpicker" style="display: none"> <body id="colorpicker" style="display: none">

File diff suppressed because one or more lines are too long

View File

@ -2,10 +2,10 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>{#advanced_dlg.image_title}</title> <title>{#advanced_dlg.image_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/mctabs.js?ver=311b"></script> <script type="text/javascript" src="../../utils/mctabs.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/form_utils.js?ver=311b"></script> <script type="text/javascript" src="../../utils/form_utils.js?ver=3201"></script>
<script type="text/javascript" src="js/image.js?ver=311b"></script> <script type="text/javascript" src="js/image.js?ver=3201"></script>
<base target="_self" /> <base target="_self" />
</head> </head>
<body id="image" style="display: none"> <body id="image" style="display: none">

View File

@ -7,7 +7,7 @@ function init() {
ed = tinyMCEPopup.editor; ed = tinyMCEPopup.editor;
// Give FF some time // Give FF some time
window.setTimeout('insertHelpIFrame();', 10); window.setTimeout(insertHelpIFrame, 10);
tcont = document.getElementById('plugintablecontainer'); tcont = document.getElementById('plugintablecontainer');
document.getElementById('plugins_tab').style.display = 'none'; document.getElementById('plugins_tab').style.display = 'none';

View File

@ -2,11 +2,11 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>{#advanced_dlg.link_title}</title> <title>{#advanced_dlg.link_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/mctabs.js?ver=311b"></script> <script type="text/javascript" src="../../utils/mctabs.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/form_utils.js?ver=311b"></script> <script type="text/javascript" src="../../utils/form_utils.js?ver=3201"></script>
<script type="text/javascript" src="../../utils/validate.js?ver=311b"></script> <script type="text/javascript" src="../../utils/validate.js?ver=3201"></script>
<script type="text/javascript" src="js/link.js?ver=311b"></script> <script type="text/javascript" src="js/link.js?ver=3201"></script>
<base target="_self" /> <base target="_self" />
</head> </head>
<body id="link" style="display: none"> <body id="link" style="display: none">

View File

@ -2,8 +2,8 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>{#advanced_dlg.code_title}</title> <title>{#advanced_dlg.code_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js?ver=311b"></script> <script type="text/javascript" src="../../tiny_mce_popup.js?ver=3201"></script>
<script type="text/javascript" src="js/source_editor.js?ver=311b"></script> <script type="text/javascript" src="js/source_editor.js?ver=3201"></script>
<base target="_self" /> <base target="_self" />
</head> </head>
<body onresize="resizeInputs();" style="display:none; overflow:hidden;"> <body onresize="resizeInputs();" style="display:none; overflow:hidden;">

File diff suppressed because one or more lines are too long

View File

@ -214,7 +214,7 @@ if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
// Setup cache info // Setup cache info
if ( $disk_cache ) { if ( $disk_cache ) {
$cacheKey = apply_filters('tiny_mce_version', '20080830'); $cacheKey = apply_filters('tiny_mce_version', '20080930');
foreach ( $initArray as $v ) foreach ( $initArray as $v )
$cacheKey .= $v; $cacheKey .= $v;
@ -260,7 +260,7 @@ foreach ( $initArray as $k => $v )
$mce_options = rtrim( trim($mce_options), '\n\r,' ); $mce_options = rtrim( trim($mce_options), '\n\r,' );
// Pre-init settings // Pre-init settings
$content = 'var tinyMCEPreInit = { base : "'. $baseurl .'", suffix : "", query : "ver=311b", mceInit : {' . $mce_options . '}};' . "\n"; $content = 'var tinyMCEPreInit = { base : "'. $baseurl .'", suffix : "", query : "ver=3201", mceInit : {' . $mce_options . '}};' . "\n";
// Load patch // Load patch
$content .= getFileContents( 'tiny_mce_ext.js' ); $content .= getFileContents( 'tiny_mce_ext.js' );

View File

@ -25,7 +25,10 @@ tinyMCEPopup = {
// Setup local DOM // Setup local DOM
t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document); t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document);
t.dom.loadCSS(t.features.popup_css || t.editor.settings.popup_css);
// Enables you to skip loading the default css
if (t.features.popup_css !== false)
t.dom.loadCSS(t.features.popup_css || t.editor.settings.popup_css);
// Setup on init listeners // Setup on init listeners
t.listeners = []; t.listeners = [];
@ -169,18 +172,25 @@ tinyMCEPopup = {
},*/ },*/
_onDOMLoaded : function() { _onDOMLoaded : function() {
var t = this, ti = document.title, bm, h; var t = this, ti = document.title, bm, h, nv;
// Translate page // Translate page
h = document.body.innerHTML; if (t.features.translate_i18n !== false) {
h = document.body.innerHTML;
// Replace a=x with a="x" in IE // Replace a=x with a="x" in IE
if (tinymce.isIE) if (tinymce.isIE)
h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"') h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"')
document.dir = t.editor.getParam('directionality','');
if ((nv = t.editor.translate(h)) && nv != h)
document.body.innerHTML = nv;
if ((nv = t.editor.translate(ti)) && nv != ti)
document.title = ti = nv;
}
document.dir = t.editor.getParam('directionality','');
document.body.innerHTML = t.editor.translate(h);
document.title = ti = t.editor.translate(ti);
document.body.style.display = ''; document.body.style.display = '';
// Restore selection in IE when focus is placed on a non textarea or input element of the type text // Restore selection in IE when focus is placed on a non textarea or input element of the type text

View File

@ -62,15 +62,13 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'colorpicker', '/wp-includes/js/colorpicker.js', array('prototype'), '3517' ); $scripts->add( 'colorpicker', '/wp-includes/js/colorpicker.js', array('prototype'), '3517' );
// Let a plugin replace the visual editor
$visual_editor = apply_filters('visual_editor', array('tiny_mce'));
$scripts->add( 'editor', false, $visual_editor, '20080321' );
$scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080928' );
// Modify this version when tinyMCE plugins are changed. // Modify this version when tinyMCE plugins are changed.
$mce_version = apply_filters('tiny_mce_version', '20080830'); function mce_version() {
$scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version ); return '20080930';
}
add_filter( 'tiny_mce_version', 'mce_version' );
$scripts->add( 'editor', '/wp-admin/js/editor.js', false, mce_version() );
$scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6'); $scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');