ProudCity IP Block
Provides IP blocking for sites
by ProudCity, Curtis McHale · github.com/proudcity/wp-proud-ip-block · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/proudcity/wp-proud-ip-block/archive/refs/heads/main.zipReadme
WP Proud IP Block
Provides IP address blocking based on the MaxMind GeoLite 2 API. This currently integrates with Gravity Forms version > 2.5 via gform_validation filter.
ProudCity is a Wordpress platform for modern, standards-compliant municipal websites.
All bug reports, feature requests and other issues should be added to the wp-proudcity Issue Queue.
Filters
proud_ip_block_allow_countries
This filter allows you to change the list of allowed countries. By default we only allow US as a valid country. To add Canada we'd use the following code.
function add_canada( $countries ){
$countries[] = 'CA';
return $countries;
}
add_filter( 'proud_ip_block_allowed_countries', 'add_canada', 10, 1 );
Country codes conform to MaxMind ISO standards. See ISO Country codes.