Skip to content

Instantly share code, notes, and snippets.

@gicolek
Created March 4, 2015 15:50
Show Gist options
  • Save gicolek/1e08dc4896d63a8b0d2f to your computer and use it in GitHub Desktop.
Save gicolek/1e08dc4896d63a8b0d2f to your computer and use it in GitHub Desktop.
Whitelist redirect allowed hosts - http://wp-doin.com
<?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