Linux 软件免费装

EDZNET Geolocation

开发者 edznet
更新时间 2026年12月3日 20:01
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.2
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

visitor tracking geolocation country block login protection ip blocklist

下载

1.4.1 1.6.0 1.5.0 1.4.2 1.4.3 1.4.4 1.6.1 1.7.0 1.8.0 1.8.1 1.8.2

详情介绍:

EDZNET Geolocation brings the EDZNET Geo API into WordPress — no configuration required beyond an API key. Features 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. Country Classes (any page builder) Add one of these CSS classes to a section, row, column, module or block: Like the shortcodes, the country is checked in the visitor's browser, so it works with page caching. Elements stay visible while you edit in Elementor, Divi, Beaver Builder, Bricks and Oxygen.

安装:

  1. Upload the edznet-geolocation folder to /wp-content/plugins/.
  2. Activate the plugin.
  3. Go to EDZNET Geo → Settings and enter your free API key.

常见问题:

Is it compatible with WordPress 7.2 and PHP 8.6?

Yes. It is tested with WordPress 7.2 and PHP 8.6, with debug logging on and no warnings. It still works back to WordPress 5.6 and PHP 7.4.

How do I get an API key?

Visit edznet.io/api-services to sign up for a free account. The free tier includes 1,000 lookups per month, and Pro 50,000.

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.

Does it work with EDZNET Security Guard?

Yes. The two plugins share their lists of trusted addresses: addresses on Security Guard's "Never lock out" list (EDZNET Guard > Firewall) are treated like this plugin's IP whitelist, so country blocking and login protection let them through, and Security Guard's firewall never locks out this plugin's whitelist. Only the lists you entered yourself are shared. With Security Guard 2.3 and EDZNET Super Cache 1.4, this plugin's IP blocklist also applies to cached pages.

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.

Does it work with Elementor and Divi?

Yes. In Elementor, search for the EDZNET Geo widget, and open the Advanced tab of any widget, container, section or column for EDZNET Geo visibility (show only in, or hide in, the countries you pick). In Divi, add the EDZNET Geo or EDZNET Geo Content module; to show or hide a whole section, row or other module, add a country class such as edznet-geo-show-za in its Advanced tab under CSS Class. The Divi modules are built for Divi 4 and also load in Divi 5. Country classes work in any other page builder too.

Does showing content by country use many lookups?

No. Each visitor is looked up once and the country is kept in their browser for a day, however many pages and elements use it. Lookups that miss the browser are also cached on your server for 30 days per IP.

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.)

Does country blocking stop login attempts?

Country and continent blocking covers the front end of your site. For logins, use Login protection on the Blocking page: choose "Only allow logins from the countries below" (for example just your own country) or "Use the blocked continents and countries above". It applies to wp-login.php, renamed login URLs, WooCommerce and other login forms that use the standard WordPress login, XML-RPC and application passwords. Blocked visitors see "Logins from your location are not allowed on this site." whether or not their password was right.

What if I lock myself out?

The settings page will not save login rules that would block your own login, and it shows whether your current IP can log in. Whitelisted IPs can always log in, and if a location lookup fails the login is allowed. If you are ever locked out (for example while travelling), add define( 'EDZNET_GEO_LOGIN_UNLOCK', true ); to wp-config.php, log in, adjust the settings, and remove the line again.

Does it work behind Cloudflare or another proxy?

Yes. When a request comes from a Cloudflare address, the visitor's real IP is taken from Cloudflare's header automatically. Behind another proxy, load balancer or CDN, add its IP addresses under Trusted proxies on the Blocking page. Forwarding headers (X-Forwarded-For, X-Real-IP, CF-Connecting-IP) are only believed from Cloudflare, your own server or a trusted proxy, so they can't be faked to get round blocking or login protection. If every visitor shows the same IP in the Visitor Log, that IP is your proxy: add it to Trusted proxies. Developers can also use the edznet_geo_visitor_ip filter.

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.

Does it work on WordPress Multisite?

Yes. Network-activate it and enter one API key under Network Admin → Settings → EDZNET Geo; every site uses that key, shares one lookup cache, and the low-credit alert is sent once for the network. Each site keeps its own visitor log, blocking rules and logging/debug settings. New sites are set up automatically and their log table is removed when a site is deleted. You can also activate it on individual sites, in which case each site enters its own key as on a single install.

Can I set the API key in wp-config.php?

Yes. Add define( 'EDZNET_GEO_API_KEY', 'your-key' ); to wp-config.php and the plugin uses it instead of the key saved in the settings.

更新日志:

1.8.2 1.8.1 1.8.0 1.7.0 1.6.1 1.6.0 1.5.0 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0