Don't include the non-minified tinymce.js in /build. Load it when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG). Props nacin, fixes #27739
Built from https://develop.svn.wordpress.org/trunk@28081 git-svn-id: http://core.svn.wordpress.org/trunk@27912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3ddc52b236
commit
68cbde29ca
|
@ -1080,12 +1080,14 @@ final class _WP_Editors {
|
|||
<?php
|
||||
|
||||
$baseurl = self::$baseurl;
|
||||
// Load tinymce.js when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG)
|
||||
$mce_suffix = false !== strpos( $GLOBALS['wp_version'], '-src' ) ? '' : '.min';
|
||||
|
||||
if ( $tmce_on ) {
|
||||
if ( $compressed ) {
|
||||
echo "<script type='text/javascript' src='{$baseurl}/wp-tinymce.php?c=1&$version'></script>\n";
|
||||
} else {
|
||||
echo "<script type='text/javascript' src='{$baseurl}/tinymce.js?$version'></script>\n";
|
||||
echo "<script type='text/javascript' src='{$baseurl}/tinymce{$mce_suffix}.js?$version'></script>\n";
|
||||
echo "<script type='text/javascript' src='{$baseurl}/plugins/compat3x/plugin{$suffix}.js?$version'></script>\n";
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -32,7 +32,8 @@ if ( isset($_GET['c']) && 1 == $_GET['c'] && isset($_SERVER['HTTP_ACCEPT_ENCODIN
|
|||
header('Content-Encoding: gzip');
|
||||
echo $file;
|
||||
} else {
|
||||
echo get_file($basepath . '/tiny_mce.js');
|
||||
echo get_file($basepath . '/wp-tinymce-schema.js');
|
||||
// Back compat. This file shouldn't be used if this condition can occur (as in, if gzip isn't accepted).
|
||||
echo get_file( $basepath . '/tinymce.min.js' );
|
||||
echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
|
||||
}
|
||||
exit;
|
||||
|
|
Loading…
Reference in New Issue