Pristine upstream, unpacked from the official wordpress.org tarball. https://wordpress.org/wordpress-7.1.1.tar.gz sha1 2a9d68474e8703aa3a66f80427b325e0941b6a1e (published by wordpress.org) sha256 3996fee13448ef12e07e9f0c77db2f655ffa1b7cde71c80a4965d3bf1fb956b3 This branch carries nothing but upstream releases, one commit each, and is never edited. It is the other side of the git-subtree merge that brings security releases into SiriusPress/wordpress/ — see SiriusPress/docs/upstream-merges.md.
44 lines
1 KiB
PHP
44 lines
1 KiB
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
|
|
*
|
|
* Set this to error_reporting( -1 ) for debugging.
|
|
*/
|
|
error_reporting( 0 );
|
|
|
|
$basepath = __DIR__;
|
|
|
|
function get_file( $path ) {
|
|
|
|
if ( function_exists( 'realpath' ) ) {
|
|
$path = realpath( $path );
|
|
}
|
|
|
|
if ( ! $path || ! @is_file( $path ) ) {
|
|
return false;
|
|
}
|
|
|
|
return @file_get_contents( $path );
|
|
}
|
|
|
|
$expires_offset = 31536000; // 1 year.
|
|
|
|
header( 'Content-Type: application/javascript; charset=UTF-8' );
|
|
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" );
|
|
|
|
$file = get_file( $basepath . '/wp-tinymce.js' );
|
|
if ( isset( $_GET['c'] ) && $file ) {
|
|
echo $file;
|
|
} else {
|
|
// Even further back compat.
|
|
echo get_file( $basepath . '/tinymce.min.js' );
|
|
echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
|
|
}
|
|
exit;
|