WordPress at a glance
function is not described

Requests_IRI::set_port() protected WP 1.0

Set the port. Returns true on success, false on failure (if there are any invalid characters).

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

No Hooks.




// protected - for code of main (parent) or child class
$result = $this->set_port( $port );
$port(string) (required)

Code of Requests_IRI::set_port() WP 5.7.2

protected function set_port($port) {
	if ($port === null) {
		$this->port = null;
		return true;

	if (strspn($port, '0123456789') === strlen($port)) {
		$this->port = (int) $port;
		return true;

	$this->port = null;
	return false;