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
git-svn-id: https://develop.svn.wordpress.org/trunk@28081 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
33e687ca57
commit
8aacd10a8c
@ -56,6 +56,7 @@ module.exports = function(grunt) {
|
|||||||
'!wp-includes/js/backbone.js',
|
'!wp-includes/js/backbone.js',
|
||||||
'!wp-includes/js/underscore.js',
|
'!wp-includes/js/underscore.js',
|
||||||
'!wp-includes/js/jquery/jquery.masonry.js',
|
'!wp-includes/js/jquery/jquery.masonry.js',
|
||||||
|
'!wp-includes/js/tinymce/tinymce.js',
|
||||||
'!wp-includes/version.php' // Exclude version.php
|
'!wp-includes/version.php' // Exclude version.php
|
||||||
],
|
],
|
||||||
dest: BUILD_DIR
|
dest: BUILD_DIR
|
||||||
|
@ -1080,12 +1080,14 @@ final class _WP_Editors {
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$baseurl = self::$baseurl;
|
$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 ( $tmce_on ) {
|
||||||
if ( $compressed ) {
|
if ( $compressed ) {
|
||||||
echo "<script type='text/javascript' src='{$baseurl}/wp-tinymce.php?c=1&$version'></script>\n";
|
echo "<script type='text/javascript' src='{$baseurl}/wp-tinymce.php?c=1&$version'></script>\n";
|
||||||
} else {
|
} 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";
|
echo "<script type='text/javascript' src='{$baseurl}/plugins/compat3x/plugin{$suffix}.js?$version'></script>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,8 @@ if ( isset($_GET['c']) && 1 == $_GET['c'] && isset($_SERVER['HTTP_ACCEPT_ENCODIN
|
|||||||
header('Content-Encoding: gzip');
|
header('Content-Encoding: gzip');
|
||||||
echo $file;
|
echo $file;
|
||||||
} else {
|
} else {
|
||||||
echo get_file($basepath . '/tiny_mce.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 . '/wp-tinymce-schema.js');
|
echo get_file( $basepath . '/tinymce.min.js' );
|
||||||
|
echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user