Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- $location = wp_sanitize_redirect($location);
- if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
- status_header($status); // This causes problems on IIS and some FastCGI setups
- header("Location: $location", true, $status);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement