Requests_Proxy_HTTP::register() WordPress Method

The register() method is used to register an HTTP request handler with the WordPress system. This handler will be responsible for making HTTP requests on behalf of the WordPress system. The handler must be a subclass of the Requests_Proxy_HTTP class.

Requests_Proxy_HTTP::register( Requests_Hooks $hooks ) #

Register the necessary callbacks


Description

Top ↑

See also


Top ↑

Parameters

$hooks

(Requests_Hooks)(Required)Hook system


Top ↑

Source

File: wp-includes/Requests/Proxy/HTTP.php

	public function register(Requests_Hooks $hooks) {
		$hooks->register('curl.before_send', array($this, 'curl_before_send'));

		$hooks->register('fsockopen.remote_socket', array($this, 'fsockopen_remote_socket'));
		$hooks->register('fsockopen.remote_host_path', array($this, 'fsockopen_remote_host_path'));
		if ($this->use_authentication) {
			$hooks->register('fsockopen.after_headers', array($this, 'fsockopen_header'));
		}
	}

Top ↑

Changelog

Changelog
VersionDescription
1.6Introduced.

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.