From 8aacd10a8cd4d8bcf89f6cfd1006ed1014351318 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 11 Apr 2014 22:16:01 +0000 Subject: [PATCH] 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 --- Gruntfile.js | 1 + src/wp-includes/class-wp-editor.php | 4 +++- src/wp-includes/js/tinymce/wp-tinymce.php | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index b25b8dba7a..c877f9fda1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -56,6 +56,7 @@ module.exports = function(grunt) { '!wp-includes/js/backbone.js', '!wp-includes/js/underscore.js', '!wp-includes/js/jquery/jquery.masonry.js', + '!wp-includes/js/tinymce/tinymce.js', '!wp-includes/version.php' // Exclude version.php ], dest: BUILD_DIR diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php index e4bf5a0890..572ac31182 100644 --- a/src/wp-includes/class-wp-editor.php +++ b/src/wp-includes/class-wp-editor.php @@ -1080,12 +1080,14 @@ final class _WP_Editors { \n"; } else { - echo "\n"; + echo "\n"; echo "\n"; } diff --git a/src/wp-includes/js/tinymce/wp-tinymce.php b/src/wp-includes/js/tinymce/wp-tinymce.php index 83a003d720..03abd2d9de 100644 --- a/src/wp-includes/js/tinymce/wp-tinymce.php +++ b/src/wp-includes/js/tinymce/wp-tinymce.php @@ -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;