MaxMind
9 hooks fired by MaxMind: 9 filters and 0 actions across 9 call sites.
9 hooks fired by MaxMind: 9 filters and 0 actions across 9 call sites. 8 of the 9 call sites are described by a docblock, at the call or on the constant that names the hook; the rest are listed with their signature and call sites only. Paths are relative to the plugin directory.
xpac_maxmind_database_download_url
Filter · 2 arguments · 1 call site
Filters the URL the database is downloaded from.
apply_filters( 'xpac_maxmind_database_download_url', $url, $edition )$url(string) — Download URL, asking for the tar.gz suffix.$edition(string) — Edition ID being downloaded.
Fired from:
packages/MaxMind/Database.php:168
xpac_maxmind_database_edition
Filter · 1 argument · 1 call site
Filters which MaxMind edition this site downloads.
apply_filters( 'xpac_maxmind_database_edition', $edition )$edition(string) — Edition ID, e.g. "GeoLite2-Country" or "GeoLite2-City".
Fired from:
packages/MaxMind/Database.php:148
xpac_maxmind_database_fallback
Filter · 1 argument · 1 call site
Filters whether lookups use the web service while the chosen database is missing.
apply_filters( 'xpac_maxmind_database_fallback', false )$fallback(bool) — Whether to send visitor addresses to the web service. Default false.
Fired from:
packages/MaxMind/Addon.php:956
xpac_maxmind_download_timeout
Filter · 1 argument · 1 call site
Filters how long the database download may take.
apply_filters( 'xpac_maxmind_download_timeout', self::DEFAULT_TIMEOUT )$timeout(int) — Seconds.
Fired from:
packages/MaxMind/Database.php:343
xpac_maxmind_lookup_level
Filter · 1 argument · 1 call site
Filters how much of a place each lookup asks for.
apply_filters( 'xpac_maxmind_lookup_level', '' !== $level ? $level : 'country' )$level(string) — "country" or "city". Default from the settings screen.
Fired from:
packages/MaxMind/Addon.php:450
xpac_maxmind_pre_place
Filter · 2 arguments · 1 call site
Filters the visitor's place before MaxMind is asked for it.
Return an array to answer without a lookup: nothing is sent, nothing is cached, and the visitor's IP address never leaves this site. An IP address is personal data in the UK and the EU, and until this existed a site had no way to hold one back for a visitor who had not agreed to being located — the lookup ran on any page carrying a country rule.
['country' => ''] is a refusal; ['country' => 'FR'] answers with
France; ['country' => 'FR', 'city' => 'Lyon', 'region' => 'ARA']
answers the finer providers too.
apply_filters( 'xpac_maxmind_pre_place', null, $ipAddress )$place(array|null) — Place to use, or null to ask MaxMind.$ipAddress(string) — Address that would have been sent.
Fired from:
packages/MaxMind/Addon.php:560
xpac_maxmind_request_timeout
Filter · 2 arguments · 1 call site
Filters how long, in seconds, to wait for MaxMind to answer.
This runs inside a page view, so the default is deliberately short: a country rule is not worth holding the page open for. A site whose network is slower than this loses lookups to the failure cache.
apply_filters( 'xpac_maxmind_request_timeout', 3, $ipAddress )$timeout(int) — Seconds to wait. Default 3.$ipAddress(string) — Address being placed.
Fired from:
packages/MaxMind/Addon.php:1070
xpac_maxmind_source
Filter · 1 argument · 1 call site
Filters where a lookup is answered from.
apply_filters( 'xpac_maxmind_source', '' !== $source ? $source : 'web_service' )$source(string) — "web_service" or "database". Default from the settings screen.
Fired from:
packages/MaxMind/Addon.php:929
xpac_trust_proxy_headers
Filter · 1 argument · 1 call site
apply_filters( 'xpac_trust_proxy_headers', false )Fired from:
packages/MaxMind/Addon.php:383