Created
January 15, 2016 14:08
-
-
Save remcotolsma/da2879f6d3f9860a44bc to your computer and use it in GitHub Desktop.
Solve WordPress redirect issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( filter_has_var( INPUT_GET, 'debug' ) ) { | |
function debug_wp_redirect( $location, $status ) { | |
debug_print_backtrace(); | |
return $location; | |
} | |
add_filter( 'wp_redirect', 'debug_wp_redirect', 1000, 2 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment