From b871aff7374e09e51d618b2aad7fafaab191da50 Mon Sep 17 00:00:00 2001 From: westi 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: http://svn.automattic.com/wordpress/trunk@7319 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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;