TinyMCE: retire wp-tinymce.php and remove pre-compression of wp-tinymce.js.

Fixes #45645.

git-svn-id: https://develop.svn.wordpress.org/trunk@44651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2019-01-18 19:50:19 +00:00
parent 131142486b
commit 21e479d3a8
5 changed files with 27 additions and 227 deletions

View File

@@ -1,4 +1,9 @@
<?php
/**
* Not used in core since 5.1.
* This is a back-compat for plugins that may be using this method of loading directly.
*/
/**
* Disable error reporting
*
@@ -28,13 +33,10 @@ header( 'Vary: Accept-Encoding' ); // Handle proxies
header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
header( "Cache-Control: public, max-age=$expires_offset" );
if ( isset( $_GET['c'] ) && 1 == $_GET['c'] && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] )
&& false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ( $file = get_file( $basepath . '/wp-tinymce.js.gz' ) ) ) {
header( 'Content-Encoding: gzip' );
if ( isset( $_GET['c'] ) && ( $file = get_file( $basepath . '/wp-tinymce.js' ) ) ) {
echo $file;
} else {
// Back compat. This file shouldn't be used if this condition can occur (as in, if gzip isn't accepted).
// Even further back compat.
echo get_file( $basepath . '/tinymce.min.js' );
echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
}