Edit File by line
/home/barbar84/public_h.../wp-inclu.../js/tinymce
File: wp-tinymce.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Not used in core since 5.1.
[2] Fix | Delete
* This is a back-compat for plugins that may be using this method of loading directly.
[3] Fix | Delete
*/
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Disable error reporting
[7] Fix | Delete
*
[8] Fix | Delete
* Set this to error_reporting( -1 ) for debugging.
[9] Fix | Delete
*/
[10] Fix | Delete
error_reporting( 0 );
[11] Fix | Delete
[12] Fix | Delete
$basepath = __DIR__;
[13] Fix | Delete
[14] Fix | Delete
function get_file( $path ) {
[15] Fix | Delete
[16] Fix | Delete
if ( function_exists( 'realpath' ) ) {
[17] Fix | Delete
$path = realpath( $path );
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
if ( ! $path || ! @is_file( $path ) ) {
[21] Fix | Delete
return false;
[22] Fix | Delete
}
[23] Fix | Delete
[24] Fix | Delete
return @file_get_contents( $path );
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
$expires_offset = 31536000; // 1 year.
[28] Fix | Delete
[29] Fix | Delete
header( 'Content-Type: application/javascript; charset=UTF-8' );
[30] Fix | Delete
header( 'Vary: Accept-Encoding' ); // Handle proxies.
[31] Fix | Delete
header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
[32] Fix | Delete
header( "Cache-Control: public, max-age=$expires_offset" );
[33] Fix | Delete
[34] Fix | Delete
$file = get_file( $basepath . '/wp-tinymce.js' );
[35] Fix | Delete
if ( isset( $_GET['c'] ) && $file ) {
[36] Fix | Delete
echo $file;
[37] Fix | Delete
} else {
[38] Fix | Delete
// Even further back compat.
[39] Fix | Delete
echo get_file( $basepath . '/tinymce.min.js' );
[40] Fix | Delete
echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
[41] Fix | Delete
}
[42] Fix | Delete
exit;
[43] Fix | Delete
[44] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function