ip-location-block-bypass-themes

May 11, 2021
Darko G.

The list of themes which WP-ZEP should bypass.

Description

The filter hook “ip-location-block-bypass-themes” assigns the array of query strings in the request to the /wp-content/themes/my-theme/…/*.php which WP-ZEP should bypass.

In some cases, WP-ZEP (Zero-day Exploit Prevention for WordPress) blocks the valid request. This filter hook is used to prevent such an unexpected blocking.

Parameters

  • $themes
    (array) An array of allowed slug of theme.

Use case

The following code snippet in your theme’s functions.php can bypass WP-ZEP validation against the direct request to /wp-content/themes/my-theme/…/*.php.

function my_bypass_themes( $themes ) {
    $whitelist = array(
        'my-theme',
    );
    return array_merge( $themes, $whitelist );
}
add_filter( 'ip-location-block-bypass-themes', 'my_bypass_themes' );
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.2.1.1

Leave a Reply

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

© 2022 - IP Location Block by IDEOLOGIX Media