mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory. * New task runner (Grunt), configured to copy a built WordPress to build/. * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js. * Remove Akismet external from develop.svn. Still exists in core.svn. * Drop minified files from src/. The build process will now generate these. props koop. see #24976. and see http://wp.me/p2AvED-1AI. git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
38
src/wp-includes/js/tinymce/wp-tinymce.php
Normal file
38
src/wp-includes/js/tinymce/wp-tinymce.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* Disable error reporting
|
||||
*
|
||||
* Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
|
||||
*/
|
||||
error_reporting(0);
|
||||
|
||||
$basepath = dirname(__FILE__);
|
||||
|
||||
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/x-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");
|
||||
|
||||
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');
|
||||
echo $file;
|
||||
} else {
|
||||
echo get_file($basepath . '/tiny_mce.js');
|
||||
echo get_file($basepath . '/wp-tinymce-schema.js');
|
||||
}
|
||||
exit;
|
||||
Reference in New Issue
Block a user