From ea02c0e4175509f7ba39da96d838fb7c1e03d8e1 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Sat, 15 Mar 2008 20:50:49 +0000 Subject: [PATCH] Allow plugins to filter the redirect status as well as the location. See #4790. git-svn-id: https://develop.svn.wordpress.org/trunk@7319 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/pluggable.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 97e4e4f759..f2a6e647dd 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -673,7 +673,8 @@ 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;