WP_HTTP_Proxy::use_authentication() WordPress Method
The WP_HTTP_Proxy::use_authentication() method is used to check whether authentication should be used when making HTTP requests through a proxy server. This can be useful if you need to connect to a proxy server that requires authentication.
WP_HTTP_Proxy::use_authentication() #
Whether authentication should be used.
Contents
Description
Constants which control this behaviour:
WP_PROXY_USERNAME
WP_PROXY_PASSWORD
Return
(bool)
Source
File: wp-includes/class-wp-http-proxy.php
public function use_authentication() { return defined( 'WP_PROXY_USERNAME' ) && defined( 'WP_PROXY_PASSWORD' ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |