May 11, 2021
Darko G.

Specify the name of authentication key for nonce.


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


  • $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.


Leave a Reply

Your email address will not be published. Required fields are marked *

© 2024 - IP Location Block by IDEOLOGIX Media