Skip to content

Commit 37d1d03

Browse files
Merge pull request #131 from matt-h/fix-wp_redirect
wp_redirect should return true on success The core WP function does this and it should for compatibility. https://developer.wordpress.org/reference/functions/wp_redirect/ Uncovered in this issue with Redirection johngodley/redirection#157
2 parents 1bd6cf2 + ee39e65 commit 37d1d03

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nginx-helper.php

+2
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ function wp_redirect( $location, $status = 302 )
374374
$location = wp_sanitize_redirect( $location );
375375
}
376376
header( 'Location: ' . $location, true, $status );
377+
378+
return true;
377379
}
378380

379381
}

0 commit comments

Comments
 (0)