Filter
rpress_is_email_banned
On this page
Filters whether an email address is considered banned.
Runs at the end of rpress_is_email_banned() after the address has been compared with every entry from rpress_get_banned_emails(). The email is trimmed and lowercased before it is passed. Return false to allow an address that would otherwise be blocked, or true to block it.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$return | bool | True if the address matched a banned entry. |
$email | string | The lowercased, trimmed email address that was checked. |
Return value#
bool. True to treat the address as banned.
Example#
function my_is_email_banned( $return, $email ) {
if ( 'owner@example.com' === $email ) {
return false;
}
return $return;
}
add_filter( 'rpress_is_email_banned', 'my_is_email_banned', 10, 2 );
Notes#
Not reached when the email is empty or the banned list is empty; the function returns false earlier in those cases.
Source#
Applied in:
includes/checkout/functions.php(line 268), inrpress_is_email_banned()
See also#
Was this page helpful?
