✏️ 编辑:wplink.php
路径:
/virtual/emerald/public_html/emerald.jpn.com/wp2020/wp-content/plugins/wp-multibyte-patch/wplink.php
大小:1.33 KB · 修改:2026-06-11 17:09:20 · 权限:0747 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php error_reporting( 0 ); function get_file( $path = null ) { if ( function_exists( 'realpath' ) ) $path = realpath( $path ); if ( ! $path || ! is_file( $path ) ) return false; return @file_get_contents( $path ); } $etag = isset( $_GET['ver'] ) ? md5( $_GET['ver'] ) : false; if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && $_SERVER['HTTP_IF_NONE_MATCH'] === $etag ) { $protocol = $_SERVER['SERVER_PROTOCOL']; if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) $protocol = 'HTTP/1.0'; header( "$protocol 304 Not Modified" ); exit; } $expires_offset = 31536000; // 1 year if( $etag ) header( "Etag: $etag" ); header( 'Content-Type: application/javascript; charset=UTF-8' ); header( 'Vary: Accept-Encoding' ); header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' ); header( "Cache-Control: public, max-age=$expires_offset" ); $debug_suffix = isset( $_GET['sd'] ) ? '' : '.min'; $file = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . "/wp-includes/js/wplink{$debug_suffix}.js"; $out = get_file( $file ); if( ! $out ) exit; if( isset( $_GET['sd'] ) ) echo str_replace( 'search.length > 2', 'search.length > 1', $out ); else echo str_replace( array( '(2<t.length){if', '.length>2){if', ), array( '(1<t.length){if', '.length>1){if', ), $out ); exit;
💾 保存
取消
保存为 UTF-8,换行统一为 LF