Created
January 11, 2021 02:18
-
-
Save mitchelldmiller/8a906fc03e5a548e9cf5d0c7bc0854b7 to your computer and use it in GitHub Desktop.
Check for a banned domain from a standalone page.
This file contains 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 | |
/** | |
* Example of checking for a banned domain from a standalone page. | |
* Requires Quick Mail plugin version 4.0.5 or greater. | |
*/ | |
require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-load.php'); | |
$domain = empty($_GET['domain']) ? 'example.com' : $_GET['domain']; | |
$desc = empty(QuickMailUtil::acceptable_domain($domain)) ? 'BANNED' : 'OK'; | |
wp_die("{$domain} = {$desc}", $domain); | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment