WP_HTTP_Proxy::is_enabled() WordPress Method
The WP_HTTP_Proxy::is_enabled() method is used to check whether a proxy is enabled for a specific WordPress installation. This is useful for checking if a proxy is configured correctly before making HTTP requests.
WP_HTTP_Proxy::is_enabled() #
Whether proxy connection should be used.
Contents
Description
Constants which control this behaviour:
WP_PROXY_HOST
WP_PROXY_PORT
Return
(bool)
Source
File: wp-includes/class-wp-http-proxy.php
public function is_enabled() { return defined( 'WP_PROXY_HOST' ) && defined( 'WP_PROXY_PORT' ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |