Merge pull request #33 from webdados/patch-1

Stop killing other plugins remote requests - Remove http_request_time_out filter and callback
This commit is contained in:
proelements
2025-12-29 10:03:48 +02:00
committed by GitHub

View File

@@ -53,9 +53,6 @@ class Updater {
add_filter( 'plugins_api', array( $this, 'get_plugin_info' ), 10, 3 ); add_filter( 'plugins_api', array( $this, 'get_plugin_info' ), 10, 3 );
add_filter( 'upgrader_post_install', array( $this, 'upgrader_post_install' ), 10, 3 ); add_filter( 'upgrader_post_install', array( $this, 'upgrader_post_install' ), 10, 3 );
// set timeout
add_filter( 'http_request_timeout', array( $this, 'http_request_timeout' ) );
// set sslverify for zip download // set sslverify for zip download
add_filter( 'http_request_args', array( $this, 'http_request_sslverify' ), 10, 2 ); add_filter( 'http_request_args', array( $this, 'http_request_sslverify' ), 10, 2 );
} }
@@ -120,17 +117,6 @@ class Updater {
} }
/**
* Callback fn for the http_request_timeout filter
*
* @since 1.0
* @return int timeout value
*/
public function http_request_timeout() {
return 2;
}
/** /**
* Callback fn for the http_request_args filter * Callback fn for the http_request_args filter
* *
@@ -215,7 +201,8 @@ class Updater {
$query = add_query_arg( array( 'access_token' => $this->config['access_token'] ), $query ); $query = add_query_arg( array( 'access_token' => $this->config['access_token'] ), $query );
$raw_response = wp_remote_get( $query, array( $raw_response = wp_remote_get( $query, array(
'sslverify' => $this->config['sslverify'] 'sslverify' => $this->config['sslverify'],
'timeout' => 2,
) ); ) );
return $raw_response; return $raw_response;
@@ -400,4 +387,4 @@ class Updater {
return $result; return $result;
} }
} }