ip-geo-block-xxxxx-status

The HTTP status code when the blocking occurs.

Description

The filter hook “ip-geo-block-xxxxx-status” where xxxxx is one of comment, xmlrpc, login, admin and public assigns the HTTP status code when the blocking occurs.

Parameters

Use case

The following code in your functions.php can hide your login page.

function my_login_status ( $code ) {
    return 404;
}
add_filter( 'ip-geo-block-login-status', 'my_login_status' );

The status code 404 leads to the “404 page” in your theme. For example, the following picture shows the page of Twenty Twelve.

404 error page

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

2.1.1

See also