Requests_Response::is_redirect

Advertisement

Summery Summery

Is the response a redirect?

Syntax Syntax

Requests_Response::is_redirect()

Return Return

(boolean) True if redirect (3xx status), false if not.

Source Source

File: wp-includes/Requests/Response.php

	public function is_redirect() {
		$code = $this->status_code;
		return in_array($code, array(300, 301, 302, 303, 307)) || $code > 307 && $code < 400;
	}

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.