Skip to content

Commit

Permalink
fix not working
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepm committed Feb 1, 2020
1 parent 7416631 commit 73bb715
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 2 additions & 3 deletions class-wp-proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] );
Expand Down Expand Up @@ -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 );
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion wp-proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73bb715

Please sign in to comment.