From 73bb715d0f4c30d0302ff0c4e84bdc7dfe625a8a Mon Sep 17 00:00:00 2001 From: sleepm <1520667045@qq.com> Date: Sat, 1 Feb 2020 19:35:08 +0800 Subject: [PATCH] fix not working --- class-wp-proxy.php | 5 ++--- readme.txt | 8 ++++++-- wp-proxy.php | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/class-wp-proxy.php b/class-wp-proxy.php index 4cda82b..59f39ab 100644 --- a/class-wp-proxy.php +++ b/class-wp-proxy.php @@ -36,7 +36,7 @@ public function __construct() { if ( $options ) { $this->options = $options; if ( $options['enable'] ) { - add_filter( 'pre_http_request', array( $this, 'pre_http_request' ), 10, 3 ); + add_filter( 'pre_http_request', array( $this, 'pre_http_request' ), 100, 2 ); add_filter( 'pre_http_send_through_proxy', array( $this, 'send_through_proxy' ), 10, 4 ); defined( 'WP_PROXY_HOST' ) ? '' : define( 'WP_PROXY_HOST', $options['proxy_host'] ); defined( 'WP_PROXY_PORT' ) ? '' : define( 'WP_PROXY_PORT', $options['proxy_port'] ); @@ -236,11 +236,10 @@ public function admin_bar_menu( $wp_admin_bar ) { /** * Set request arg * - * @param bool $false is pre. * @param array $parsed_args args. * @param string $url url. */ - public function pre_http_request( $false, $parsed_args, $url ) { + public function pre_http_request( $parsed_args, $url ) { if ( $this->send_through_proxy( null, $url, $url, '' ) ) { $parsed_args['timeout'] = $parsed_args['timeout'] + 1200; @set_time_limit( $parsed_args['timeout'] + 60 ); diff --git a/readme.txt b/readme.txt index d0fa456..fe41e5d 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://xn--vkuk.org/blog/wp-proxy Tags: proxy Requires at least: 3.0.1 Tested up to: 5.3.2 -Stable tag: 1.3.5 +Stable tag: 1.3.6 Requires PHP: 5.2.4 License: GPLv2 or later @@ -29,7 +29,11 @@ Always free, we don't provide http proxy, and code is open source, it's very sim No thanks. This is just a simple plugin, I would be very happy if it useful to you. -== Changelog == +== Changelog == + += 1.3.6 = +fix pre_http_request filter. thanks lcufrankw + = 1.3.4 = * use some default text-domain * admin bar menu diff --git a/wp-proxy.php b/wp-proxy.php index 3d43085..09dde56 100644 --- a/wp-proxy.php +++ b/wp-proxy.php @@ -3,7 +3,7 @@ * Plugin Name: WP Proxy * Plugin URI: https://xn--vkuk.org/blog/wp-proxy * Description: manage proxy for WordPress - * Version: 1.3.5 + * Version: 1.3.6 * Author: sleepm * Author URI: https://xn--vkuk.org/blog/ * Text Domain: wp-proxy