Make WordPress Core


Ignore:
Timestamp:
10/18/2006 10:02:30 PM (18 years ago)
Author:
markjaquith
Message:

Add wp_redirect filter, with cancel ability. fixes #3250

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r4382 r4407  
    256256function wp_redirect($location, $status = 302) {
    257257    global $is_IIS;
     258
     259    $location = apply_filters('wp_redirect', $location, $status);
     260
     261    if ( !$location ) // allows the wp_redirect filter to cancel a redirect
     262        return false;
    258263
    259264    $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location);
Note: See TracChangeset for help on using the changeset viewer.