Return true from wp_redirect() when redirect successful. Update phpdoc.
Props tivnet fixes #24969 git-svn-id: https://develop.svn.wordpress.org/trunk@24996 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
11d7fe1eaf
commit
ca59c0127b
@ -856,7 +856,7 @@ if ( !function_exists('wp_redirect') ) :
|
|||||||
*
|
*
|
||||||
* @param string $location The path to redirect to
|
* @param string $location The path to redirect to
|
||||||
* @param int $status Status code to use
|
* @param int $status Status code to use
|
||||||
* @return bool False if $location is not set
|
* @return bool False if $location is not provided, true otherwise.
|
||||||
*/
|
*/
|
||||||
function wp_redirect($location, $status = 302) {
|
function wp_redirect($location, $status = 302) {
|
||||||
global $is_IIS;
|
global $is_IIS;
|
||||||
@ -873,6 +873,8 @@ function wp_redirect($location, $status = 302) {
|
|||||||
status_header($status); // This causes problems on IIS and some FastCGI setups
|
status_header($status); // This causes problems on IIS and some FastCGI setups
|
||||||
|
|
||||||
header("Location: $location", true, $status);
|
header("Location: $location", true, $status);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user