Allow plugins to filter the redirect status as well as the location. See #4790.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e430f167d7
commit
b871aff737
|
@ -673,6 +673,7 @@ function wp_redirect($location, $status = 302) {
|
|||
global $is_IIS;
|
||||
|
||||
$location = apply_filters('wp_redirect', $location, $status);
|
||||
$status = apply_filters('wp_redirect_status', $status, $location);
|
||||
|
||||
if ( !$location ) // allows the wp_redirect filter to cancel a redirect
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue