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.


Description

Constants which control this behaviour:

  • WP_PROXY_USERNAME
  • WP_PROXY_PASSWORD

Top ↑

Return

(bool)


Top ↑

Source

File: wp-includes/class-wp-http-proxy.php

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

Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.