请参见此挂钩:register_post
add_action(\'register_post\', \'ban_email_2334\', 10, 3);
function ban_email_2334( $username, $email, $errors ){
$result = array();
// check if email is from the provider you wish to ban
preg_match(\'/bannedprovider.com/i\', $email, $result);
if( !empty( $result )){
$errors->add(\'spam_email\', __( \'Some choicest abuses you might want to pass on\' ));
}
return;
}
这将引发错误并阻止注册