Hi @atx,
Thank you for your great review and proposal. Your review motivates me a lot!
You can customize this plugin as you requested using ip-geo-block-xxxxx filter hook where “xxxxx” is one of “comment”, “xmlrpc”, “login”, “admin” and “public”. For example the following example in “functions.php” in your theme or “drop-in.php” in your Geolocation API library folder (recommended) additionally blocks the specific IP addresses on comment form:
/**
* Example 4: Usage of 'ip-geo-block-comment'
* Use case: Block comment from specific IP addresses in the blacklist
*
* @param string $validate['ip'] ip address
* @param string $validate['code'] country code
* @return array $validate add 'result' as 'passed' or 'blocked' if possible
*/
function my_blacklist( $validate ) {
$blacklist = array(
'123.456.789.',
);
foreach ( $blacklist as $ip ) {
if ( strpos( $ip, $validate['ip'] ) === 0 ) {
$validate['result'] = 'blocked';
break;
}
}
return $validate;
}
add_filter( 'ip-geo-block-comment', 'my_blacklist' );
You can also $validate['asn']
for AS Number if you enable “Use Autonomous System Number (ASN)” in “Validation rule settings” section.
The UI of the old version was rather simple than now, but it becomes a bit complicated as the number of users grows up. So I think the UI should be balanced between the simplicity and user’s convenience. Of course, I’ll take your suggestion into my consideration in the future. But for now, please use filter hooks. You can find many example in “samples.php“.
If you have any question related to this topic, please feel free to post in the forum. I’ll do my best to support you.
Anyway, thanks again!