ip-geo-block-maxmind-zip-ipv4

The URI to MaxMind GeoLite Legacy database for IPv4.

Description

The filter hook “ip-geo-block-maxmind-zip-ipv4” assigns the URI to Free GeoLite Legacy database file for IPv4 which can be downloaded by GZIP format.

Parameters

Use case

The following code snippet in your theme’s functions.php can download the city database for IPv4.

function my_maxmind_ipv4( $url ) {
    return 'https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz';
}
add_filter( 'ip-geo-block-maxmind-zip-ipv4', 'my_maxmind_ipv4' );
NOTE: When you select "mu-plugins" (ip-geo-block-mu.php) as Validation timing , you should put your code snippet into drop-in.php in Geolocation API folder instead of functions.php. See My custom functions in “functions.php” doesn’t work. in FAQ for detail.

Since

1.2.0

See also