W3cubDocs

/WordPress

Http::register( WpOrgRequestsHooks $hooks )

Register the necessary callbacks

Description

See also

Parameters

$hooksWpOrgRequestsHooksrequired
Hook system

Source

public function register(Hooks $hooks) {
	$hooks->register('curl.before_send', [$this, 'curl_before_send']);

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

Changelog

Version Description
1.6 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wporg-requests-proxy-http/register