Description
EDZNET Geolocation brings the EDZNET Geo API into WordPress — no configuration required beyond an API key.
Features
- Shortcode: Display visitor location anywhere with
[edznet_geo]— flag, country, city, region, ISP, timezone, currency, continent, postal code, coordinates, ASN, connection type, proxy/VPN flag. - Geo-Content Shortcodes: Show or hide content by visitor country with
[edznet_geo_show country="US,CA"]and[edznet_geo_hide country="RU,CN"]. - Visitor Logging: Automatically log IP and location on comments, logins, and user registrations. Each entry shows the visitor’s country flag next to the IP. Smart caching avoids repeat lookups.
- Comment Moderation: One-click “Block IP” actions on the Comments screen.
- IP Blocklist: Block individual IP addresses or CIDR ranges from the visitor log or the Blocking page.
- IP Whitelist: Always allow specific IPs or CIDR ranges, bypassing all blocking.
- Country Blocking: Select countries to block. Visitors from blocked countries are redirected to a restricted page.
- Continent Blocking: Block entire continents (Europe, Asia, North America, etc.) in one click.
- WordPress Widget: Drag-and-drop visitor location display in any widget area.
- Gutenberg Block: Insert visitor location directly into the block editor — no shortcode needed.
- CSV Export: Export the visitor log to CSV for external analysis.
- Client-Side Caching: Visitor location is cached in the browser’s localStorage so geo-content shortcodes and blocks display immediately on repeat visits without an AJAX call.
- API Rate Limiting: The AJAX/REST endpoint has built-in rate limiting to prevent abuse.
- Usage Dashboard: Monitor your API usage — lookups used, remaining, and reset date.
- Email Alerts: Get notified when your API credits are running low.
- API Key Encryption: Your API key is encrypted at rest using WordPress salts.
- Zero IP Retention: The API processes IP addresses in real-time and discards them immediately — no IPs are logged, stored, or retained, making it fully compliant with GDPR, POPIA, and similar privacy regulations.
Shortcode Examples
Display visitor flag and country:
[edznet_geo fields=”flag,country”]
Show all available fields:
[edznet_geo fields=”flag,country,city,region,isp,timezone,currency” class=”my-geo-box”]
Available fields: flag, country, city, region, isp, timezone, currency, continent, postal, coordinates, asn, connection, proxy, currency_symbol
Geo-Content Shortcodes
Show content only to visitors from the US or Canada:
[edznet_geo_show country=”US,CA”]This content is only visible to North American visitors.[/edznet_geo_show]
Hide content from visitors in Russia and China:
[edznet_geo_hide country=”RU,CN”]This content is hidden from visitors in these countries.[/edznet_geo_hide]
These shortcodes use AJAX to look up the visitor’s location, so they work with full-page caching plugins. Content inside [edznet_geo_show] is hidden by default and revealed via JavaScript — content inside [edznet_geo_hide] is visible by default and hidden if the visitor’s country matches.
Privacy & API Key Security
Keep your key private. Your API key is tied to your account. Do not share it, embed it in client-side code (JavaScript, mobile apps), or publish it publicly. You are responsible for all usage under your key.
Fair use. Creating multiple free accounts to circumvent rate limits is a violation of our Acceptable Use Policy and may result in suspension. If you need more lookups, upgrade your API plan at edznet.io/api-services.
No IP logging. The EDZNET Geo API processes IP addresses in real-time and does not log, store, or retain them. Looked-up IPs are discarded immediately after the response is sent. This makes the API fully compliant with GDPR, POPIA, and similar privacy regulations. The plugin itself caches lookup results locally (in your WordPress database) for 30 days to reduce API calls, but this data never leaves your server after the initial lookup.
External Services
This plugin uses the EDZNET Geo API, operated by EDZNET, to perform IP geolocation lookups (country, region, city, coordinates, ISP, timezone, ASN, connection type, proxy/VPN flags) for the shortcode, Gutenberg block, widget, visitor log, email alerts, and country/continent blocking features.
What is sent and when. When a lookup is needed (a visitor loads a page with the [edznet_geo] shortcode or a geo-content shortcode, submits a comment, logs in, registers, or the blocking feature is enabled and active), the plugin sends the visitor’s IP address and your API key to https://edznet.io/api/geo/v1/lookup. The service processes the IP in real-time and does not log, store, or retain it. Lookup results are cached locally on your server for 30 days per IP; repeat visitors are served from this cache without contacting the service.
Optional promotion submission. The admin dashboard may show an optional “Link back to EDZNET” promotion banner. If the site administrator chooses to submit a URL, the plugin sends that URL, the site URL, the submitting administrator’s email address and user ID, and the API key to https://edznet.io/api/geo/v1/promo. This submission is entirely optional and only triggered by an explicit administrator action.
Service terms. The EDZNET Geo API service is provided by EDZNET, a UK-based provider operating from ISO-certified data centres in London and Coventry, England:
* Terms of Service: https://edznet.io/terms-of-service.php
* Privacy Policy: https://edznet.io/privacy-policy.php
* Acceptable Use Policy: https://edznet.io/acceptable-use-policy.php
Blocks
This plugin provides 1 block.
- EDZNET Geo
Installation
- Upload the
edznet-geolocationfolder to/wp-content/plugins/. - Activate the plugin.
- Go to EDZNET Geo Settings and enter your free API key.
FAQ
-
How do I get an API key?
-
Visit edznet.io/api-services to sign up for a free account. The free tier includes 100 lookups per month.
-
Is my API key safe? Is it exposed to visitors?
-
Your API key is encrypted in the WordPress database and is never exposed to site visitors. The plugin sends it server-to-server to the EDZNET Geo API. It is not embedded in any HTML, JavaScript, or AJAX response.
-
Does the plugin cache lookups?
-
Yes. Results are cached for 30 days per IP. Repeat visitors from the same IP use the cached result.
-
Can I block entire continents?
-
Yes. Enable blocking in Settings, then check the continents you want to block on the Blocking page. Continent blocking is checked before country blocking.
-
Can I block entire countries?
-
Yes. Enable country blocking in Settings, then select countries to block in the Blocking page.
-
Can I block IP ranges with CIDR notation?
-
Yes. Both the IP blocklist and IP whitelist support CIDR ranges (e.g.
192.168.1.0/24,10.0.0.0/8). Enter them one per line just like individual IPs. -
Can I block specific IP addresses?
-
Yes. Go to the Blocking page to manually enter IP addresses or CIDR ranges, or click “Block IP” next to any entry in the visitor log.
-
Where do commenter country flags show?
-
Flags are shown in the admin Visitor Log next to each logged IP only. Flags are never shown on your site’s front-end comments.
-
How do I quickly block a commenter from the Comments screen?
-
Each comment row in the Comments screen has a “Block IP” action. Click it to instantly add that commenter’s IP to the blocklist; click again to unblock.
-
Is there a Gutenberg block?
-
Yes. Search for “EDZNET Geo” in the block inserter. It supports all the same fields as the shortcode.
-
Is there a WordPress widget?
-
Yes. Find “EDZNET Geolocation” under Appearance Widgets. Configure the fields to display. (Classic themes only — on block/FSE themes like Twenty Twenty-Four/Twenty Twenty-Five, use the EDZNET Geo Gutenberg block or the
[edznet_geo]shortcode instead.) -
Can I whitelist my own IP to avoid being blocked?
-
Yes. Add your IP to the IP Whitelist section on the Blocking page. Whitelisted IPs bypass country blocking, IP blocking, and the restricted page redirect.
-
Does this work with caching plugins?
-
Yes. The shortcode and blocking check run on standard WordPress hooks compatible with most caching setups.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“EDZNET Geolocation” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “EDZNET Geolocation” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.4.2
- Tweak: bumped “Tested up to” to WordPress 7.1. No functional changes.
1.4.1
- New: all plugin CSS/JS is now loaded through
wp_enqueue_style/wp_enqueue_script(front-end geo script, admin scripts, comments screen script) instead of inline<style>/<script>tags. - New: documented the EDZNET Geo API external service in the readme, including what data is sent and links to the EDZNET Terms of Service and Privacy Policy.
- Tweak: the AJAX/REST lookup endpoint is now rate limited site-wide (60 requests/min) with no per-IP rate-limit transients written, so spoofed request-header IPs cannot create transient-table bloat.
- Tweak: the 30-day lookup cache is now capped and automatically trimmed (hourly), so spoofed request-header IPs cannot create unbounded transient-table bloat.
- Fix: remove the optional dashboard promotion banner nonce from inline markup (handled by the enqueued admin script).
1.4.0
- New: visitor log entries show the visitor’s country flag next to the logged IP.
- New: “Block IP” action on each comment row in the Comments screen for one-click moderation — click again to unblock.
1.3.0
- New fields:
continent,postal,coordinates,asn,connection,proxy,currency_symbolfor the[edznet_geo]shortcode. - Added continent blocking — block entire continents in addition to individual countries.
- Added CIDR notation support for IP blocklist and whitelist — block ranges like
192.168.0.0/16. - Added Gutenberg block — insert visitor location directly in the block editor.
- Added WordPress widget — display visitor location in any widget area.
- Added CSV export for the visitor log.
- Added client-side localStorage caching — geo-content shortcodes display instantly on repeat visits with no AJAX overhead.
- Added API rate limiting on the REST endpoint to prevent abuse.
- Continent column added to the visitor log table.
1.2.0
- Added
[edznet_geo_show country="US,CA"]shortcode — show content to specific countries. - Added
[edznet_geo_hide country="RU,CN"]shortcode — hide content from specific countries. - Both work with AJAX to survive full-page caching.
1.1.0
- Added IP blocklist: block individual IPs from the visitor log or Blocking page.
- Added IP whitelist: bypass all blocking for specific IP addresses.
1.0.0
- Initial release.