Skip to content

Commit 73bb715

Browse files
committed
fix not working
1 parent 7416631 commit 73bb715

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

class-wp-proxy.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct() {
3636
if ( $options ) {
3737
$this->options = $options;
3838
if ( $options['enable'] ) {
39-
add_filter( 'pre_http_request', array( $this, 'pre_http_request' ), 10, 3 );
39+
add_filter( 'pre_http_request', array( $this, 'pre_http_request' ), 100, 2 );
4040
add_filter( 'pre_http_send_through_proxy', array( $this, 'send_through_proxy' ), 10, 4 );
4141
defined( 'WP_PROXY_HOST' ) ? '' : define( 'WP_PROXY_HOST', $options['proxy_host'] );
4242
defined( 'WP_PROXY_PORT' ) ? '' : define( 'WP_PROXY_PORT', $options['proxy_port'] );
@@ -236,11 +236,10 @@ public function admin_bar_menu( $wp_admin_bar ) {
236236
/**
237237
* Set request arg
238238
*
239-
* @param bool $false is pre.
240239
* @param array $parsed_args args.
241240
* @param string $url url.
242241
*/
243-
public function pre_http_request( $false, $parsed_args, $url ) {
242+
public function pre_http_request( $parsed_args, $url ) {
244243
if ( $this->send_through_proxy( null, $url, $url, '' ) ) {
245244
$parsed_args['timeout'] = $parsed_args['timeout'] + 1200;
246245
@set_time_limit( $parsed_args['timeout'] + 60 );

readme.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://xn--vkuk.org/blog/wp-proxy
44
Tags: proxy
55
Requires at least: 3.0.1
66
Tested up to: 5.3.2
7-
Stable tag: 1.3.5
7+
Stable tag: 1.3.6
88
Requires PHP: 5.2.4
99
License: GPLv2 or later
1010

@@ -29,7 +29,11 @@ Always free, we don't provide http proxy, and code is open source, it's very sim
2929

3030
No thanks. This is just a simple plugin, I would be very happy if it useful to you.
3131

32-
== Changelog ==
32+
== Changelog ==
33+
34+
= 1.3.6 =
35+
fix pre_http_request filter. thanks lcufrankw
36+
3337
= 1.3.4 =
3438
* use some default text-domain
3539
* admin bar menu

wp-proxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: WP Proxy
44
* Plugin URI: https://xn--vkuk.org/blog/wp-proxy
55
* Description: manage proxy for WordPress
6-
* Version: 1.3.5
6+
* Version: 1.3.6
77
* Author: sleepm
88
* Author URI: https://xn--vkuk.org/blog/
99
* Text Domain: wp-proxy

0 commit comments

Comments
 (0)