mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 12:14:25 +00:00
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:
12
src/js/_enqueues/vendor/tinymce/wp-tinymce.php
vendored
12
src/js/_enqueues/vendor/tinymce/wp-tinymce.php
vendored
@@ -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' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user