mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Return true from wp_redirect() when redirect successful. Update phpdoc.
Props tivnet fixes #24969 git-svn-id: http://core.svn.wordpress.org/trunk@24996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
acc0aec2b0
commit
26eb1dc6ee
@ -856,7 +856,7 @@ if ( !function_exists('wp_redirect') ) :
|
||||
*
|
||||
* @param string $location The path to redirect to
|
||||
* @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) {
|
||||
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
|
||||
|
||||
header("Location: $location", true, $status);
|
||||
|
||||
return true;
|
||||
}
|
||||
endif;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user