Created
March 4, 2015 15:50
-
-
Save gicolek/1e08dc4896d63a8b0d2f to your computer and use it in GitHub Desktop.
Whitelist redirect allowed hosts - http://wp-doin.com
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 | |
add_filter( 'allowed_redirect_hosts', 'wp_doin_allowed_redirect_hosts', 10 ); | |
/** | |
* Make sure that external host is allowed | |
* @hook allowed_redirect_hosts | |
*/ | |
function wp_doin_allowed_redirect_hosts($content) { | |
$content[] = 'http://example.com'; | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment