TinyMCE: retire wp-tinymce.php and remove pre-compression of wp-tinymce.js.
Fixes #45645. Built from https://develop.svn.wordpress.org/trunk@44651 git-svn-id: http://core.svn.wordpress.org/trunk@44482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f8d655fe37
commit
b7897c5761
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1,4 +1,9 @@
|
||||||
<?php
|
<?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
|
* 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( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
|
||||||
header( "Cache-Control: public, max-age=$expires_offset" );
|
header( "Cache-Control: public, max-age=$expires_offset" );
|
||||||
|
|
||||||
if ( isset( $_GET['c'] ) && 1 == $_GET['c'] && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] )
|
if ( isset( $_GET['c'] ) && ( $file = get_file( $basepath . '/wp-tinymce.js' ) ) ) {
|
||||||
&& false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ( $file = get_file( $basepath . '/wp-tinymce.js.gz' ) ) ) {
|
|
||||||
|
|
||||||
header( 'Content-Encoding: gzip' );
|
|
||||||
echo $file;
|
echo $file;
|
||||||
} else {
|
} 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 . '/tinymce.min.js' );
|
||||||
echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
|
echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ function wp_register_tinymce_scripts( &$scripts, $force_uncompressed = false ) {
|
||||||
// Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production) or
|
// Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production) or
|
||||||
// tinymce.min.js (when SCRIPT_DEBUG is true).
|
// tinymce.min.js (when SCRIPT_DEBUG is true).
|
||||||
if ( $compressed ) {
|
if ( $compressed ) {
|
||||||
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.php', array(), $tinymce_version );
|
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.js', array(), $tinymce_version );
|
||||||
} else {
|
} else {
|
||||||
$scripts->add( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce$dev_suffix.js", array(), $tinymce_version );
|
$scripts->add( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce$dev_suffix.js", array(), $tinymce_version );
|
||||||
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin$dev_suffix.js", array( 'wp-tinymce-root' ), $tinymce_version );
|
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin$dev_suffix.js", array( 'wp-tinymce-root' ), $tinymce_version );
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.1-beta1-44650';
|
$wp_version = '5.1-beta1-44651';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue