Documentation

CountryBypass

Table of Contents

Properties

$previousActive  : bool
Save the state of currently active so we can update country database at toggle time.

Methods

clearDatabase()  : mixed
dynamicPredecision()  : mixed
Determines, if the current page request is outside our defined countries so all cookies are automatically accepted.
getCountriesRaw()  : mixed
getDatabaseDownloadTime()  : mixed
getType()  : mixed
isActive()  : mixed
lookupCountryCode()  : mixed
overrideEnableOptionsAutoload()  : mixed
overrideRegister()  : mixed
probablyUpdateDatabase()  : mixed
rest_pre_get_setting()  : mixed
Output the download time as ISO string instead of mysql formatted string.
updated_option_active()  : mixed
The option to enable Country Bypass got updated, let's automatically download the country database.
updateDatabase()  : mixed

Properties

$previousActive

Save the state of currently active so we can update country database at toggle time.

private bool $previousActive = null

Methods

dynamicPredecision()

Determines, if the current page request is outside our defined countries so all cookies are automatically accepted.

public dynamicPredecision(false|string $result, WP_REST_Request $request) : mixed
Parameters
$result : false|string
$request : WP_REST_Request

getDatabaseDownloadTime()

public getDatabaseDownloadTime() : mixed

lookupCountryCode()

public lookupCountryCode(mixed $ipAddress) : mixed
Parameters
$ipAddress : mixed

overrideEnableOptionsAutoload()

public overrideEnableOptionsAutoload() : mixed

probablyUpdateDatabase()

public probablyUpdateDatabase() : mixed

rest_pre_get_setting()

Output the download time as ISO string instead of mysql formatted string.

public rest_pre_get_setting(mixed $result, string $name, array<string|int, mixed> $args) : mixed
Parameters
$result : mixed

Value to use for the requested setting. Can be a scalar matching the registered schema for the setting, or null to follow the default get_option() behavior.

$name : string

Setting name (as shown in REST API responses).

$args : array<string|int, mixed>

Arguments passed to register_setting() for this setting.

updated_option_active()

The option to enable Country Bypass got updated, let's automatically download the country database.

public updated_option_active(WP_REST_Response $response, WP_REST_Request $request) : mixed
Parameters
$response : WP_REST_Response
$request : WP_REST_Request

updateDatabase()

public updateDatabase([mixed $force = false ]) : mixed
Parameters
$force : mixed = false

        
On this page

Search results