Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Benutzerdefinierte WordPress-Filter für das Antispam Bee Plugin. Spam-Markierung anhand von Regulären Ausdrücken.
<?php
/*
Antispam Bee filter for custom RegExp patterns
Customize and paste it into functions.php
*/
add_action(
'init',
'antispam_bee_patterns'
);
function antispam_bee_patterns() {
add_filter(
'antispam_bee_patterns',
'antispam_bee_add_custom_patterns'
);
}
function antispam_bee_add_custom_patterns($patterns) {
/* Pattern for evil email address */
$patterns[] = array(
'email' => '@spam-mail.com$'
);
/* Pattern with more properties ...
$patterns[] = array(
'ip' => '^200\.',
'host' => '^\d+\w+\.com$',
'body' => '^\w+\s\d+$',
'email' => '@gmail.com$',
'author' => 'www\.\w+\.\w{2,}'
); */
return $patterns;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.