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:
Ryan Boren 2013-08-06 17:44:32 +00:00
parent acc0aec2b0
commit 26eb1dc6ee

View File

@ -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;