WpOrg\Requests
Response::is_redirect()
Is the response a redirect?
Method of the class: Response{}
No Hooks.
Return
true|false
. True if redirect (3xx status), false if not.
Usage
$Response = new Response(); $Response->is_redirect();
Response::is_redirect() Response::is redirect code WP 6.6.2
public function is_redirect() { $code = $this->status_code; return in_array($code, [300, 301, 302, 303, 307], true) || $code > 307 && $code < 400; }