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:
westi 2008-03-15 20:50:49 +00:00
parent e430f167d7
commit b871aff737
1 changed files with 2 additions and 1 deletions

View File

@ -673,6 +673,7 @@ function wp_redirect($location, $status = 302) {
global $is_IIS; global $is_IIS;
$location = apply_filters('wp_redirect', $location, $status); $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 if ( !$location ) // allows the wp_redirect filter to cancel a redirect
return false; return false;