Core Function
View Source on Trac ↗ wp_redirect()
wp_redirect( mixed $location, mixed $status = 302, mixed $x_redirect_by = 'WordPress' ) Redirects to another page.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $location string | The path or URL to redirect to. Required |
| $status int | Optional. HTTP response status code to use. Default '302' (Moved Temporarily). |
| (string | | false) $x_redirect_by Optional. The application doing the redirect or false to omit. Default 'WordPress'. Required |
Return Value
(bool)
False if the redirect was canceled, true otherwise.
Function Information
Since Version
1.5.1
Source File
wp-includes/pluggable.php
Advertisement