WordPress at Your Fingertips
function is not described

WP_HTTP_Proxy::use_authentication() public WP 2.8.0

Whether authentication should be used.

Constants which control this behaviour:

  • WP_PROXY_USERNAME
  • WP_PROXY_PASSWORD

{} It's a method of the class: WP_HTTP_Proxy{}

No Hooks.

Return

true|false.

Usage

$WP_HTTP_Proxy = new WP_HTTP_Proxy();
$WP_HTTP_Proxy->use_authentication();

Changelog

Since 2.8.0 Introduced.

Code of WP_HTTP_Proxy::use_authentication() WP 5.9

public function use_authentication() {
	return defined( 'WP_PROXY_USERNAME' ) && defined( 'WP_PROXY_PASSWORD' );
}