[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Not used in core since 5.1. 4 * This is a back-compat for plugins that may be using this method of loading directly. 5 */ 6 7 /** 8 * Disable error reporting 9 * 10 * Set this to error_reporting( -1 ) for debugging. 11 */ 12 error_reporting( 0 ); 13 14 $basepath = __DIR__; 15 16 function get_file( $path ) { 17 18 if ( function_exists( 'realpath' ) ) { 19 $path = realpath( $path ); 20 } 21 22 if ( ! $path || ! @is_file( $path ) ) { 23 return false; 24 } 25 26 return @file_get_contents( $path ); 27 } 28 29 $expires_offset = 31536000; // 1 year. 30 31 header( 'Content-Type: application/javascript; charset=UTF-8' ); 32 header( 'Vary: Accept-Encoding' ); // Handle proxies. 33 header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' ); 34 header( "Cache-Control: public, max-age=$expires_offset" ); 35 36 $file = get_file( $basepath . '/wp-tinymce.js' ); 37 if ( isset( $_GET['c'] ) && $file ) { 38 echo $file; 39 } else { 40 // Even further back compat. 41 echo get_file( $basepath . '/tinymce.min.js' ); 42 echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' ); 43 } 44 exit;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Sat Dec 21 08:20:01 2024 | Cross-referenced by PHPXref |