| 开发者 | edznet |
|---|---|
| 更新时间 | 2026年8月24日 20:34 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
[edznet_geo] — flag, country, city, region, ISP, timezone, currency, continent, postal code, coordinates, ASN, connection type, proxy/VPN flag.[edznet_geo_show country="US,CA"] and [edznet_geo_hide country="RU,CN"].[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.
edznet-geolocation folder to /wp-content/plugins/.Visit edznet.io/api-services to sign up for a free account. The free tier includes 100 lookups per month.
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.
Yes. Results are cached for 30 days per IP. Repeat visitors from the same IP use the cached result.
Yes. Enable blocking in Settings, then check the continents you want to block on the Blocking page. Continent blocking is checked before country blocking.
Yes. Enable country blocking in Settings, then select countries to block in the Blocking page.
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.
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.
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.
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.
Yes. Search for "EDZNET Geo" in the block inserter. It supports all the same fields as the shortcode.
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.)
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.
Yes. The shortcode and blocking check run on standard WordPress hooks compatible with most caching setups.
wp_enqueue_style / wp_enqueue_script (front-end geo script, admin scripts, comments screen script) instead of inline <style>/<script> tags.continent, postal, coordinates, asn, connection, proxy, currency_symbol for the [edznet_geo] shortcode.192.168.0.0/16.[edznet_geo_show country="US,CA"] shortcode — show content to specific countries.[edznet_geo_hide country="RU,CN"] shortcode — hide content from specific countries.