ip-location-block-auth-key

Posted on May 11, 2021

Specify the name of authentication key for nonce.

Description

The filter hook “ip-location-block-auth-key” assigns the name of authentication key for nonce.

Parameters

  • $key
    (string) ip-location-block-auth-nonce

Use case

If you want change it to shorter name, put the following code snippet into the functions.php in your theme.

/**
 * Replace authentication key
 *
 * You can safely use `0-9A-Za-z`, `_` and `-` as $key based on RFC2396 and RFC3986.
 * Only `_` might be conflict with others such as WP Fastest Cache.
 *
 * @param string $key
 * @return string $key
 */
function my_auth_key( $key ) {
    return '-';
}
IP_Geo_Block::add_filter( 'ip-location-block-auth-key', 'my_auth_key' );
NOTE: When you select "mu-plugins" (ip-location-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

0.0.3.0.16