Add wp_redirect filter, with cancel ability. fixes #3250

git-svn-id: https://develop.svn.wordpress.org/trunk@4407 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2006-10-18 22:02:30 +00:00
parent 60f628e4c0
commit 8d76f3f702
1 changed files with 5 additions and 0 deletions

View File

@ -256,6 +256,11 @@ if ( !function_exists('wp_redirect') ) :
function wp_redirect($location, $status = 302) {
global $is_IIS;
$location = apply_filters('wp_redirect', $location, $status);
if ( !$location ) // allows the wp_redirect filter to cancel a redirect
return false;
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location);
$location = wp_kses_no_null($location);