Version Description
- Fix issue: Fix the issue that "Can not find Geolocation API libraries" error would always appear when once Geolite2, Maxmind and IP2Location were unselected.
- Fix issue: Fix the issue that https in ipstack.com is available only for premiums users.
-
New feature: Introduce a new filter hook
ip-geo-block-logs-preset
that adds an UI of "Preset filters" at "Search in logs". - Improvement: Prevent to make a cached page by WP Fastest Cache on blocking when "Validation timing" is "init" action hook.
- Improvement: Make the priofity of "UA string and qualification" is higher than that of "Block badly-behaved bots and crawlers" on public facing pages.
- Improvement: Update google charts based on the release note.
- Improvement: Always show "Google Maps API key" text box in "Plugin settings" section. If it is saved as empty, Google Maps API will no longer be used and a simple map will appear on "Search" tab.
- Improvement: Follow the change the RIPE whois format related to AS number.
- Improvement: Add UI to select the number of entries per page on IP address tables.
- Improvement: Multiple entries on IP address tables can be selected across the pages for bulk action.
- Improvement: Multiple Geolocation APIs can be selected on "Search" tab.
-
Improvement: The country code of admin should not be cached if it's
ZZ
during initialization process.
Download this release
Release Info
Developer | tokkonopapa |
Plugin | IP Geo Block |
Version | 3.0.15 |
Comparing to | |
See all releases |
Code changes from version 3.0.13 to 3.0.15
- README.txt +78 -51
- admin/class-ip-geo-block-admin.php +144 -100
- admin/css/admin.css +94 -17
- admin/css/admin.min.css +1 -1
- admin/css/cidr.min.css +1 -1
- admin/datatables/js/dataTables.responsive.js +3 -3
- admin/datatables/js/datatables-all.js +13 -13
- admin/datatables/js/datatables-all.min.js +1 -1
- admin/datatables/js/jquery.dataTables.js +10 -10
- admin/datatables/js/jquery.dataTables.min.js +1 -1
- admin/datatables/license.txt +1 -1
- admin/images/ajax-loader-snake.gif +0 -0
- admin/includes/class-admin-ajax.php +32 -18
- admin/includes/class-admin-rewrite.php +3 -3
- admin/includes/tab-accesslog.php +38 -19
- admin/includes/tab-attribution.php +4 -9
- admin/includes/tab-geolocation.php +25 -23
- admin/includes/tab-network.php +3 -5
- admin/includes/tab-settings.php +412 -504
- admin/includes/tab-statistics.php +30 -41
- admin/js/admin.js +182 -102
- admin/js/admin.min.js +6 -6
- admin/js/authenticate.js +0 -2
- admin/js/authenticate.min.js +15 -5
- admin/js/gmap.js +3 -2
- admin/js/gmap.min.js +8 -8
- admin/js/whois.js +7 -5
- admin/js/whois.min.js +8 -8
- classes/class-ip-geo-block-actv.php +1 -1
- classes/class-ip-geo-block-apis.php +39 -62
- classes/class-ip-geo-block-cron.php +4 -5
- classes/class-ip-geo-block-file.php +2 -2
- classes/class-ip-geo-block-lkup.php +30 -35
- classes/class-ip-geo-block-load.php +1 -1
- classes/class-ip-geo-block-logs.php +106 -104
- classes/class-ip-geo-block-opts.php +36 -56
- classes/class-ip-geo-block-util.php +147 -51
- classes/class-ip-geo-block.php +41 -25
- includes/random_compat/LICENSE +22 -0
- includes/random_compat/byte_safe_strings.php +195 -0
- includes/random_compat/cast_to_int.php +77 -0
- includes/random_compat/error_polyfill.php +49 -0
- includes/random_compat/random.php +225 -0
- includes/random_compat/random_bytes_com_dotnet.php +91 -0
- includes/random_compat/random_bytes_dev_urandom.php +172 -0
- includes/random_compat/random_bytes_libsodium.php +91 -0
- includes/random_compat/random_bytes_libsodium_legacy.php +93 -0
- includes/random_compat/random_bytes_mcrypt.php +79 -0
- includes/random_compat/random_int.php +204 -0
- ip-geo-block.php +5 -5
- languages/ip-geo-block-ja.mo +0 -0
- languages/ip-geo-block-ja.po +659 -780
- languages/ip-geo-block.mo +0 -0
- languages/ip-geo-block.po +476 -502
- languages/ip-geo-block.pot +476 -502
- rewrite-ini.php +1 -1
- rewrite.php +9 -9
- samples.php +17 -3
- uninstall.php +2 -2
- wp-content/ip-geo-api/drop-in-sample.php +2 -2
- wp-content/ip-geo-api/ip2location/IP2Location.php +2 -2
- wp-content/ip-geo-api/ip2location/bcmath.php +4 -4
- wp-content/ip-geo-api/ip2location/class-ip2location.php +9 -9
- wp-content/ip-geo-api/maxmind/class-maxmind-geolite2.php +6 -6
- wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php +11 -11
- wp-content/ip-geo-api/maxmind/class-maxmind.php +3 -3
- wp-content/ip-geo-api/maxmind/vendor/LICENSE +2 -2
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/LICENSE +2 -2
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/README.md +14 -14
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Model/City.php +1 -1
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Model/Country.php +1 -1
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Model/Enterprise.php +1 -1
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Model/Insights.php +1 -1
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Record/Country.php +1 -1
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Record/Location.php +1 -1
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Record/RepresentedCountry.php +1 -1
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Record/Subdivision.php +1 -1
- wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Record/Traits.php +2 -2
- wp-content/ip-geo-api/maxmind/vendor/maxmind-db/reader/LICENSE +2 -2
- wp-content/ip-geo-api/maxmind/vendor/maxmind-db/reader/README.md +3 -3
- wp-content/ip-geo-api/maxmind/vendor/maxmind/web-service-common/LICENSE +2 -2
- wp-content/ip-geo-api/maxmind/vendor/maxmind/web-service-common/README.md +1 -1
- wp-content/mu-plugins/ip-geo-block-mu.php +7 -5
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: security, firewall, brute force, vulnerability, login, wp-admin, admin, ajax, xmlrpc, comment, pingback, trackback, spam, IP address, geo, geolocation, buddypress, bbPress
|
5 |
Requires at least: 3.7
|
6 |
Tested up to: 4.9.8
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
|
@@ -33,7 +33,7 @@ After several days of installation, you'll be supprised to find many malicious o
|
|
33 |
In order to prevent hacking through the login form and XML-RPC by brute-force and the reverse-brute-force attacks, the number of login attempts will be limited per IP address even from the permitted countries.
|
34 |
|
35 |
* **Minimize server load against brute-force attacks:**
|
36 |
-
You can configure this plugin as a [Must Use Plugins](https://codex.wordpress.org/Must_Use_Plugins "Must Use Plugins « WordPress Codex") so that this plugin can be loaded prior to regular plugins. It can massively [reduce the load on server](
|
37 |
|
38 |
* **Prevent malicious down/uploading:**
|
39 |
A malicious request such as exposing `wp-config.php` or uploading malwares via vulnerable plugins/themes can be blocked.
|
@@ -48,8 +48,8 @@ After several days of installation, you'll be supprised to find many malicious o
|
|
48 |
When you click an external hyperlink on admin screens, http referrer will be eliminated to hide a footprint of your site.
|
49 |
|
50 |
* **Multiple source of IP Geolocation databases:**
|
51 |
-
[MaxMind GeoLite2 free databases](
|
52 |
-
Father more, [dedicated API class libraries](
|
53 |
|
54 |
* **Customizing response:**
|
55 |
HTTP response code can be selectable as `403 Forbidden` to deny access pages, `404 Not Found` to hide pages or even `200 OK` to redirect to the top page.
|
@@ -59,27 +59,27 @@ After several days of installation, you'll be supprised to find many malicious o
|
|
59 |
Validation logs for useful information to audit attack patterns can be manageable.
|
60 |
|
61 |
* **Cooperation with full spec security plugin:**
|
62 |
-
This plugin is lite enough to be able to cooperate with other full spec security plugin such as [Wordfence Security](https://wordpress.org/plugins/wordfence/ "Wordfence Security — WordPress Plugins"). See [this report](
|
63 |
|
64 |
* **Extendability:**
|
65 |
-
You can customize the behavior of this plugin via `add_filter()` with [pre-defined filter hook](
|
66 |
You can also get the extension [IP Geo Allow](https://github.com/ddur/WordPress-IP-Geo-Allow "GitHub - ddur/WordPress-IP-Geo-Allow: WordPress Plugin Exension for WordPress-IP-Geo-Block Plugin") by [Dragan](https://github.com/ddur "ddur (Dragan) - GitHub"). It makes admin screens strictly private with more flexible way than specifying IP addresses.
|
67 |
|
68 |
* **Self blocking prevention and easy rescue:**
|
69 |
-
Website owners do not prefer themselves to be blocked. This plugin prevents such a sad thing unless you force it. And futhermore, if such a situation occurs, you can [rescue yourself](
|
70 |
|
71 |
* **Clean uninstallation:**
|
72 |
Nothing is left in your precious mySQL database after uninstallation. So you can feel free to install and activate to make a trial of this plugin's functionality.
|
73 |
|
74 |
= Attribution =
|
75 |
|
76 |
-
This package includes GeoLite2 library distributed by MaxMind, available from [MaxMind](
|
77 |
|
78 |
Also thanks for providing the following great services and REST APIs for free.
|
79 |
|
80 |
* [https://ipdata.co/](https://ipdata.co/ "ipdata.co - IP Geolocation and Threat Data API") (IPv4, IPv6 / free)
|
81 |
* [https://ipinfo.io/](https://ipinfo.io/ "IP Address API and Data Solutions") (IPv4, IPv6 / free)
|
82 |
-
* [
|
83 |
* [http://geoiplookup.net/](http://geoiplookup.net/ "What Is My IP Address | GeoIP Lookup") (IPv4, IPv6 / free)
|
84 |
* [http://ip-api.com/](http://ip-api.com/ "IP-API.com - Free Geolocation API") (IPv4, IPv6 / free for non-commercial use)
|
85 |
* [https://ipinfodb.com/](https://ipinfodb.com/ "Free IP Geolocation Tools and API| IPInfoDB") (IPv4, IPv6 / free for registered user, need API key)
|
@@ -89,7 +89,7 @@ Also thanks for providing the following great services and REST APIs for free.
|
|
89 |
|
90 |
Development of this plugin is promoted at [WordPress-IP-Geo-Block](https://github.com/tokkonopapa/WordPress-IP-Geo-Block "tokkonopapa/WordPress-IP-Geo-Block - GitHub") and class libraries to handle geo-location database are developed separately as "add-in"s at [WordPress-IP-Geo-API](https://github.com/tokkonopapa/WordPress-IP-Geo-API "tokkonopapa/WordPress-IP-Geo-API - GitHub").
|
91 |
|
92 |
-
All contributions will always be welcome. Or visit my [development blog](
|
93 |
|
94 |
== Installation ==
|
95 |
|
@@ -101,7 +101,7 @@ All contributions will always be welcome. Or visit my [development blog](http://
|
|
101 |
4. Activate the plugin on the Plugin dashboard
|
102 |
5. Try 'Best for Back-end' button for easy setup at the bottom of this plugin's setting page.
|
103 |
|
104 |
-
Please refer to [the document](
|
105 |
or following descriptions for your best setup.
|
106 |
|
107 |
= Validation rule settings =
|
@@ -110,7 +110,7 @@ or following descriptions for your best setup.
|
|
110 |
Choose either `White list` (recommended) or `Black list` to specify the countries from which you want to pass or block.
|
111 |
|
112 |
* **Whitelist/Blacklist of country code**
|
113 |
-
Specify the country code with two letters (see [ISO 3166-1 alpha-2](
|
114 |
|
115 |
* **Use Autonomous System Number (ASN)**
|
116 |
It enables you to use "AS number" in the whitelist and blacklist of extra IP addresses to specify a group of IP networks.
|
@@ -128,7 +128,7 @@ or following descriptions for your best setup.
|
|
128 |
It restricts the file types on upload to block malware and backdoor via both back-end and front-end.
|
129 |
|
130 |
* **Response code**
|
131 |
-
Choose one of the [response code](
|
132 |
The 2xx code will lead to your top page, the 3xx code will redirect to [Black Hole Server](http://blackhole.webpagetest.org/), the 4xx code will lead to WordPress error page, and the 5xx will pretend an server error.
|
133 |
|
134 |
* **Max number of failed login attempts per IP address**
|
@@ -186,7 +186,7 @@ or following descriptions for your best setup.
|
|
186 |
= Geolocation API settings =
|
187 |
|
188 |
* **API selection and key settings**
|
189 |
-
If you wish to use `IPInfoDB`, you should register at [their site](
|
190 |
|
191 |
= Local database settings settings =
|
192 |
|
@@ -242,7 +242,7 @@ or following descriptions for your best setup.
|
|
242 |
|
243 |
= Does the site using this plugin comply with GDPR? =
|
244 |
|
245 |
-
Using this plugin itself should not be the problem, because from version 3.0.11 IP addresses in logs and cache of this plugin are encrypted by default in preparation for personal data breach. It also not only provides a way to manually erase them but also has the functionality to remove them when those are exceeded a certain amount/time. The option "Privacy friendly" helps you to restrict sending the ip address to the 3rd parties such as geolocation APIs and whois service equipped in this plugin. However, these functions are part of the requirements that GDPR requires and do not guarantee that the site is compliant with GDPR. Refer to [3.0.11 release note](
|
246 |
|
247 |
= Does this plugin support multisite? =
|
248 |
|
@@ -273,17 +273,17 @@ Other plugins adopting `mod_rewrite` (e.g. WP Fastest Cache) or `advanced-cache.
|
|
273 |
|
274 |
Thus your site would have less risk against the exploiting via vulnerable plugins and themes.
|
275 |
|
276 |
-
For more details, please refer to some documents at "[Blocking on front-end](
|
277 |
|
278 |
= I still have access from blacklisted country. Does it work correctly? =
|
279 |
|
280 |
Absolutely, YES.
|
281 |
|
282 |
-
Sometimes, a Wordfence Security user would report this type of claim when he/she found some accesses in its Live traffic view. But please don't worry. Before WordPress runs, Wordfence cleverly filters out malicious requests to your site using <a href="
|
283 |
|
284 |
It would also possibly be caused by the accuracy of country code in the geolocation databases. Actually, there is a case that a same IP address has different country code.
|
285 |
|
286 |
-
For more detail, please refer to "[I still have access from blacklisted country.](
|
287 |
|
288 |
= How can I test this plugin works? =
|
289 |
|
@@ -293,7 +293,7 @@ Another one is to use [http header browser addon](https://www.google.com/search?
|
|
293 |
|
294 |
You can add an IP address to the `X-Forwarded-For` header to emulate the access behind the proxy. In this case, you should add `HTTP_X_FORWARDED_FOR` into the "**$_SERVER keys for extra IPs**" on "**Settings**" tab.
|
295 |
|
296 |
-
See more details at "[How to test prevention of attacks](
|
297 |
|
298 |
= I'm locked out! What shall I do? =
|
299 |
|
@@ -319,7 +319,7 @@ After saving and uploading it to `/wp-content/plugins/ip-geo-block/` on your ser
|
|
319 |
|
320 |
Remember that you should upload the original one after re-configuration to deactivate this feature.
|
321 |
|
322 |
-
[This document](
|
323 |
|
324 |
= Do I have to turn on all the selection to enhance security? =
|
325 |
|
@@ -337,7 +337,7 @@ Yes. Roughly speaking, the strategy of this plugin has been constructed as follo
|
|
337 |
- **Bad signatures in query**
|
338 |
It blocks the request which has not been covered in the above three.
|
339 |
|
340 |
-
Please try "**Best for Back-end**" button at the bottom of this plugin's setting page for easy setup. And also see more details in "[The best practice of target settings](
|
341 |
|
342 |
= Does this plugin validate all the requests? =
|
343 |
|
@@ -347,17 +347,17 @@ But there're exceptions: When you enable "**Force to load WP core**" for **Plugi
|
|
347 |
|
348 |
= How to resolve "Sorry, your request cannot be accepted."? =
|
349 |
|
350 |
-
If you encounter this message, please refer to [this document](
|
351 |
|
352 |
If you can't solve your issue, please let me know about it on the [support forum](https://wordpress.org/support/plugin/ip-geo-block/ "View: Plugin Support « WordPress.org Forums"). Your logs in this plugin and "**Installation information**" at "**Plugin settings**" will be a great help to resolve the issue.
|
353 |
|
354 |
= How can I fix "Unable to write" error? =
|
355 |
|
356 |
-
When you enable "**Force to load WP core**" options, this plugin will try to configure `.htaccess` in your `/wp-content/plugins/` and `/wp-content/themes/` directory in order to protect your site against the malicous attacks to the [OMG plugins and themes](
|
357 |
|
358 |
But some servers doesn't give read / write permission against `.htaccess` to WordPress. In this case, you can configure `.htaccess` files by your own hand instead of enabling "**Force to load WP core**" options.
|
359 |
|
360 |
-
Please refer to "[How can I fix permission troubles?](
|
361 |
|
362 |
== Other Notes ==
|
363 |
|
@@ -382,6 +382,33 @@ Please refer to "[How can I fix permission troubles?](http://www.ipgeoblock.com/
|
|
382 |
|
383 |
== Changelog ==
|
384 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
= 3.0.13 =
|
386 |
* **Deprecate:** Remove the hotfix in 3.0.12.1 because of [WordPress 4.9.7 Security and Maintenance Release](https://wordpress.org/news/2018/07/wordpress-4-9-7-security-and-maintenance-release/ "WordPress 4.9.7 Security and Maintenance Release").
|
387 |
* **Fix issue:** Local databases settings will be updated when Geolocation API folder can not be found on activation. ([forum topic](https://wordpress.org/support/topic/local-database-settings-wrong-after-server-move/ "Topic: Local Database settings wrong after server move | WordPress.org"))
|
@@ -393,7 +420,7 @@ Please refer to "[How can I fix permission troubles?](http://www.ipgeoblock.com/
|
|
393 |
|
394 |
= 3.0.12.1 =
|
395 |
* **Fix issue:** Unexpected blocking cause by an extra slash at the end of `$_SERVER['DOCUMENT_ROOT']` that might be added by server's configuration. ([forum topic](https://wordpress.org/support/topic/wpwebinar/ "Topic: WPWebinar | WordPress.org"))
|
396 |
-
* **Fix issue:** [Human friendly error page](
|
397 |
* **Fix issue:** Fix the conflict with WP hide & Security Enhancer. ([forum topic](https://wordpress.org/support/topic/problem-with-permalinks-51/ "Topic: Problem with Permalinks | WordPress.org"))
|
398 |
* **Fix issue:** Hotfix [WordPress File Delete to Code Execution](https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/ "WARNING: WordPress File Delete to Code Execution") by RIPS Technologies.
|
399 |
|
@@ -407,7 +434,7 @@ Please refer to "[How can I fix permission troubles?](http://www.ipgeoblock.com/
|
|
407 |
* **Improvement:** Update geolocation APIs and add a new one.
|
408 |
* **Improvement:** Change the JavaScript compressor from Google Closure Compiler to UglifyJS 2 to prevent "Uncaught TypeError: Cannot read property ‘toLowerCase’ of undefined" in a certain environment.
|
409 |
* **Fix:** Fix the issue that blocking occurred immediately instead of displaying the login page again when login failed, even the number of times did not exceed the limit.
|
410 |
-
* See [3.0.11 release note](
|
411 |
|
412 |
= 3.0.10.4 =
|
413 |
* **Fix:** JavaScript error caused by bad handling form tag without method property. This error was happened with Wordfence Live Traffic.
|
@@ -447,7 +474,7 @@ If you still find the error "/plugins/ip-geo-block/classes/class-ip-geo-block-lo
|
|
447 |
* **Maintenance:** Change the priority order of local geolocation databases.
|
448 |
* **Bug fix:** Fix the issue that the target action for login form on settings tab could not unchecked on saving changes.
|
449 |
* **Bug fix:** Fix some other minor bugs.
|
450 |
-
* See [3.0.9 release note](
|
451 |
|
452 |
= 3.0.8 =
|
453 |
* **Improvement:** Use both Maxmind Legacy and GeoLite2 databases parallely.
|
@@ -480,14 +507,14 @@ Sorry for frequent update but the following bug should be fixed.
|
|
480 |
* **Bug fix:** Fix the bug using php short open tag on "Logs" tab.
|
481 |
* **Bug fix:** Fix the bug related to absolute path in filesystem on windows system.
|
482 |
* **Bug fix:** Fix the issue that "Auto updating (once a month)" could not be disabled.
|
483 |
-
* See [3.0.6 release note](
|
484 |
|
485 |
= 3.0.5 =
|
486 |
* **New feature:** Add "Live update" mode on "Logs" tab.
|
487 |
* **Improvement:** List all the IP addresses in cache are now displayed and manageable on "Statistics" tab.
|
488 |
* **Improvement:** Add "Either blocked or passed" as a new condition for recording logs. It enables to verify the requests "passed" from the blacklisted countries or the countries not in the whitelist.
|
489 |
* **Improvement:** Add two new filter hooks to utilize Google APIs from native domain in China.
|
490 |
-
* See [3.0.5 release note](
|
491 |
|
492 |
= 3.0.4.6 =
|
493 |
* **Bug fix:** Fix the issue that the emergent functionality didn't work when the number of login attempts reached to the limit.
|
@@ -530,7 +557,7 @@ Thank you all for taking your time again since last update.
|
|
530 |
* **Improvement:** Inhibit to embed a special nonce into links when WP-ZEP is disabled at each target. This may improve compatibility with some plugins and themes.
|
531 |
* **Bug fix:** Fix the issue of verifying file upload. It could not handle multiple files. ([@](https://wordpress.org/support/topic/incompatible-with-awesome-support-plugin/#post-9403708 "Topic: incompatible with Awesome Support plugin « WordPress.org Forums"))
|
532 |
* **Bug fix:** Fix the issue of illegal click event handling on anchor tag without href. ([@](https://wordpress.org/support/topic/pagebuilder-broken-by-ipgeoblock-v3-0-3-4/ "Topic: Pagebuilder broken by IPGeoblock v3.0.3.4 « WordPress.org Forums"))
|
533 |
-
* See [3.0.4 release note](
|
534 |
|
535 |
= 3.0.3.4 =
|
536 |
* **Improvement:** Some minor refactoring for the future release.
|
@@ -573,7 +600,7 @@ This is a maintenance release addressing various internal improvement.
|
|
573 |
* **Improvement:** Better handling of server and private IP address.
|
574 |
* **Bug fix:** Fix the bug of "Export/Import settings". **Please export json file again if you hold it as backup purpose** because some of settings data might be incompatible.
|
575 |
* **Bug fix:** Fix the bug of "Password Reset" caused by miss-spelling "resetpasss".
|
576 |
-
* See some details at [release 3.0.3](
|
577 |
|
578 |
= 3.0.2.2 =
|
579 |
* **Improvement:** Change the behavior of "Referrer Suppressor" not to open a new window on public facing pages.
|
@@ -597,8 +624,8 @@ This is a maintenance release addressing some issues.
|
|
597 |
* **New feature:** Add "Exceptions" for "Admin ajax/post" to specify the name of action which causes undesired blocking (typically on the public facing pages).
|
598 |
* **Improvement:** Add "Disable" to "Max number of failed login attempts per IP address" to avoid conflict with other similar plugin.
|
599 |
* **Improvement:** Update geolocation database libraries to 1.1.7 for better compatibility on some platform.
|
600 |
-
* **Trial feature:** Add custom action hook `ip-geo-block-send-response`. This is useful to control firewall via [fail2ban](
|
601 |
-
* See some details at [release 3.0.2](
|
602 |
|
603 |
= 3.0.1.2 =
|
604 |
* **Bug fix:** Fix the blocking issue in some environments when upgrading from 2.2.9.1 to 3.0.0.
|
@@ -626,7 +653,7 @@ This is a maintenance release addressing some issues.
|
|
626 |
* **Improvement:** Better compatibility with some plugins, themes and widgets.
|
627 |
* **Improvement:** Deferred execution of SQL command to improve the response.
|
628 |
* **Improvement:** Make the response compatible with WP original when it is requested by GET method.
|
629 |
-
* See some details at [release 3.0.0](
|
630 |
|
631 |
= 2.2.9.1 =
|
632 |
* **Bug fix:** Blocking Wordfence scanning. ([@](https://wordpress.org/support/topic/wordfence-conflict-2/ "WordFence Conflict"))
|
@@ -639,7 +666,7 @@ This is a maintenance release addressing some issues.
|
|
639 |
* **New feature:** A new option that makes this plugin configured as a "Must-use plugin". It can massively reduce the server load especially against brute-force attacks because it initiates this plugin prior to other typical plugins.
|
640 |
* **Improvement:** Validation of a certain signature against XSS is internally added to "Bad signature in query" by default.
|
641 |
* **Improvement:** Improved compatibility with PHP 7 (Thanks to [FireMyst](https://wordpress.org/support/topic/plans-for-php-7-compatiblity/ "Topic: Plans for PHP 7 compatiblity? « WordPress.org Forums")).
|
642 |
-
* Find details in [2.2.9 Release Note](
|
643 |
|
644 |
= 2.2.8.2 =
|
645 |
* **Bug fix:** Fixed the mismatched internal version number.
|
@@ -652,19 +679,19 @@ This is a maintenance release addressing some issues.
|
|
652 |
* **Bug fix:** Fixed the issue of stripping some required characters for Google maps API key.
|
653 |
* **New feature:** Whois database Lookup for IP address on search tab.
|
654 |
* **Update:** Updated geolocation API libraries and services.
|
655 |
-
* Find more details in [2.2.8 Release Note](
|
656 |
|
657 |
= 2.2.7 =
|
658 |
* **Bug fix:** Fix inadequate validation of "**Bad signatures in query**".
|
659 |
* **Improvement:** Add fallback for Google Maps API key ([@](https://wordpress.org/support/topic/226-problem-with-search-resp-google-maps "WordPress › Support » [2.2.6] Problem with SEARCH resp. Google Maps")) and corruption of "Bad signatures" ([@](https://wordpress.org/support/topic/226-problem-with-bad-signatures-in-query "WordPress › Support » [2.2.6] Problem with "Bad signatures in query"")).
|
660 |
* **Update:** Update geolocation service api.
|
661 |
-
* Find details about Google Maps API in [2.2.7 Release Note](
|
662 |
|
663 |
= 2.2.6 =
|
664 |
* **New feature:** Add saving csv file of logs in "Logs" tab.
|
665 |
* **New feature:** Add filter hook `ip-geo-block-record-log` to control over the conditions of recording in more detail.
|
666 |
* **Bug fix:** Fixed the issue that "Exceptions" for Plugins/Themes area does not work properly. Please confirm your settings again.
|
667 |
-
* See details at [release 2.2.6](
|
668 |
|
669 |
= 2.2.5 =
|
670 |
* **New feature:** On the settings page, you can specify the pliugin or theme which would cause undesired blocking in order to exclude it from the validation target without embedding any codes into `functions.php`.
|
@@ -689,7 +716,7 @@ Sorry for frequent updating.
|
|
689 |
* **Improvement:** Made the logout url compatible with [Rename wp-login.php](https://wordpress.org/plugins/rename-wp-login/).
|
690 |
* **Improvement:** Made condition of validation more strictly at admin diagnosis to prevent unnecessary notice of self blocking. ([@](https://wordpress.org/support/topic/youll-be-blocked-after-you-log-out-notice-doesnt-disappear "[resolved] "You'll be blocked after you log out" notice doesn't disappear"))
|
691 |
* **Improvement:** Improved some of UI. ([@](https://wordpress.org/support/topic/possible-to-select-which-countries-are-blocked "[resolved] Possible to select which countries are blocked?"), [@](https://wordpress.org/support/topic/ip-geo-block-black-list "IP Geo Block Black List"))
|
692 |
-
* See some details at [release 2.2.4](
|
693 |
|
694 |
= 2.2.3.1 =
|
695 |
* **Bug fix:** Fixed the issue that disabled validation target was still blocked by country. ([@](https://wordpress.org/support/topic/logs-whitelist-comments-still-blocked "[resolved] logs whitelist comments still blocked?"))
|
@@ -703,7 +730,7 @@ Sorry for frequent updating.
|
|
703 |
* **Improvement:** Prevent self blocking caused by irrelevant signature. ([@](https://wordpress.org/support/topic/works-too-well-blocked-my-wp-admin-myself "[resolved] Works too well - Blocked my wp-admin myself"))
|
704 |
* **Bug fix:** Fixed the issue of conflicting with certain plugins due to the irrelevant handling of js event. ([@](https://wordpress.org/support/topic/cannot-edit-pages-when-ip-geo-block-is-enabled "[resolved] Cannot edit pages when ip-geo-block is enabled."))
|
705 |
* **New feature:** Add "Blocked per day" graph for the daily statistics.
|
706 |
-
* See some details at [2.2.3 release note](
|
707 |
|
708 |
= 2.2.2.3 =
|
709 |
Sorry for frequent update again but the following obvious bugs should be fixed.
|
@@ -725,14 +752,14 @@ Sorry for frequent update.
|
|
725 |
* **Improvement:** In the previous version, the statistical data was recorded into `wp_options`. It caused the uncertainty of recording especially in case of burst attacks. Now the data will be recorded in an independent table to improve this issue.
|
726 |
* **Bug fix:** Fixed conflict with NextGEN Gallary Pro. Thanks to [bodowewer](https://wordpress.org/support/profile/bodowewer).
|
727 |
* **Bug fix:** Fixed some filter hooks that did not work as intended.
|
728 |
-
* See more details at [2.2.2 release note](
|
729 |
|
730 |
= 2.2.1.1 =
|
731 |
* **Bug fix:** Fixed "open_basedir restriction" issue caused by `file_exists()`.
|
732 |
|
733 |
= 2.2.1 =
|
734 |
* **Enhancement:** In previous version, local geolocation databases will always be removed and downloaded again at every upgrading. Now, the class library for Maxmind and IP2Location have become independent of this plugin and you can put them outside this plugin in order to cut the above useless process. The library can be available from [WordPress-IP-Geo-API](https://github.com/tokkonopapa/WordPress-IP-Geo-API).
|
735 |
-
* **Deprecated:** Cooperation with IP2Location plugins such as [IP2Location Tags](
|
736 |
* **Improvement:** Improved connectivity with Jetpack.
|
737 |
* **Improvement:** Improved immediacy of downloading databases at upgrading.
|
738 |
* **Improvement:** Replaced a terminated RESTful API service with a new stuff.
|
@@ -752,7 +779,7 @@ Sorry for frequent update.
|
|
752 |
* **New feature:** Malicious signatures to prevent disclosing the important files via vulnerable plugins or themes. A malicious request to try to expose `wp-config.php` or `passwd` can be blocked.
|
753 |
* **New feature:** Add privacy considerations related to IP address. Add **Anonymize IP address** at **Record settings**.
|
754 |
* **Bug fix:** Fix the issue that spaces in **Text message on comment form** are deleted.
|
755 |
-
* See details at [2.2.0 release note](
|
756 |
|
757 |
= 2.1.5.1 =
|
758 |
* **Bug fix:** Fixed the issue that the Blacklist did not work properly. Thanks to TJayYay for reporting this issue at [support forum](https://wordpress.org/support/topic/hackers-from-country-in-blocked-list-of-countries-trying-to-login "WordPress › Support » Hackers from country in Blocked List of Countries trying to login").
|
@@ -762,13 +789,13 @@ Sorry for frequent update.
|
|
762 |
* **New feature:** Add pie chart to display statistics of "Blocked by country".
|
763 |
* **Enhancement:** WP-ZEP is reinforced against CSRF.
|
764 |
* **Bug fix:** Fix illegal handling of the fragment in a link.
|
765 |
-
* See details at [2.1.5 release note](
|
766 |
|
767 |
= 2.1.4 =
|
768 |
* **Bug fix:** Fix the issue that this plugin broke functionality of a certain plugin. Thanks to **opsec** for reporting this issue at [support forum](https://wordpress.org/support/topic/blocks-saves-in-types-or-any-plugins-from-wp-typescom "WordPress › Support » Blocks saves in Types or any plugins from wp-types.com").
|
769 |
* **Improvement:** Add checking process for validation rule to prevent being blocked itself. Thanks to **internationals** for proposing at [support forum](https://wordpress.org/support/topic/locked-out-due-to-eu-vs-country "WordPress › Support » Locked out due to EU vs. Country")
|
770 |
* **Improvement:** Arrage the order of setting sections to focus the goal of this plugin.
|
771 |
-
* See details at [2.1.4 release note](
|
772 |
|
773 |
= 2.1.3 =
|
774 |
* **New feature:** Add "show" / "hide" at each section on the "Settings" tab.
|
@@ -777,7 +804,7 @@ Sorry for frequent update.
|
|
777 |
* **Improvement:** Improved the compatibility with Autoptimize.
|
778 |
* **Bug fix:** Fix the issue related to showing featured themes on dashboard.
|
779 |
* **Bug fix:** Fix minor bug in `rewrite.php` for the advanced use case.
|
780 |
-
* See details at [2.1.3 release note](
|
781 |
|
782 |
= 2.1.2 =
|
783 |
This is a maintenance release.
|
@@ -788,16 +815,16 @@ This is a maintenance release.
|
|
788 |
* **Improvement:** Hide checking the existence of log db behind the symbol `IP_GEO_BLOCK_DEBUG` to reduce 1 query on admin screen.
|
789 |
* **Improvement:** Add alternative functions of BCMath extension to avoid `PHP Fatal error: Call to undefined function` in `IP2Location.php` when IPv6 is specified.
|
790 |
* **Improvement:** Use MaxMind database at the activating process not to be locked out by means of inconsistency of database at the activation and after.
|
791 |
-
* See more details at [2.1.2 release note](
|
792 |
|
793 |
= 2.1.1 =
|
794 |
* **New feature:** Added `Block by country (register, lost password)` at `Login form` on `Settings` tab in order to accept the registered users as membership from anywhere but block the request of new user ragistration and lost password by the country code. Is't suitable for BuddyPress and bbPress.
|
795 |
* **Improvement:** Added showing the custom error page for http response code 4xx and 5xx. For example the `403.php` in the theme template directory or in the child theme directory is used if it exists. And new filter hooks `ip-geo-block-(comment|xmlrpc|login|admin)-(status|reason)` are available to customize the response code and reason for human.
|
796 |
* **Obsoleted:** Obsoleted the filter hooks `ip-geo-block-(admin-actions|admin-pages|wp-content)`. Alternatively new filter hooks `ip-geo-block-bypass-(admins|plugins|themes)` are added to bypass WP-ZEP.
|
797 |
-
* Find out more details in the [2.1.1 release note](
|
798 |
|
799 |
= 2.1.0 =
|
800 |
-
* **New feature:** Expanded the operating range of ZP-ZEP, that includes admin area, plugins area, themes area. Now it can prevent a direct malicios attack to the file in plugins and themes area. Please go to the "Validation Settings" on "Settings" tab and check it. Also check my article in "[Analysis of Attack Vector against WP Plugins](
|
801 |
* **Bug fix:** Fixed the issue that action hook `ip-geo-block-backup-dir` did not work correctly because the order of argument was mismatched.
|
802 |
* **Bug fix:** Fixed the issue that a record including utf8 4 bytes character in its columns was not logged into DB in WordPress 4.2.
|
803 |
* **Improvement:** Fixed the issue that Referrer Suppressor do nothing with a new element which is added into DOM after DOM ready. The event handler is now delegated at the `body`.
|
@@ -807,7 +834,7 @@ This is a maintenance release.
|
|
807 |
* Added re-creating DB table for validation logs in case of accidentally failed at activation process.
|
808 |
* The time of day is shown with local time by adding GMT offset based on the time zone setting.
|
809 |
* Optimized resource loading and settings to avoid redundancy.
|
810 |
-
* See details at [this plugin's blog](
|
811 |
|
812 |
= 2.0.7 =
|
813 |
* Avoid JavaScript error which occurs if an anchor link has no `href`.
|
@@ -829,7 +856,7 @@ This is a maintenance release.
|
|
829 |
* Also added the filter hook `ip-geo-block-admin-actions` for safe actions on back-end.
|
830 |
|
831 |
= 2.0.2 =
|
832 |
-
* **New feature:** Include `wp-admin/admin-post.php` as a validation target in the `Admin area`. This feature is to protect against a vulnerability such as [Analysis of the Fancybox-For-WordPress Vulnerability](
|
833 |
* Added a sample code snippet as a use case for 'Give ajax permission in case of safe actions on front facing page'. See Example 10 in `sample.php`.
|
834 |
|
835 |
= 2.0.1 =
|
4 |
Tags: security, firewall, brute force, vulnerability, login, wp-admin, admin, ajax, xmlrpc, comment, pingback, trackback, spam, IP address, geo, geolocation, buddypress, bbPress
|
5 |
Requires at least: 3.7
|
6 |
Tested up to: 4.9.8
|
7 |
+
Stable tag: 3.0.15
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
|
33 |
In order to prevent hacking through the login form and XML-RPC by brute-force and the reverse-brute-force attacks, the number of login attempts will be limited per IP address even from the permitted countries.
|
34 |
|
35 |
* **Minimize server load against brute-force attacks:**
|
36 |
+
You can configure this plugin as a [Must Use Plugins](https://codex.wordpress.org/Must_Use_Plugins "Must Use Plugins « WordPress Codex") so that this plugin can be loaded prior to regular plugins. It can massively [reduce the load on server](https://www.ipgeoblock.com/codex/validation-timing.html "Validation timing | IP Geo Block").
|
37 |
|
38 |
* **Prevent malicious down/uploading:**
|
39 |
A malicious request such as exposing `wp-config.php` or uploading malwares via vulnerable plugins/themes can be blocked.
|
48 |
When you click an external hyperlink on admin screens, http referrer will be eliminated to hide a footprint of your site.
|
49 |
|
50 |
* **Multiple source of IP Geolocation databases:**
|
51 |
+
[MaxMind GeoLite2 free databases](https://www.maxmind.com "MaxMind - IP Geolocation and Online Fraud Prevention") (it requires PHP 5.4.0+) and [IP2Location LITE databases](https://www.ip2location.com/ "IP Address Geolocation to Identify Website Visitor's Geographical Location") can be installed in this plugin. Also free Geolocation REST APIs and whois information can be available for audit purposes.
|
52 |
+
Father more, [dedicated API class libraries](https://www.ipgeoblock.com/article/api-class-library.html "CloudFlare & CloudFront API class library | IP Geo Block") can be installed for CloudFlare and CloudFront as a reverse proxy service.
|
53 |
|
54 |
* **Customizing response:**
|
55 |
HTTP response code can be selectable as `403 Forbidden` to deny access pages, `404 Not Found` to hide pages or even `200 OK` to redirect to the top page.
|
59 |
Validation logs for useful information to audit attack patterns can be manageable.
|
60 |
|
61 |
* **Cooperation with full spec security plugin:**
|
62 |
+
This plugin is lite enough to be able to cooperate with other full spec security plugin such as [Wordfence Security](https://wordpress.org/plugins/wordfence/ "Wordfence Security — WordPress Plugins"). See [this report](https://www.ipgeoblock.com/codex/page-speed-performance.html "Page speed performance | IP Geo Block") about page speed performance.
|
63 |
|
64 |
* **Extendability:**
|
65 |
+
You can customize the behavior of this plugin via `add_filter()` with [pre-defined filter hook](https://www.ipgeoblock.com/codex/ "Codex | IP Geo Block"). See various use cases in [samples.php](https://github.com/tokkonopapa/WordPress-IP-Geo-Block/blob/master/ip-geo-block/samples.php "WordPress-IP-Geo-Block/samples.php at master - tokkonopapa/WordPress-IP-Geo-Block - GitHub") bundled within this package.
|
66 |
You can also get the extension [IP Geo Allow](https://github.com/ddur/WordPress-IP-Geo-Allow "GitHub - ddur/WordPress-IP-Geo-Allow: WordPress Plugin Exension for WordPress-IP-Geo-Block Plugin") by [Dragan](https://github.com/ddur "ddur (Dragan) - GitHub"). It makes admin screens strictly private with more flexible way than specifying IP addresses.
|
67 |
|
68 |
* **Self blocking prevention and easy rescue:**
|
69 |
+
Website owners do not prefer themselves to be blocked. This plugin prevents such a sad thing unless you force it. And futhermore, if such a situation occurs, you can [rescue yourself](https://www.ipgeoblock.com/codex/what-should-i-do-when-i-m-locked-out.html "What should I do when I'm locked out? | IP Geo Block") easily.
|
70 |
|
71 |
* **Clean uninstallation:**
|
72 |
Nothing is left in your precious mySQL database after uninstallation. So you can feel free to install and activate to make a trial of this plugin's functionality.
|
73 |
|
74 |
= Attribution =
|
75 |
|
76 |
+
This package includes GeoLite2 library distributed by MaxMind, available from [MaxMind](https://www.maxmind.com "MaxMind - IP Geolocation and Online Fraud Prevention") (it requires PHP 5.4.0+), and also includes IP2Location open source libraries available from [IP2Location](https://www.ip2location.com "IP Address Geolocation to Identify Website Visitor's Geographical Location").
|
77 |
|
78 |
Also thanks for providing the following great services and REST APIs for free.
|
79 |
|
80 |
* [https://ipdata.co/](https://ipdata.co/ "ipdata.co - IP Geolocation and Threat Data API") (IPv4, IPv6 / free)
|
81 |
* [https://ipinfo.io/](https://ipinfo.io/ "IP Address API and Data Solutions") (IPv4, IPv6 / free)
|
82 |
+
* [https://geoip.nekudo.com/](https://geoip.nekudo.com/ "Free IP GeoLocation/GeoIp API - geoip.nekudo.com") (IPv4, IPv6 / free)
|
83 |
* [http://geoiplookup.net/](http://geoiplookup.net/ "What Is My IP Address | GeoIP Lookup") (IPv4, IPv6 / free)
|
84 |
* [http://ip-api.com/](http://ip-api.com/ "IP-API.com - Free Geolocation API") (IPv4, IPv6 / free for non-commercial use)
|
85 |
* [https://ipinfodb.com/](https://ipinfodb.com/ "Free IP Geolocation Tools and API| IPInfoDB") (IPv4, IPv6 / free for registered user, need API key)
|
89 |
|
90 |
Development of this plugin is promoted at [WordPress-IP-Geo-Block](https://github.com/tokkonopapa/WordPress-IP-Geo-Block "tokkonopapa/WordPress-IP-Geo-Block - GitHub") and class libraries to handle geo-location database are developed separately as "add-in"s at [WordPress-IP-Geo-API](https://github.com/tokkonopapa/WordPress-IP-Geo-API "tokkonopapa/WordPress-IP-Geo-API - GitHub").
|
91 |
|
92 |
+
All contributions will always be welcome. Or visit my [development blog](https://www.ipgeoblock.com/ "IP Geo Block").
|
93 |
|
94 |
== Installation ==
|
95 |
|
101 |
4. Activate the plugin on the Plugin dashboard
|
102 |
5. Try 'Best for Back-end' button for easy setup at the bottom of this plugin's setting page.
|
103 |
|
104 |
+
Please refer to [the document](https://www.ipgeoblock.com/codex/ "Codex | IP Geo Block")
|
105 |
or following descriptions for your best setup.
|
106 |
|
107 |
= Validation rule settings =
|
110 |
Choose either `White list` (recommended) or `Black list` to specify the countries from which you want to pass or block.
|
111 |
|
112 |
* **Whitelist/Blacklist of country code**
|
113 |
+
Specify the country code with two letters (see [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements "ISO 3166-1 alpha-2 - Wikipedia, the free encyclopedia")). Each of them should be separated by comma.
|
114 |
|
115 |
* **Use Autonomous System Number (ASN)**
|
116 |
It enables you to use "AS number" in the whitelist and blacklist of extra IP addresses to specify a group of IP networks.
|
128 |
It restricts the file types on upload to block malware and backdoor via both back-end and front-end.
|
129 |
|
130 |
* **Response code**
|
131 |
+
Choose one of the [response code](https://tools.ietf.org/html/rfc2616#section-10 "RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1") to be sent when it blocks a comment.
|
132 |
The 2xx code will lead to your top page, the 3xx code will redirect to [Black Hole Server](http://blackhole.webpagetest.org/), the 4xx code will lead to WordPress error page, and the 5xx will pretend an server error.
|
133 |
|
134 |
* **Max number of failed login attempts per IP address**
|
186 |
= Geolocation API settings =
|
187 |
|
188 |
* **API selection and key settings**
|
189 |
+
If you wish to use `IPInfoDB`, you should register at [their site](https://ipinfodb.com/ "IPInfoDB | Free IP Address Geolocation Tools") to get a free API key and set it into the textfield. And `ip-api.com` and `Smart-IP.net` require non-commercial use.
|
190 |
|
191 |
= Local database settings settings =
|
192 |
|
242 |
|
243 |
= Does the site using this plugin comply with GDPR? =
|
244 |
|
245 |
+
Using this plugin itself should not be the problem, because from version 3.0.11 IP addresses in logs and cache of this plugin are encrypted by default in preparation for personal data breach. It also not only provides a way to manually erase them but also has the functionality to remove them when those are exceeded a certain amount/time. The option "Privacy friendly" helps you to restrict sending the ip address to the 3rd parties such as geolocation APIs and whois service equipped in this plugin. However, these functions are part of the requirements that GDPR requires and do not guarantee that the site is compliant with GDPR. Refer to [3.0.11 release note](https://www.ipgeoblock.com/changelog/release-3.0.11.html) for details.
|
246 |
|
247 |
= Does this plugin support multisite? =
|
248 |
|
273 |
|
274 |
Thus your site would have less risk against the exploiting via vulnerable plugins and themes.
|
275 |
|
276 |
+
For more details, please refer to some documents at "[Blocking on front-end](https://www.ipgeoblock.com/codex/#blocking-on-front-end 'Codex | IP Geo Block')".
|
277 |
|
278 |
= I still have access from blacklisted country. Does it work correctly? =
|
279 |
|
280 |
Absolutely, YES.
|
281 |
|
282 |
+
Sometimes, a Wordfence Security user would report this type of claim when he/she found some accesses in its Live traffic view. But please don't worry. Before WordPress runs, Wordfence cleverly filters out malicious requests to your site using <a href="https://php.net/manual/en/ini.core.php#ini.auto-prepend-file" title="PHP: Description of core php.ini directives - Manual">auto_prepend_file</a> directive to include PHP based Web Application Firewall. Then this plugin validates the rest of the requests that pass over Wordfence because those were not in WAF rules, especially you enables "**Prevent Zero-day Exploit**".
|
283 |
|
284 |
It would also possibly be caused by the accuracy of country code in the geolocation databases. Actually, there is a case that a same IP address has different country code.
|
285 |
|
286 |
+
For more detail, please refer to "[I still have access from blacklisted country.](https://www.ipgeoblock.com/codex/access-from-blacklisted-country.html 'I still have access from blacklisted country. | IP Geo Block')".
|
287 |
|
288 |
= How can I test this plugin works? =
|
289 |
|
293 |
|
294 |
You can add an IP address to the `X-Forwarded-For` header to emulate the access behind the proxy. In this case, you should add `HTTP_X_FORWARDED_FOR` into the "**$_SERVER keys for extra IPs**" on "**Settings**" tab.
|
295 |
|
296 |
+
See more details at "[How to test prevention of attacks](https://www.ipgeoblock.com/codex/#how-to-test-prevention-of-attacks 'Codex | IP Geo Block')".
|
297 |
|
298 |
= I'm locked out! What shall I do? =
|
299 |
|
319 |
|
320 |
Remember that you should upload the original one after re-configuration to deactivate this feature.
|
321 |
|
322 |
+
[This document](https://www.ipgeoblock.com/codex/what-should-i-do-when-i-m-locked-out.html "What should I do when I'm locked out? | IP Geo Block") can also help you.
|
323 |
|
324 |
= Do I have to turn on all the selection to enhance security? =
|
325 |
|
337 |
- **Bad signatures in query**
|
338 |
It blocks the request which has not been covered in the above three.
|
339 |
|
340 |
+
Please try "**Best for Back-end**" button at the bottom of this plugin's setting page for easy setup. And also see more details in "[The best practice of target settings](https://www.ipgeoblock.com/codex/the-best-practice-for-target-settings.html 'The best practice of target settings | IP Geo Block')".
|
341 |
|
342 |
= Does this plugin validate all the requests? =
|
343 |
|
347 |
|
348 |
= How to resolve "Sorry, your request cannot be accepted."? =
|
349 |
|
350 |
+
If you encounter this message, please refer to [this document](https://www.ipgeoblock.com/codex/you-are-not-allowed-to-access.html "Why “Sorry, your request cannot be accepted” ? | IP Geo Block") to resolve your blocking issue.
|
351 |
|
352 |
If you can't solve your issue, please let me know about it on the [support forum](https://wordpress.org/support/plugin/ip-geo-block/ "View: Plugin Support « WordPress.org Forums"). Your logs in this plugin and "**Installation information**" at "**Plugin settings**" will be a great help to resolve the issue.
|
353 |
|
354 |
= How can I fix "Unable to write" error? =
|
355 |
|
356 |
+
When you enable "**Force to load WP core**" options, this plugin will try to configure `.htaccess` in your `/wp-content/plugins/` and `/wp-content/themes/` directory in order to protect your site against the malicous attacks to the [OMG plugins and themes](https://www.ipgeoblock.com/article/exposure-of-wp-config-php.html "Prevent exposure of wp-config.php | IP Geo Block").
|
357 |
|
358 |
But some servers doesn't give read / write permission against `.htaccess` to WordPress. In this case, you can configure `.htaccess` files by your own hand instead of enabling "**Force to load WP core**" options.
|
359 |
|
360 |
+
Please refer to "[How can I fix permission troubles?](https://www.ipgeoblock.com/codex/how-can-i-fix-permission-troubles.html 'How can I fix permission troubles? | IP Geo Block')" in order to fix this error.
|
361 |
|
362 |
== Other Notes ==
|
363 |
|
382 |
|
383 |
== Changelog ==
|
384 |
|
385 |
+
= 3.0.15 =
|
386 |
+
* **Fix issue:** Fix the issue that "Can not find Geolocation API libraries" error would always appear when once Geolite2, Maxmind and IP2Location were unselected.
|
387 |
+
* **Fix issue:** Fix the issue that https in ipstack.com is available only for premiums users.
|
388 |
+
* **New feature:** Introduce a new filter hook [`ip-geo-block-logs-preset`](https://www.ipgeoblock.com/codex/ip-geo-block-logs-preset.html "ip-geo-block-logs[-preset] | IP Geo Block") that adds an UI of "Preset filters" at "Search in logs".
|
389 |
+
* **Improvement:** Prevent to make a cached page by WP Fastest Cache on blocking when "Validation timing" is "init" action hook.
|
390 |
+
* **Improvement:** Make the priofity of "UA string and qualification" is higher than that of "Block badly-behaved bots and crawlers" on public facing pages.
|
391 |
+
* **Improvement:** Update google charts based on the [release note](https://developers.google.com/chart/interactive/docs/release_notes "Google Charts Release Notes | Charts | Google Developers").
|
392 |
+
* **Improvement:** Always show "Google Maps API key" text box in "Plugin settings" section. If it is saved as empty, Google Maps API will no longer be used and a simple map will appear on "Search" tab.
|
393 |
+
* **Improvement:** Follow the change the RIPE whois format related to AS number.
|
394 |
+
* **Improvement:** Add UI to select the number of entries per page on IP address tables.
|
395 |
+
* **Improvement:** Multiple entries on IP address tables can be selected across the pages for bulk action.
|
396 |
+
* **Improvement:** Multiple Geolocation APIs can be selected on "Search" tab.
|
397 |
+
* **Improvement:** The country code of admin should not be cached if it's `ZZ` during initialization process.
|
398 |
+
|
399 |
+
= 3.0.14 =
|
400 |
+
* **Fix issue:** Fix wrong handling of anonymized IPv6 on clicking a link or applying bulk actions.
|
401 |
+
* **Fix issue:** Fix the issue that added a server's country code which was not in "Whitelist of country code" but its IP address was in "Whitelist of extra IP addresses prior to country code" on activation. ([forum topic](https://wordpress.org/support/topic/possible-bug-disabling-enabling-adds-us-to-whitelist-country-code/ "Topic: Possible bug: disabling/enabling adds “,US” to whitelist country code | WordPress.org"))
|
402 |
+
* **Fix issue:** Fix the issue of "Fatal error: Call to undefined function" which caused 500 Internal error on admin screen under a certain condition.
|
403 |
+
* **Fix issue:** Fix the issue of undefined symbol for openssl in PHP 5.3.5 and under.
|
404 |
+
* **New feature:** Introduce an emergency login link in "Plugins settings" section.
|
405 |
+
* **New feature:** Introduce a new filter hook [`ip-geo-block-dns`](https://www.ipgeoblock.com/codex/ip-geo-block-dns.html "ip-geo-block-dns | IP Geo Block") to specify the primary and secondary domain name resolvers.
|
406 |
+
* **New feature:** Introduce a new filter hook `ip-geo-block-logs`. ([forum topic](https://wordpress.org/support/topic/request-log-filtering/ "Topic: Request: Log filtering | WordPress.org"))
|
407 |
+
* **New feature:** Introduce a new drop-in file `drop-in-admin.php` in Geolocation API library folder.
|
408 |
+
* **Improvement:** Provide help links on "Settings" tab.
|
409 |
+
* **Improvement:** Sort out some related items in the section on "Settings" tab.
|
410 |
+
* **Improvement:** All the http had been replaced to https if possible.
|
411 |
+
|
412 |
= 3.0.13 =
|
413 |
* **Deprecate:** Remove the hotfix in 3.0.12.1 because of [WordPress 4.9.7 Security and Maintenance Release](https://wordpress.org/news/2018/07/wordpress-4-9-7-security-and-maintenance-release/ "WordPress 4.9.7 Security and Maintenance Release").
|
414 |
* **Fix issue:** Local databases settings will be updated when Geolocation API folder can not be found on activation. ([forum topic](https://wordpress.org/support/topic/local-database-settings-wrong-after-server-move/ "Topic: Local Database settings wrong after server move | WordPress.org"))
|
420 |
|
421 |
= 3.0.12.1 =
|
422 |
* **Fix issue:** Unexpected blocking cause by an extra slash at the end of `$_SERVER['DOCUMENT_ROOT']` that might be added by server's configuration. ([forum topic](https://wordpress.org/support/topic/wpwebinar/ "Topic: WPWebinar | WordPress.org"))
|
423 |
+
* **Fix issue:** [Human friendly error page](https://www.ipgeoblock.com/codex/customizing-the-response.html#human-friendly-error-page) now works properly. ([forum topic](https://wordpress.org/support/topic/problem-with-permalinks-51/ "Topic: Problem with Permalinks | WordPress.org"))
|
424 |
* **Fix issue:** Fix the conflict with WP hide & Security Enhancer. ([forum topic](https://wordpress.org/support/topic/problem-with-permalinks-51/ "Topic: Problem with Permalinks | WordPress.org"))
|
425 |
* **Fix issue:** Hotfix [WordPress File Delete to Code Execution](https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/ "WARNING: WordPress File Delete to Code Execution") by RIPS Technologies.
|
426 |
|
434 |
* **Improvement:** Update geolocation APIs and add a new one.
|
435 |
* **Improvement:** Change the JavaScript compressor from Google Closure Compiler to UglifyJS 2 to prevent "Uncaught TypeError: Cannot read property ‘toLowerCase’ of undefined" in a certain environment.
|
436 |
* **Fix:** Fix the issue that blocking occurred immediately instead of displaying the login page again when login failed, even the number of times did not exceed the limit.
|
437 |
+
* See [3.0.11 release note](https://www.ipgeoblock.com/changelog/release-3.0.11.html) for some details.
|
438 |
|
439 |
= 3.0.10.4 =
|
440 |
* **Fix:** JavaScript error caused by bad handling form tag without method property. This error was happened with Wordfence Live Traffic.
|
474 |
* **Maintenance:** Change the priority order of local geolocation databases.
|
475 |
* **Bug fix:** Fix the issue that the target action for login form on settings tab could not unchecked on saving changes.
|
476 |
* **Bug fix:** Fix some other minor bugs.
|
477 |
+
* See [3.0.9 release note](https://www.ipgeoblock.com/changelog/release-3.0.9.html "3.0.9 Release Note | IP Geo Block") for some details.
|
478 |
|
479 |
= 3.0.8 =
|
480 |
* **Improvement:** Use both Maxmind Legacy and GeoLite2 databases parallely.
|
507 |
* **Bug fix:** Fix the bug using php short open tag on "Logs" tab.
|
508 |
* **Bug fix:** Fix the bug related to absolute path in filesystem on windows system.
|
509 |
* **Bug fix:** Fix the issue that "Auto updating (once a month)" could not be disabled.
|
510 |
+
* See [3.0.6 release note](https://www.ipgeoblock.com/changelog/release-3.0.6.html "3.0.6 Release Note | IP Geo Block") for some details.
|
511 |
|
512 |
= 3.0.5 =
|
513 |
* **New feature:** Add "Live update" mode on "Logs" tab.
|
514 |
* **Improvement:** List all the IP addresses in cache are now displayed and manageable on "Statistics" tab.
|
515 |
* **Improvement:** Add "Either blocked or passed" as a new condition for recording logs. It enables to verify the requests "passed" from the blacklisted countries or the countries not in the whitelist.
|
516 |
* **Improvement:** Add two new filter hooks to utilize Google APIs from native domain in China.
|
517 |
+
* See [3.0.5 release note](https://www.ipgeoblock.com/changelog/release-3.0.5.html "3.0.5 Release Note | IP Geo Block") for some details.
|
518 |
|
519 |
= 3.0.4.6 =
|
520 |
* **Bug fix:** Fix the issue that the emergent functionality didn't work when the number of login attempts reached to the limit.
|
557 |
* **Improvement:** Inhibit to embed a special nonce into links when WP-ZEP is disabled at each target. This may improve compatibility with some plugins and themes.
|
558 |
* **Bug fix:** Fix the issue of verifying file upload. It could not handle multiple files. ([@](https://wordpress.org/support/topic/incompatible-with-awesome-support-plugin/#post-9403708 "Topic: incompatible with Awesome Support plugin « WordPress.org Forums"))
|
559 |
* **Bug fix:** Fix the issue of illegal click event handling on anchor tag without href. ([@](https://wordpress.org/support/topic/pagebuilder-broken-by-ipgeoblock-v3-0-3-4/ "Topic: Pagebuilder broken by IPGeoblock v3.0.3.4 « WordPress.org Forums"))
|
560 |
+
* See [3.0.4 release note](https://www.ipgeoblock.com/changelog/release-3.0.4.html "3.0.4 Release Note | IP Geo Block") for some details.
|
561 |
|
562 |
= 3.0.3.4 =
|
563 |
* **Improvement:** Some minor refactoring for the future release.
|
600 |
* **Improvement:** Better handling of server and private IP address.
|
601 |
* **Bug fix:** Fix the bug of "Export/Import settings". **Please export json file again if you hold it as backup purpose** because some of settings data might be incompatible.
|
602 |
* **Bug fix:** Fix the bug of "Password Reset" caused by miss-spelling "resetpasss".
|
603 |
+
* See some details at [release 3.0.3](https://www.ipgeoblock.com/changelog/release-3.0.3.html "3.0.3 Release Note | IP Geo Block").
|
604 |
|
605 |
= 3.0.2.2 =
|
606 |
* **Improvement:** Change the behavior of "Referrer Suppressor" not to open a new window on public facing pages.
|
624 |
* **New feature:** Add "Exceptions" for "Admin ajax/post" to specify the name of action which causes undesired blocking (typically on the public facing pages).
|
625 |
* **Improvement:** Add "Disable" to "Max number of failed login attempts per IP address" to avoid conflict with other similar plugin.
|
626 |
* **Improvement:** Update geolocation database libraries to 1.1.7 for better compatibility on some platform.
|
627 |
+
* **Trial feature:** Add custom action hook `ip-geo-block-send-response`. This is useful to control firewall via [fail2ban](https://www.fail2ban.org/ "Fail2ban") like [WP fail2ban](https://wordpress.org/plugins/wp-fail2ban/ "WP fail2ban - WordPress Plugins").
|
628 |
+
* See some details at [release 3.0.2](https://www.ipgeoblock.com/changelog/release-3.0.2.html "3.0.2 Release Note | IP Geo Block").
|
629 |
|
630 |
= 3.0.1.2 =
|
631 |
* **Bug fix:** Fix the blocking issue in some environments when upgrading from 2.2.9.1 to 3.0.0.
|
653 |
* **Improvement:** Better compatibility with some plugins, themes and widgets.
|
654 |
* **Improvement:** Deferred execution of SQL command to improve the response.
|
655 |
* **Improvement:** Make the response compatible with WP original when it is requested by GET method.
|
656 |
+
* See some details at [release 3.0.0](https://www.ipgeoblock.com/changelog/release-3.0.0.html "3.0.0 Release Note | IP Geo Block").
|
657 |
|
658 |
= 2.2.9.1 =
|
659 |
* **Bug fix:** Blocking Wordfence scanning. ([@](https://wordpress.org/support/topic/wordfence-conflict-2/ "WordFence Conflict"))
|
666 |
* **New feature:** A new option that makes this plugin configured as a "Must-use plugin". It can massively reduce the server load especially against brute-force attacks because it initiates this plugin prior to other typical plugins.
|
667 |
* **Improvement:** Validation of a certain signature against XSS is internally added to "Bad signature in query" by default.
|
668 |
* **Improvement:** Improved compatibility with PHP 7 (Thanks to [FireMyst](https://wordpress.org/support/topic/plans-for-php-7-compatiblity/ "Topic: Plans for PHP 7 compatiblity? « WordPress.org Forums")).
|
669 |
+
* Find details in [2.2.9 Release Note](https://www.ipgeoblock.com/changelog/release-2.2.9.html "2.2.9 Release Note").
|
670 |
|
671 |
= 2.2.8.2 =
|
672 |
* **Bug fix:** Fixed the mismatched internal version number.
|
679 |
* **Bug fix:** Fixed the issue of stripping some required characters for Google maps API key.
|
680 |
* **New feature:** Whois database Lookup for IP address on search tab.
|
681 |
* **Update:** Updated geolocation API libraries and services.
|
682 |
+
* Find more details in [2.2.8 Release Note](https://www.ipgeoblock.com/changelog/release-2.2.8.html "2.2.8 Release Note").
|
683 |
|
684 |
= 2.2.7 =
|
685 |
* **Bug fix:** Fix inadequate validation of "**Bad signatures in query**".
|
686 |
* **Improvement:** Add fallback for Google Maps API key ([@](https://wordpress.org/support/topic/226-problem-with-search-resp-google-maps "WordPress › Support » [2.2.6] Problem with SEARCH resp. Google Maps")) and corruption of "Bad signatures" ([@](https://wordpress.org/support/topic/226-problem-with-bad-signatures-in-query "WordPress › Support » [2.2.6] Problem with "Bad signatures in query"")).
|
687 |
* **Update:** Update geolocation service api.
|
688 |
+
* Find details about Google Maps API in [2.2.7 Release Note](https://www.ipgeoblock.com/changelog/release-2.2.7.html "2.2.7 Release Note").
|
689 |
|
690 |
= 2.2.6 =
|
691 |
* **New feature:** Add saving csv file of logs in "Logs" tab.
|
692 |
* **New feature:** Add filter hook `ip-geo-block-record-log` to control over the conditions of recording in more detail.
|
693 |
* **Bug fix:** Fixed the issue that "Exceptions" for Plugins/Themes area does not work properly. Please confirm your settings again.
|
694 |
+
* See details at [release 2.2.6](https://www.ipgeoblock.com/changelog/release-2.2.6.html "2.2.6 Release Note").
|
695 |
|
696 |
= 2.2.5 =
|
697 |
* **New feature:** On the settings page, you can specify the pliugin or theme which would cause undesired blocking in order to exclude it from the validation target without embedding any codes into `functions.php`.
|
716 |
* **Improvement:** Made the logout url compatible with [Rename wp-login.php](https://wordpress.org/plugins/rename-wp-login/).
|
717 |
* **Improvement:** Made condition of validation more strictly at admin diagnosis to prevent unnecessary notice of self blocking. ([@](https://wordpress.org/support/topic/youll-be-blocked-after-you-log-out-notice-doesnt-disappear "[resolved] "You'll be blocked after you log out" notice doesn't disappear"))
|
718 |
* **Improvement:** Improved some of UI. ([@](https://wordpress.org/support/topic/possible-to-select-which-countries-are-blocked "[resolved] Possible to select which countries are blocked?"), [@](https://wordpress.org/support/topic/ip-geo-block-black-list "IP Geo Block Black List"))
|
719 |
+
* See some details at [release 2.2.4](https://www.ipgeoblock.com/changelog/release-2.2.4.html "2.2.4 Release Note").
|
720 |
|
721 |
= 2.2.3.1 =
|
722 |
* **Bug fix:** Fixed the issue that disabled validation target was still blocked by country. ([@](https://wordpress.org/support/topic/logs-whitelist-comments-still-blocked "[resolved] logs whitelist comments still blocked?"))
|
730 |
* **Improvement:** Prevent self blocking caused by irrelevant signature. ([@](https://wordpress.org/support/topic/works-too-well-blocked-my-wp-admin-myself "[resolved] Works too well - Blocked my wp-admin myself"))
|
731 |
* **Bug fix:** Fixed the issue of conflicting with certain plugins due to the irrelevant handling of js event. ([@](https://wordpress.org/support/topic/cannot-edit-pages-when-ip-geo-block-is-enabled "[resolved] Cannot edit pages when ip-geo-block is enabled."))
|
732 |
* **New feature:** Add "Blocked per day" graph for the daily statistics.
|
733 |
+
* See some details at [2.2.3 release note](https://www.ipgeoblock.com/changelog/release-2.2.3.html "2.2.3 Release Note").
|
734 |
|
735 |
= 2.2.2.3 =
|
736 |
Sorry for frequent update again but the following obvious bugs should be fixed.
|
752 |
* **Improvement:** In the previous version, the statistical data was recorded into `wp_options`. It caused the uncertainty of recording especially in case of burst attacks. Now the data will be recorded in an independent table to improve this issue.
|
753 |
* **Bug fix:** Fixed conflict with NextGEN Gallary Pro. Thanks to [bodowewer](https://wordpress.org/support/profile/bodowewer).
|
754 |
* **Bug fix:** Fixed some filter hooks that did not work as intended.
|
755 |
+
* See more details at [2.2.2 release note](https://www.ipgeoblock.com/changelog/release-2.2.2.html "2.2.2 Release Note").
|
756 |
|
757 |
= 2.2.1.1 =
|
758 |
* **Bug fix:** Fixed "open_basedir restriction" issue caused by `file_exists()`.
|
759 |
|
760 |
= 2.2.1 =
|
761 |
* **Enhancement:** In previous version, local geolocation databases will always be removed and downloaded again at every upgrading. Now, the class library for Maxmind and IP2Location have become independent of this plugin and you can put them outside this plugin in order to cut the above useless process. The library can be available from [WordPress-IP-Geo-API](https://github.com/tokkonopapa/WordPress-IP-Geo-API).
|
762 |
+
* **Deprecated:** Cooperation with IP2Location plugins such as [IP2Location Tags](https://wordpress.org/plugins/ip2location-tags/ "WordPress - IP2Location Tags - WordPress Plugins"), [IP2Location Variables](https://wordpress.org/plugins/ip2location-variables/ "WordPress - IP2Location Variables - WordPress Plugins"), [IP2Location Country Blocker](https://wordpress.org/plugins/ip2location-country-blocker/ "WordPress - IP2Location Country Blocker - WordPress Plugins") is out of use. Instead of it, free [IP2Location LITE databases for IPv4 and IPv6](https://lite.ip2location.com/ "Free IP Geolocation Database") will be downloaded.
|
763 |
* **Improvement:** Improved connectivity with Jetpack.
|
764 |
* **Improvement:** Improved immediacy of downloading databases at upgrading.
|
765 |
* **Improvement:** Replaced a terminated RESTful API service with a new stuff.
|
779 |
* **New feature:** Malicious signatures to prevent disclosing the important files via vulnerable plugins or themes. A malicious request to try to expose `wp-config.php` or `passwd` can be blocked.
|
780 |
* **New feature:** Add privacy considerations related to IP address. Add **Anonymize IP address** at **Record settings**.
|
781 |
* **Bug fix:** Fix the issue that spaces in **Text message on comment form** are deleted.
|
782 |
+
* See details at [2.2.0 release note](https://www.ipgeoblock.com/changelog/release-2.2.0.html "2.2.0 Release Note").
|
783 |
|
784 |
= 2.1.5.1 =
|
785 |
* **Bug fix:** Fixed the issue that the Blacklist did not work properly. Thanks to TJayYay for reporting this issue at [support forum](https://wordpress.org/support/topic/hackers-from-country-in-blocked-list-of-countries-trying-to-login "WordPress › Support » Hackers from country in Blocked List of Countries trying to login").
|
789 |
* **New feature:** Add pie chart to display statistics of "Blocked by country".
|
790 |
* **Enhancement:** WP-ZEP is reinforced against CSRF.
|
791 |
* **Bug fix:** Fix illegal handling of the fragment in a link.
|
792 |
+
* See details at [2.1.5 release note](https://www.ipgeoblock.com/changelog/release-2.1.5.html "2.1.5 Release Note").
|
793 |
|
794 |
= 2.1.4 =
|
795 |
* **Bug fix:** Fix the issue that this plugin broke functionality of a certain plugin. Thanks to **opsec** for reporting this issue at [support forum](https://wordpress.org/support/topic/blocks-saves-in-types-or-any-plugins-from-wp-typescom "WordPress › Support » Blocks saves in Types or any plugins from wp-types.com").
|
796 |
* **Improvement:** Add checking process for validation rule to prevent being blocked itself. Thanks to **internationals** for proposing at [support forum](https://wordpress.org/support/topic/locked-out-due-to-eu-vs-country "WordPress › Support » Locked out due to EU vs. Country")
|
797 |
* **Improvement:** Arrage the order of setting sections to focus the goal of this plugin.
|
798 |
+
* See details at [2.1.4 release note](https://www.ipgeoblock.com/changelog/release-2.1.4.html "2.1.4 Release Note").
|
799 |
|
800 |
= 2.1.3 =
|
801 |
* **New feature:** Add "show" / "hide" at each section on the "Settings" tab.
|
804 |
* **Improvement:** Improved the compatibility with Autoptimize.
|
805 |
* **Bug fix:** Fix the issue related to showing featured themes on dashboard.
|
806 |
* **Bug fix:** Fix minor bug in `rewrite.php` for the advanced use case.
|
807 |
+
* See details at [2.1.3 release note](https://www.ipgeoblock.com/changelog/release-2.1.3.html "2.1.3 Release Note").
|
808 |
|
809 |
= 2.1.2 =
|
810 |
This is a maintenance release.
|
815 |
* **Improvement:** Hide checking the existence of log db behind the symbol `IP_GEO_BLOCK_DEBUG` to reduce 1 query on admin screen.
|
816 |
* **Improvement:** Add alternative functions of BCMath extension to avoid `PHP Fatal error: Call to undefined function` in `IP2Location.php` when IPv6 is specified.
|
817 |
* **Improvement:** Use MaxMind database at the activating process not to be locked out by means of inconsistency of database at the activation and after.
|
818 |
+
* See more details at [2.1.2 release note](https://www.ipgeoblock.com/changelog/release-2.1.2.html "2.1.2 Release Note").
|
819 |
|
820 |
= 2.1.1 =
|
821 |
* **New feature:** Added `Block by country (register, lost password)` at `Login form` on `Settings` tab in order to accept the registered users as membership from anywhere but block the request of new user ragistration and lost password by the country code. Is't suitable for BuddyPress and bbPress.
|
822 |
* **Improvement:** Added showing the custom error page for http response code 4xx and 5xx. For example the `403.php` in the theme template directory or in the child theme directory is used if it exists. And new filter hooks `ip-geo-block-(comment|xmlrpc|login|admin)-(status|reason)` are available to customize the response code and reason for human.
|
823 |
* **Obsoleted:** Obsoleted the filter hooks `ip-geo-block-(admin-actions|admin-pages|wp-content)`. Alternatively new filter hooks `ip-geo-block-bypass-(admins|plugins|themes)` are added to bypass WP-ZEP.
|
824 |
+
* Find out more details in the [2.1.1 release note](https://www.ipgeoblock.com/changelog/release-2.1.1.html "2.1.1 Release Note").
|
825 |
|
826 |
= 2.1.0 =
|
827 |
+
* **New feature:** Expanded the operating range of ZP-ZEP, that includes admin area, plugins area, themes area. Now it can prevent a direct malicios attack to the file in plugins and themes area. Please go to the "Validation Settings" on "Settings" tab and check it. Also check my article in "[Analysis of Attack Vector against WP Plugins](https://www.ipgeoblock.com/article/analysis-attack-vector.html)".
|
828 |
* **Bug fix:** Fixed the issue that action hook `ip-geo-block-backup-dir` did not work correctly because the order of argument was mismatched.
|
829 |
* **Bug fix:** Fixed the issue that a record including utf8 4 bytes character in its columns was not logged into DB in WordPress 4.2.
|
830 |
* **Improvement:** Fixed the issue that Referrer Suppressor do nothing with a new element which is added into DOM after DOM ready. The event handler is now delegated at the `body`.
|
834 |
* Added re-creating DB table for validation logs in case of accidentally failed at activation process.
|
835 |
* The time of day is shown with local time by adding GMT offset based on the time zone setting.
|
836 |
* Optimized resource loading and settings to avoid redundancy.
|
837 |
+
* See details at [this plugin's blog](https://www.ipgeoblock.com/changelog/release-2.0.8.html "2.0.8 Release Note").
|
838 |
|
839 |
= 2.0.7 =
|
840 |
* Avoid JavaScript error which occurs if an anchor link has no `href`.
|
856 |
* Also added the filter hook `ip-geo-block-admin-actions` for safe actions on back-end.
|
857 |
|
858 |
= 2.0.2 =
|
859 |
+
* **New feature:** Include `wp-admin/admin-post.php` as a validation target in the `Admin area`. This feature is to protect against a vulnerability such as [Analysis of the Fancybox-For-WordPress Vulnerability](https://blog.sucuri.net/2015/02/analysis-of-the-fancybox-for-wordpress-vulnerability.html) on Sucuri Blog.
|
860 |
* Added a sample code snippet as a use case for 'Give ajax permission in case of safe actions on front facing page'. See Example 10 in `sample.php`.
|
861 |
|
862 |
= 2.0.1 =
|
admin/class-ip-geo-block-admin.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
define( 'IP_GEO_BLOCK_NETWORK', FALSE );
|
@@ -24,8 +24,8 @@ class IP_Geo_Block_Admin {
|
|
24 |
*
|
25 |
*/
|
26 |
private static $instance = NULL;
|
|
|
27 |
private $admin_tab = 0;
|
28 |
-
private $is_network = NULL;
|
29 |
|
30 |
/**
|
31 |
* Initialize the plugin by loading admin scripts & styles
|
@@ -59,6 +59,10 @@ class IP_Geo_Block_Admin {
|
|
59 |
*
|
60 |
*/
|
61 |
public function admin_init() {
|
|
|
|
|
|
|
|
|
62 |
// Add the options page and menu item.
|
63 |
add_action( 'admin_menu', array( $this, 'setup_admin_page' ) );
|
64 |
add_action( 'admin_post_ip_geo_block', array( $this, 'admin_ajax_callback' ) );
|
@@ -69,12 +73,12 @@ class IP_Geo_Block_Admin {
|
|
69 |
add_filter( IP_Geo_Block::PLUGIN_NAME . '-bypass-admins', array( $this, 'verify_request' ), 10, 2 );
|
70 |
|
71 |
if ( is_multisite() ) {
|
72 |
-
|
73 |
-
$this->is_network = is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) && current_user_can( 'manage_network_options' );
|
74 |
-
|
75 |
add_action( 'network_admin_menu', array( $this, 'setup_admin_page' ) );
|
76 |
-
|
77 |
-
|
|
|
|
|
78 |
}
|
79 |
|
80 |
// loads a plugin’s translated strings.
|
@@ -161,10 +165,9 @@ class IP_Geo_Block_Admin {
|
|
161 |
*/
|
162 |
public function create_blog( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
|
163 |
defined( 'IP_GEO_BLOCK_DEBUG' ) and IP_GEO_BLOCK_DEBUG and assert( is_main_site(), 'Not main blog.' );
|
164 |
-
|
165 |
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-actv.php';
|
166 |
|
167 |
-
//
|
168 |
$settings = IP_Geo_Block::get_option();
|
169 |
|
170 |
// Switch to the new blog and initialize.
|
@@ -172,7 +175,7 @@ class IP_Geo_Block_Admin {
|
|
172 |
IP_Geo_Block_Activate::activate_blog();
|
173 |
|
174 |
// Copy option from main blog.
|
175 |
-
if ( $this->
|
176 |
update_option( IP_Geo_Block::OPTION_NAME, $settings );
|
177 |
|
178 |
// Restore the main blog.
|
@@ -223,10 +226,10 @@ class IP_Geo_Block_Admin {
|
|
223 |
break;
|
224 |
|
225 |
case 5: /* Site list */
|
226 |
-
// js for google
|
227 |
wp_register_script(
|
228 |
$addon = IP_Geo_Block::PLUGIN_NAME . '-google-chart',
|
229 |
-
apply_filters( 'google-
|
230 |
);
|
231 |
wp_enqueue_script( $addon );
|
232 |
break;
|
@@ -235,7 +238,7 @@ class IP_Geo_Block_Admin {
|
|
235 |
// Google Map in China
|
236 |
$geo = IP_Geo_Block::get_geolocation();
|
237 |
if ( isset( $geo['code'] ) && 'CN' === $geo['code'] ) {
|
238 |
-
add_filter( 'google-
|
239 |
add_filter( 'google-maps', array( $this, 'google_maps_cn' ) );
|
240 |
add_filter( 'google-maps-nokey', array( $this, 'google_maps_nokey_cn' ) );
|
241 |
}
|
@@ -252,10 +255,12 @@ class IP_Geo_Block_Admin {
|
|
252 |
$dependency, IP_Geo_Block::VERSION, $footer
|
253 |
);
|
254 |
}
|
|
|
255 |
wp_enqueue_script( IP_Geo_Block::PLUGIN_NAME . '-whois-js',
|
256 |
plugins_url( $release ? 'js/whois.min.js' : 'js/whois.js', __FILE__ ),
|
257 |
$dependency, IP_Geo_Block::VERSION, $footer
|
258 |
);
|
|
|
259 |
}
|
260 |
|
261 |
// css for option page
|
@@ -283,19 +288,18 @@ class IP_Geo_Block_Admin {
|
|
283 |
'url' => admin_url( 'admin-ajax.php' ),
|
284 |
'nonce' => IP_Geo_Block_Util::create_nonce( $this->get_ajax_action() ),
|
285 |
'msg' => array(
|
286 |
-
/* [ 0] */ __( '
|
287 |
-
/* [ 1] */ __( '
|
288 |
-
/* [ 2] */ __( '
|
289 |
-
/* [ 3] */ __( '
|
290 |
-
/* [ 4] */ __( '
|
291 |
-
/* [ 5] */ __( '
|
292 |
-
/* [ 6] */ __( 'ajax for logged-in user',
|
293 |
-
/* [ 7] */ __( '
|
294 |
-
/* [ 8] */ __( '
|
295 |
-
/* [ 9] */ __( '
|
296 |
-
/* [10] */ __( '
|
297 |
-
/* [11] */ __( '
|
298 |
-
/* [12] */ __( 'An error occurred while executing the ajax command `%s`.', 'ip-geo-block' ),
|
299 |
),
|
300 |
'i18n' => array(
|
301 |
/* [ 0] */ '<div class="ip-geo-block-loading"></div>',
|
@@ -327,9 +331,9 @@ class IP_Geo_Block_Admin {
|
|
327 |
* Google Map in China
|
328 |
*
|
329 |
*/
|
330 |
-
public function
|
331 |
-
public function google_maps_cn ( $url ) { return '//maps.google.cn/maps/api/js';
|
332 |
-
public function google_maps_nokey_cn( $url ) { return '//maps.google.cn/maps';
|
333 |
|
334 |
/**
|
335 |
* Add plugin meta links
|
@@ -412,34 +416,32 @@ class IP_Geo_Block_Admin {
|
|
412 |
*
|
413 |
*/
|
414 |
public function dashboard_url( $network = NULL ) {
|
415 |
-
return ( is_null( $network ) ? $this->
|
416 |
}
|
417 |
|
418 |
/**
|
419 |
* Register the administration menu into the WordPress Dashboard menu.
|
420 |
*
|
421 |
*/
|
422 |
-
private function add_plugin_admin_menu() {
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
// Verify tab number
|
429 |
-
if ( $this->is_network &= $settings['network_wide'] ) {
|
430 |
-
if ( $admin_menu ) {
|
431 |
$this->admin_tab = min( 4, max( 1, $this->admin_tab ) );
|
432 |
-
|
433 |
-
$this->admin_tab = 0;
|
434 |
-
}
|
435 |
} else {
|
436 |
-
|
|
|
|
|
|
|
437 |
}
|
438 |
|
439 |
if ( $admin_menu ) {
|
440 |
// `settings-updated` would be added just after settings updated.
|
441 |
-
if ( ! empty( $_REQUEST['
|
442 |
-
! empty( $_REQUEST['
|
443 |
$this->update_multisite_settings( $settings );
|
444 |
wp_safe_redirect( esc_url_raw( add_query_arg(
|
445 |
array( 'page' => IP_Geo_Block::PLUGIN_NAME ),
|
@@ -458,7 +460,7 @@ class IP_Geo_Block_Admin {
|
|
458 |
);
|
459 |
}
|
460 |
|
461 |
-
elseif ( IP_GEO_BLOCK_NETWORK && $this->
|
462 |
// Add a settings page for this plugin to the Settings menu.
|
463 |
$hook = add_menu_page(
|
464 |
__( 'IP Geo Block', 'ip-geo-block' ),
|
@@ -468,6 +470,7 @@ class IP_Geo_Block_Admin {
|
|
468 |
array( $this, 'display_plugin_admin_page' )
|
469 |
//, 'dashicons-admin-site' // or 'data:image/svg+xml;base64...'
|
470 |
);
|
|
|
471 |
if ( $settings['network_wide'] ) {
|
472 |
add_submenu_page(
|
473 |
IP_Geo_Block::PLUGIN_NAME,
|
@@ -478,6 +481,7 @@ class IP_Geo_Block_Admin {
|
|
478 |
array( $this, 'display_plugin_admin_page' )
|
479 |
);
|
480 |
}
|
|
|
481 |
add_submenu_page(
|
482 |
IP_Geo_Block::PLUGIN_NAME,
|
483 |
__( 'IP Geo Block', 'ip-geo-block' ),
|
@@ -486,6 +490,7 @@ class IP_Geo_Block_Admin {
|
|
486 |
IP_Geo_Block::PLUGIN_NAME . '&tab=5',
|
487 |
array( $this, 'display_plugin_admin_page' )
|
488 |
);
|
|
|
489 |
wp_enqueue_style( IP_Geo_Block::PLUGIN_NAME . '-admin-icons',
|
490 |
plugins_url( ! defined( 'IP_GEO_BLOCK_DEBUG' ) || ! IP_GEO_BLOCK_DEBUG ?
|
491 |
'css/admin-icons.min.css' : 'css/admin-icons.css', __FILE__
|
@@ -503,15 +508,41 @@ class IP_Geo_Block_Admin {
|
|
503 |
* Diagnosis of admin settings.
|
504 |
*
|
505 |
*/
|
506 |
-
private function diagnose_admin_screen() {
|
507 |
-
$settings = IP_Geo_Block::get_option();
|
508 |
$updating = get_transient( IP_Geo_Block::CRON_NAME );
|
509 |
-
$adminurl = $this->dashboard_url( $this->
|
510 |
|
511 |
// Check version and compatibility
|
512 |
if ( version_compare( get_bloginfo( 'version' ), '3.7.0' ) < 0 )
|
513 |
self::add_admin_notice( 'error', __( 'You need WordPress 3.7+.', 'ip-geo-block' ) );
|
514 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
515 |
// Check consistency of matching rule
|
516 |
if ( -1 === (int)$settings['matching_rule'] ) {
|
517 |
if ( FALSE !== $updating ) {
|
@@ -544,8 +575,9 @@ class IP_Geo_Block_Admin {
|
|
544 |
self::add_admin_notice( 'error',
|
545 |
__( 'Once you logout, you will be unable to login again because the number of login attempts reaches the limit.', 'ip-geo-block' ) . ' ' .
|
546 |
sprintf(
|
547 |
-
__( 'Please
|
548 |
-
esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 1 ), $adminurl ) )
|
|
|
549 |
)
|
550 |
);
|
551 |
break;
|
@@ -564,7 +596,7 @@ class IP_Geo_Block_Admin {
|
|
564 |
) :
|
565 |
sprintf(
|
566 |
__( 'Please confirm your local geolocation databases at “%sLocal database settings%s” section and remove your IP address in cache at “%sStatistics in cache%s” section.', 'ip-geo-block' ),
|
567 |
-
'<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' =>
|
568 |
'<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 1, 'sec' => 2 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-2' ) . '">', '</a></strong>'
|
569 |
)
|
570 |
)
|
@@ -581,6 +613,16 @@ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
|
581 |
}
|
582 |
}
|
583 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
584 |
// Check activation of IP Geo Allow
|
585 |
if ( $settings['validation']['timing'] && is_plugin_active( 'ip-geo-allow/index.php' ) ) {
|
586 |
self::add_admin_notice( 'error',
|
@@ -594,12 +636,14 @@ endif;
|
|
594 |
*
|
595 |
*/
|
596 |
public function setup_admin_page() {
|
|
|
|
|
597 |
// Register the administration menu.
|
598 |
-
$this->add_plugin_admin_menu();
|
599 |
|
600 |
// Avoid multiple validation.
|
601 |
-
if ( '
|
602 |
-
$this->diagnose_admin_screen();
|
603 |
|
604 |
// Register settings page only if it is needed.
|
605 |
if ( ( isset( $_GET ['page' ] ) && IP_Geo_Block::PLUGIN_NAME === $_GET ['page' ] ) ||
|
@@ -705,7 +749,7 @@ endif;
|
|
705 |
if ( 'options-general.php' === $GLOBALS['pagenow'] ) {
|
706 |
$action = 'options.php';
|
707 |
unset( $tabs[5] ); // Site List
|
708 |
-
if ( IP_GEO_BLOCK_NETWORK && $this->
|
709 |
if ( $settings['network_wide'] ) {
|
710 |
unset( $tabs[0] ); // Settings
|
711 |
}
|
@@ -720,10 +764,9 @@ endif;
|
|
720 |
// `edit.php` is an action handler for Multisite administration panels.
|
721 |
// `edit.php` ==> do action `network_admin_edit_IP_GEO_BLOCK` ==> `validate_network_settings()`
|
722 |
$action = 'edit.php?action=' . IP_Geo_Block::PLUGIN_NAME;
|
723 |
-
if ( $this->
|
724 |
if ( ! $settings['network_wide'] ) {
|
725 |
-
$
|
726 |
-
unset( $tabs[0] ); // Settings
|
727 |
}
|
728 |
unset( $tabs[1], $tabs[4], $tabs[2], $tabs[3] ); // Statistics, Logs, Search, Attribution
|
729 |
$title .= ' <span class="ip-geo-block-menu-link">';
|
@@ -759,8 +802,9 @@ endif;
|
|
759 |
?>
|
760 |
</form>
|
761 |
<?php if ( 2 === $tab ) { /* Search tab */ ?>
|
762 |
-
<div id="ip-geo-block-
|
763 |
<div id="ip-geo-block-map"></div>
|
|
|
764 |
<?php } elseif ( 3 === $tab ) { /* Attribute tab */
|
765 |
// show attribution (higher priority order)
|
766 |
$tab = array();
|
@@ -771,7 +815,7 @@ endif;
|
|
771 |
}
|
772 |
echo '<p>', implode( '<br />', $tab ), "</p>\n";
|
773 |
echo '<p>', __( 'Thanks for providing these great services for free.', 'ip-geo-block' ), "<br />\n";
|
774 |
-
echo __( '(Most browsers will redirect you to each site <a href="
|
775 |
} ?>
|
776 |
<?php if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ) {
|
777 |
echo '<p>', get_num_queries(), ' queries. ', timer_stop(0), ' seconds. ', memory_get_usage(), " bytes.</p>\n";
|
@@ -876,9 +920,9 @@ endif;
|
|
876 |
case 'select':
|
877 |
case 'select-text':
|
878 |
$desc = '';
|
879 |
-
echo "\n<select id=\"${id}${sub_id}\" name=\"${name}${sub_name}\">\n";
|
880 |
foreach ( $args['list'] as $key => $val ) {
|
881 |
-
echo "\t<option value=\"$key\"",
|
882 |
if ( isset( $args['desc'][ $key ] ) ) {
|
883 |
echo ' data-desc="', $args['desc'][ $key ], '"';
|
884 |
$key === $args['value'] and $desc = $args['desc'][ $key ];
|
@@ -933,10 +977,10 @@ endif;
|
|
933 |
*
|
934 |
* @param array $input The values to be validated.
|
935 |
*
|
936 |
-
* @link
|
937 |
-
* @link
|
938 |
-
* @link
|
939 |
-
* @link
|
940 |
* @link https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php
|
941 |
*/
|
942 |
public function sanitize_options( $input ) {
|
@@ -990,10 +1034,6 @@ endif;
|
|
990 |
isset( $input[ $key ][ $provider ] ) ? sanitize_text_field( $input[ $key ][ $provider ] ) : '';
|
991 |
}
|
992 |
}
|
993 |
-
|
994 |
-
// Check providers setting
|
995 |
-
if ( $error = IP_Geo_Block_Provider::diag_providers( $output[ $key ] ) )
|
996 |
-
self::add_admin_notice( 'error', $error );
|
997 |
break;
|
998 |
|
999 |
case 'comment':
|
@@ -1117,6 +1157,9 @@ endif;
|
|
1117 |
$output['public'][ $key ] = is_array( $default['public'][ $key ] ) ? array() : FALSE;
|
1118 |
}
|
1119 |
|
|
|
|
|
|
|
1120 |
// 3.0.4 AS number, 3.0.6 Auto updating of DB files, 3.0.8 Geolite2
|
1121 |
$output['Maxmind']['use_asn'] = $output['Geolite2']['use_asn'] = $output['update']['auto'] = FALSE;
|
1122 |
|
@@ -1218,10 +1261,7 @@ endif;
|
|
1218 |
// expiration time [days]
|
1219 |
if ( version_compare( $output['version'], '3.0.13' ) < 0 )
|
1220 |
$output['validation']['explogs'] /= DAY_IN_SECONDS;
|
1221 |
-
$output['validation']['explogs'] = min( 365, max( 1, $output['validation']['explogs'] ) );
|
1222 |
-
|
1223 |
-
// reset the version number
|
1224 |
-
$output['version'] = $default['version'];
|
1225 |
|
1226 |
return $output;
|
1227 |
}
|
@@ -1229,8 +1269,8 @@ endif;
|
|
1229 |
/**
|
1230 |
* A fallback function of array_replace_recursive() before PHP 5.3.
|
1231 |
*
|
1232 |
-
* @link
|
1233 |
-
* @link
|
1234 |
*/
|
1235 |
public function array_replace_recursive() {
|
1236 |
if ( function_exists( 'array_replace_recursive' ) ) {
|
@@ -1372,6 +1412,7 @@ endif;
|
|
1372 |
$this->dashboard_url( ! empty( $_POST[ $option ]['network_wide'] ) )
|
1373 |
)
|
1374 |
) );
|
|
|
1375 |
exit;
|
1376 |
}
|
1377 |
|
@@ -1399,16 +1440,16 @@ endif;
|
|
1399 |
/**
|
1400 |
* Ajax callback function
|
1401 |
*
|
1402 |
-
* @link
|
1403 |
-
* @link
|
1404 |
-
* @link
|
1405 |
*/
|
1406 |
public function admin_ajax_callback() {
|
|
|
|
|
1407 |
// Check request origin, nonce, capability.
|
1408 |
$this->check_admin_post( TRUE );
|
1409 |
|
1410 |
-
require_once IP_GEO_BLOCK_PATH . 'admin/includes/class-admin-ajax.php';
|
1411 |
-
|
1412 |
// `$which` and `$cmd` should be restricted by whitelist in each function
|
1413 |
$settings = IP_Geo_Block::get_option();
|
1414 |
$which = isset( $_POST['which'] ) ? $_POST['which'] : NULL;
|
@@ -1421,7 +1462,10 @@ endif;
|
|
1421 |
break;
|
1422 |
|
1423 |
case 'search': // Get geolocation by IP
|
1424 |
-
$res =
|
|
|
|
|
|
|
1425 |
break;
|
1426 |
|
1427 |
case 'scan-code': // Fetch providers to get country code
|
@@ -1483,6 +1527,14 @@ endif;
|
|
1483 |
}
|
1484 |
break;
|
1485 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1486 |
case 'show-info': // Show system and debug information
|
1487 |
$res = IP_Geo_Block_Admin_Ajax::get_wp_info();
|
1488 |
break;
|
@@ -1523,9 +1575,9 @@ endif;
|
|
1523 |
foreach ( array_unique( (array)$which[ $src ] ) as $val ) {
|
1524 |
// replace anonymized IP address with CIDR (IPv4:256, IPv6:4096)
|
1525 |
$val = preg_replace(
|
1526 |
-
array( '
|
1527 |
-
array( '.0/24',
|
1528 |
-
$val
|
1529 |
);
|
1530 |
if ( ( filter_var( preg_replace( '/\/\d+$/', '', $val ), FILTER_VALIDATE_IP ) || preg_match( '/^AS\d+$/', $val ) ) &&
|
1531 |
( FALSE === strpos( $settings['extra_ips'][ $dst ], $val ) ) ) {
|
@@ -1533,14 +1585,12 @@ endif;
|
|
1533 |
}
|
1534 |
}
|
1535 |
|
1536 |
-
if ( $this->
|
1537 |
$this->update_multisite_settings( $settings );
|
1538 |
else
|
1539 |
update_option( IP_Geo_Block::OPTION_NAME, $settings );
|
1540 |
|
1541 |
-
$res = array(
|
1542 |
-
'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME,
|
1543 |
-
);
|
1544 |
break;
|
1545 |
|
1546 |
case 'restore-network': // Restore blocked per target in logs
|
@@ -1577,17 +1627,11 @@ endif;
|
|
1577 |
$res = IP_Geo_Block_Admin_Ajax::find_exceptions( $cmd );
|
1578 |
break;
|
1579 |
|
1580 |
-
case '
|
1581 |
-
case 'delete-table':
|
1582 |
// Need to define `IP_GEO_BLOCK_DEBUG` to true
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
IP_Geo_Block_Logs::delete_tables();
|
1587 |
-
|
1588 |
-
$res = array(
|
1589 |
-
'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME,
|
1590 |
-
);
|
1591 |
break;
|
1592 |
}
|
1593 |
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
define( 'IP_GEO_BLOCK_NETWORK', FALSE );
|
24 |
*
|
25 |
*/
|
26 |
private static $instance = NULL;
|
27 |
+
private $is_network_admin = NULL;
|
28 |
private $admin_tab = 0;
|
|
|
29 |
|
30 |
/**
|
31 |
* Initialize the plugin by loading admin scripts & styles
|
59 |
*
|
60 |
*/
|
61 |
public function admin_init() {
|
62 |
+
// include drop in for admin if it exists
|
63 |
+
$settings = IP_Geo_Block::get_option();
|
64 |
+
file_exists( $file = IP_Geo_Block_Util::unslashit( $settings['api_dir'] ) . '/drop-in-admin.php' ) and include( $file );
|
65 |
+
|
66 |
// Add the options page and menu item.
|
67 |
add_action( 'admin_menu', array( $this, 'setup_admin_page' ) );
|
68 |
add_action( 'admin_post_ip_geo_block', array( $this, 'admin_ajax_callback' ) );
|
73 |
add_filter( IP_Geo_Block::PLUGIN_NAME . '-bypass-admins', array( $this, 'verify_request' ), 10, 2 );
|
74 |
|
75 |
if ( is_multisite() ) {
|
76 |
+
$this->is_network_admin = current_user_can( 'manage_network_options' );
|
|
|
|
|
77 |
add_action( 'network_admin_menu', array( $this, 'setup_admin_page' ) );
|
78 |
+
if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) { // @since 3.0.0
|
79 |
+
add_action( 'wpmu_new_blog', array( $this, 'create_blog' ), 10, 6 ); // on creating a new blog @since MU
|
80 |
+
add_action( 'delete_blog', array( $this, 'delete_blog' ), 10, 2 ); // on deleting an old blog @since 3.0.0
|
81 |
+
}
|
82 |
}
|
83 |
|
84 |
// loads a plugin’s translated strings.
|
165 |
*/
|
166 |
public function create_blog( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
|
167 |
defined( 'IP_GEO_BLOCK_DEBUG' ) and IP_GEO_BLOCK_DEBUG and assert( is_main_site(), 'Not main blog.' );
|
|
|
168 |
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-actv.php';
|
169 |
|
170 |
+
// get options on main blog
|
171 |
$settings = IP_Geo_Block::get_option();
|
172 |
|
173 |
// Switch to the new blog and initialize.
|
175 |
IP_Geo_Block_Activate::activate_blog();
|
176 |
|
177 |
// Copy option from main blog.
|
178 |
+
if ( $this->is_network_admin && $settings['network_wide'] )
|
179 |
update_option( IP_Geo_Block::OPTION_NAME, $settings );
|
180 |
|
181 |
// Restore the main blog.
|
226 |
break;
|
227 |
|
228 |
case 5: /* Site list */
|
229 |
+
// js for google charts
|
230 |
wp_register_script(
|
231 |
$addon = IP_Geo_Block::PLUGIN_NAME . '-google-chart',
|
232 |
+
apply_filters( 'google-charts', 'https://www.gstatic.com/charts/loader.js' ), array(), NULL, $footer
|
233 |
);
|
234 |
wp_enqueue_script( $addon );
|
235 |
break;
|
238 |
// Google Map in China
|
239 |
$geo = IP_Geo_Block::get_geolocation();
|
240 |
if ( isset( $geo['code'] ) && 'CN' === $geo['code'] ) {
|
241 |
+
add_filter( 'google-charts', array( $this, 'google_charts_cn' ) );
|
242 |
add_filter( 'google-maps', array( $this, 'google_maps_cn' ) );
|
243 |
add_filter( 'google-maps-nokey', array( $this, 'google_maps_nokey_cn' ) );
|
244 |
}
|
255 |
$dependency, IP_Geo_Block::VERSION, $footer
|
256 |
);
|
257 |
}
|
258 |
+
|
259 |
wp_enqueue_script( IP_Geo_Block::PLUGIN_NAME . '-whois-js',
|
260 |
plugins_url( $release ? 'js/whois.min.js' : 'js/whois.js', __FILE__ ),
|
261 |
$dependency, IP_Geo_Block::VERSION, $footer
|
262 |
);
|
263 |
+
break;
|
264 |
}
|
265 |
|
266 |
// css for option page
|
288 |
'url' => admin_url( 'admin-ajax.php' ),
|
289 |
'nonce' => IP_Geo_Block_Util::create_nonce( $this->get_ajax_action() ),
|
290 |
'msg' => array(
|
291 |
+
/* [ 0] */ __( 'Are you sure ?', 'ip-geo-block' ),
|
292 |
+
/* [ 1] */ __( 'Open a new window', 'ip-geo-block' ),
|
293 |
+
/* [ 2] */ __( 'Generate new link', 'ip-geo-block' ),
|
294 |
+
/* [ 3] */ __( 'Delete current link', 'ip-geo-block' ),
|
295 |
+
/* [ 4] */ __( 'Please add the following link to favorites / bookmarks in your browser : ', 'ip-geo-block' ),
|
296 |
+
/* [ 5] */ __( 'ajax for logged-in user', 'ip-geo-block' ),
|
297 |
+
/* [ 6] */ __( 'ajax for non logged-in user', 'ip-geo-block' ),
|
298 |
+
/* [ 7] */ __( '[Found: %d]', 'ip-geo-block' ),
|
299 |
+
/* [ 8] */ __( 'Find and verify `%s` on “Logs” tab.', 'ip-geo-block' ),
|
300 |
+
/* [ 9] */ __( 'This feature is available with HTML5 compliant browsers.', 'ip-geo-block' ),
|
301 |
+
/* [10] */ __( 'The selected row cannot be found in the table.', 'ip-geo-block' ),
|
302 |
+
/* [11] */ __( 'An error occurred while executing the ajax command `%s`.', 'ip-geo-block' ),
|
|
|
303 |
),
|
304 |
'i18n' => array(
|
305 |
/* [ 0] */ '<div class="ip-geo-block-loading"></div>',
|
331 |
* Google Map in China
|
332 |
*
|
333 |
*/
|
334 |
+
public function google_charts_cn ( $url ) { return 'https://www.gstatic.cn/charts/loader.js'; }
|
335 |
+
public function google_maps_cn ( $url ) { return '//maps.google.cn/maps/api/js'; }
|
336 |
+
public function google_maps_nokey_cn( $url ) { return '//maps.google.cn/maps'; }
|
337 |
|
338 |
/**
|
339 |
* Add plugin meta links
|
416 |
*
|
417 |
*/
|
418 |
public function dashboard_url( $network = NULL ) {
|
419 |
+
return ( is_null( $network ) ? $this->is_network_admin : $network ) ? network_admin_url( 'admin.php' /*'settings.php'*/ ) : admin_url( 'options-general.php' );
|
420 |
}
|
421 |
|
422 |
/**
|
423 |
* Register the administration menu into the WordPress Dashboard menu.
|
424 |
*
|
425 |
*/
|
426 |
+
private function add_plugin_admin_menu( $settings ) {
|
427 |
+
// Control tab number
|
428 |
+
// `admin_menu` or `network_admin_menu` @since: 2.5
|
429 |
+
if ( $admin_menu = ( 'admin_menu' === current_filter() ) ) {
|
430 |
+
if ( $this->is_network_admin && $settings['network_wide'] )
|
|
|
|
|
|
|
|
|
431 |
$this->admin_tab = min( 4, max( 1, $this->admin_tab ) );
|
432 |
+
else
|
433 |
+
$this->admin_tab = min( 4, max( 0, $this->admin_tab ) );
|
|
|
434 |
} else {
|
435 |
+
if ( $this->is_network_admin && $settings['network_wide'] )
|
436 |
+
$this->admin_tab = in_array( $this->admin_tab, array( 0, 5 ), TRUE ) ? $this->admin_tab : 0;
|
437 |
+
else
|
438 |
+
$this->admin_tab = 5;
|
439 |
}
|
440 |
|
441 |
if ( $admin_menu ) {
|
442 |
// `settings-updated` would be added just after settings updated.
|
443 |
+
if ( ! empty( $_REQUEST['page'] ) && IP_Geo_Block::PLUGIN_NAME === $_REQUEST['page'] &&
|
444 |
+
! empty( $_REQUEST['settings-updated'] ) && $this->is_network_admin && $settings['network_wide'] ) {
|
445 |
$this->update_multisite_settings( $settings );
|
446 |
wp_safe_redirect( esc_url_raw( add_query_arg(
|
447 |
array( 'page' => IP_Geo_Block::PLUGIN_NAME ),
|
460 |
);
|
461 |
}
|
462 |
|
463 |
+
elseif ( IP_GEO_BLOCK_NETWORK && $this->is_network_admin ) {
|
464 |
// Add a settings page for this plugin to the Settings menu.
|
465 |
$hook = add_menu_page(
|
466 |
__( 'IP Geo Block', 'ip-geo-block' ),
|
470 |
array( $this, 'display_plugin_admin_page' )
|
471 |
//, 'dashicons-admin-site' // or 'data:image/svg+xml;base64...'
|
472 |
);
|
473 |
+
|
474 |
if ( $settings['network_wide'] ) {
|
475 |
add_submenu_page(
|
476 |
IP_Geo_Block::PLUGIN_NAME,
|
481 |
array( $this, 'display_plugin_admin_page' )
|
482 |
);
|
483 |
}
|
484 |
+
|
485 |
add_submenu_page(
|
486 |
IP_Geo_Block::PLUGIN_NAME,
|
487 |
__( 'IP Geo Block', 'ip-geo-block' ),
|
490 |
IP_Geo_Block::PLUGIN_NAME . '&tab=5',
|
491 |
array( $this, 'display_plugin_admin_page' )
|
492 |
);
|
493 |
+
|
494 |
wp_enqueue_style( IP_Geo_Block::PLUGIN_NAME . '-admin-icons',
|
495 |
plugins_url( ! defined( 'IP_GEO_BLOCK_DEBUG' ) || ! IP_GEO_BLOCK_DEBUG ?
|
496 |
'css/admin-icons.min.css' : 'css/admin-icons.css', __FILE__
|
508 |
* Diagnosis of admin settings.
|
509 |
*
|
510 |
*/
|
511 |
+
private function diagnose_admin_screen( $settings ) {
|
|
|
512 |
$updating = get_transient( IP_Geo_Block::CRON_NAME );
|
513 |
+
$adminurl = $this->dashboard_url( $this->is_network_admin && $settings['network_wide'] );
|
514 |
|
515 |
// Check version and compatibility
|
516 |
if ( version_compare( get_bloginfo( 'version' ), '3.7.0' ) < 0 )
|
517 |
self::add_admin_notice( 'error', __( 'You need WordPress 3.7+.', 'ip-geo-block' ) );
|
518 |
|
519 |
+
if ( ! $settings['api_dir'] || ! file_exists( $settings['api_dir'] ) ) {
|
520 |
+
$this->add_admin_notice( 'error', sprintf(
|
521 |
+
__( 'Can not load Geolocation API libraries from <code>%s</code>. It seems to have failed downloading <a rel="noreferrer" href="https://github.com/tokkonopapa/WordPress-IP-Geo-API/archive/master.zip" title="Download the contents of tokkonopapa/WordPress-IP-Geo-API as a zip file">ZIP file</a> from <a rel="noreferrer" href="https://github.com/tokkonopapa/WordPress-IP-Geo-API" title="tokkonopapa/WordPress-IP-Geo-API - GitHub">WordPress-IP-Geo-API</a>. Please install <code>ip-geo-api</code> with write permission according to <a rel="noreferrer" href="https://www.ipgeoblock.com/codex/how-to-fix-permission-troubles.html" title="How can I fix permission troubles? | IP Geo Block">this instruction</a>.', 'ip-geo-block' ),
|
522 |
+
apply_filters( 'ip-geo-block-api-dir', $settings['api_dir'] ? $settings['api_dir'] : basename( WP_CONTENT_DIR ) )
|
523 |
+
) );
|
524 |
+
}
|
525 |
+
|
526 |
+
else {
|
527 |
+
$providers = IP_Geo_Block_Provider::get_valid_providers( $settings, FALSE, FALSE, TRUE );
|
528 |
+
if ( empty( $providers ) ) {
|
529 |
+
$this->add_admin_notice( 'error', sprintf(
|
530 |
+
__( 'You should select at least one API at <a href="%s">Geolocation API settings</a>. Otherwise <strong>you\'ll be blocked</strong> after the cache expires.', 'ip-geo-block' ),
|
531 |
+
esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 4 ), $adminurl ) ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-4'
|
532 |
+
) );
|
533 |
+
}
|
534 |
+
|
535 |
+
else {
|
536 |
+
$providers = IP_Geo_Block_Provider::get_addons( $settings['providers'] );
|
537 |
+
if ( empty( $providers ) ) {
|
538 |
+
$this->add_admin_notice( 'error', sprintf(
|
539 |
+
__( 'You should select at least one API for local database at <a href="%s">Geolocation API settings</a>. Otherwise access to the external API may slow down the site.', 'ip-geo-block' ),
|
540 |
+
esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 4 ), $adminurl ) ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-4'
|
541 |
+
) );
|
542 |
+
}
|
543 |
+
}
|
544 |
+
}
|
545 |
+
|
546 |
// Check consistency of matching rule
|
547 |
if ( -1 === (int)$settings['matching_rule'] ) {
|
548 |
if ( FALSE !== $updating ) {
|
575 |
self::add_admin_notice( 'error',
|
576 |
__( 'Once you logout, you will be unable to login again because the number of login attempts reaches the limit.', 'ip-geo-block' ) . ' ' .
|
577 |
sprintf(
|
578 |
+
__( 'Please remove your IP address in “%1$sStatistics in IP address cache%2$s” on “%3$sStatistics%4$s” tab to prevent locking yourself out.', 'ip-geo-block' ),
|
579 |
+
'<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 1, 'sec' => 2 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-2' ) . '">', '</a></strong>',
|
580 |
+
'<strong>', '</strong>'
|
581 |
)
|
582 |
);
|
583 |
break;
|
596 |
) :
|
597 |
sprintf(
|
598 |
__( 'Please confirm your local geolocation databases at “%sLocal database settings%s” section and remove your IP address in cache at “%sStatistics in cache%s” section.', 'ip-geo-block' ),
|
599 |
+
'<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 5 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-5' ) . '">', '</a></strong>',
|
600 |
'<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 1, 'sec' => 2 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-2' ) . '">', '</a></strong>'
|
601 |
)
|
602 |
)
|
613 |
}
|
614 |
}
|
615 |
endif;
|
616 |
+
// Check consistency of emergency login link
|
617 |
+
if ( isset( $settings['login_link'] ) && $settings['login_link']['link'] && ! IP_Geo_Block_Util::verify_link( $settings['login_link']['link'], $settings['login_link']['hash'] ) ) {
|
618 |
+
self::add_admin_notice( 'error',
|
619 |
+
sprintf(
|
620 |
+
__( 'Emergency login link is outdated. Please delete it once and generate again at “%sPlugin settings%s” section. Also do not forget to update favorites / bookmarks in your browser.', 'ip-geo-block' ),
|
621 |
+
'<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 7 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-7' ) . '">', '</a></strong>'
|
622 |
+
)
|
623 |
+
);
|
624 |
+
}
|
625 |
+
|
626 |
// Check activation of IP Geo Allow
|
627 |
if ( $settings['validation']['timing'] && is_plugin_active( 'ip-geo-allow/index.php' ) ) {
|
628 |
self::add_admin_notice( 'error',
|
636 |
*
|
637 |
*/
|
638 |
public function setup_admin_page() {
|
639 |
+
$settings = IP_Geo_Block::get_option();
|
640 |
+
|
641 |
// Register the administration menu.
|
642 |
+
$this->add_plugin_admin_menu( $settings );
|
643 |
|
644 |
// Avoid multiple validation.
|
645 |
+
if ( 'GET' === $_SERVER['REQUEST_METHOD'] )
|
646 |
+
$this->diagnose_admin_screen( $settings );
|
647 |
|
648 |
// Register settings page only if it is needed.
|
649 |
if ( ( isset( $_GET ['page' ] ) && IP_Geo_Block::PLUGIN_NAME === $_GET ['page' ] ) ||
|
749 |
if ( 'options-general.php' === $GLOBALS['pagenow'] ) {
|
750 |
$action = 'options.php';
|
751 |
unset( $tabs[5] ); // Site List
|
752 |
+
if ( IP_GEO_BLOCK_NETWORK && $this->is_network_admin ) {
|
753 |
if ( $settings['network_wide'] ) {
|
754 |
unset( $tabs[0] ); // Settings
|
755 |
}
|
764 |
// `edit.php` is an action handler for Multisite administration panels.
|
765 |
// `edit.php` ==> do action `network_admin_edit_IP_GEO_BLOCK` ==> `validate_network_settings()`
|
766 |
$action = 'edit.php?action=' . IP_Geo_Block::PLUGIN_NAME;
|
767 |
+
if ( $this->is_network_admin ) {
|
768 |
if ( ! $settings['network_wide'] ) {
|
769 |
+
unset( $tabs[0] ); // remove Settings
|
|
|
770 |
}
|
771 |
unset( $tabs[1], $tabs[4], $tabs[2], $tabs[3] ); // Statistics, Logs, Search, Attribution
|
772 |
$title .= ' <span class="ip-geo-block-menu-link">';
|
802 |
?>
|
803 |
</form>
|
804 |
<?php if ( 2 === $tab ) { /* Search tab */ ?>
|
805 |
+
<div id="ip-geo-block-apis"></div>
|
806 |
<div id="ip-geo-block-map"></div>
|
807 |
+
<div id="ip-geo-block-whois"></div>
|
808 |
<?php } elseif ( 3 === $tab ) { /* Attribute tab */
|
809 |
// show attribution (higher priority order)
|
810 |
$tab = array();
|
815 |
}
|
816 |
echo '<p>', implode( '<br />', $tab ), "</p>\n";
|
817 |
echo '<p>', __( 'Thanks for providing these great services for free.', 'ip-geo-block' ), "<br />\n";
|
818 |
+
echo __( '(Most browsers will redirect you to each site <a href="https://www.ipgeoblock.com/etc/referer.html" title="Referer Checker">without referrer when you click the link</a>.)', 'ip-geo-block' ), "</p>\n";
|
819 |
} ?>
|
820 |
<?php if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ) {
|
821 |
echo '<p>', get_num_queries(), ' queries. ', timer_stop(0), ' seconds. ', memory_get_usage(), " bytes.</p>\n";
|
920 |
case 'select':
|
921 |
case 'select-text':
|
922 |
$desc = '';
|
923 |
+
echo "\n<select id=\"${id}${sub_id}\" name=\"${name}${sub_name}\" ", (isset( $args['attr'] ) ? esc_attr( $args['attr'] ) : ''), ">\n";
|
924 |
foreach ( $args['list'] as $key => $val ) {
|
925 |
+
echo "\t<option value=\"$key\"", NULL === $val ? ' selected disabled' : ( is_array( $args['value'] ) ? selected( in_array( $key, $args['value'] ), TRUE, FALSE ) : selected( $args['value'], $key, FALSE ) );
|
926 |
if ( isset( $args['desc'][ $key ] ) ) {
|
927 |
echo ' data-desc="', $args['desc'][ $key ], '"';
|
928 |
$key === $args['value'] and $desc = $args['desc'][ $key ];
|
977 |
*
|
978 |
* @param array $input The values to be validated.
|
979 |
*
|
980 |
+
* @link https://codex.wordpress.org/Validating_Sanitizing_and_Escaping_User_Data
|
981 |
+
* @link https://codex.wordpress.org/Function_Reference/sanitize_option
|
982 |
+
* @link https://codex.wordpress.org/Function_Reference/sanitize_text_field
|
983 |
+
* @link https://codex.wordpress.org/Plugin_API/Filter_Reference/sanitize_option_$option
|
984 |
* @link https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php
|
985 |
*/
|
986 |
public function sanitize_options( $input ) {
|
1034 |
isset( $input[ $key ][ $provider ] ) ? sanitize_text_field( $input[ $key ][ $provider ] ) : '';
|
1035 |
}
|
1036 |
}
|
|
|
|
|
|
|
|
|
1037 |
break;
|
1038 |
|
1039 |
case 'comment':
|
1157 |
$output['public'][ $key ] = is_array( $default['public'][ $key ] ) ? array() : FALSE;
|
1158 |
}
|
1159 |
|
1160 |
+
// disabled in case IP address cache is disabled
|
1161 |
+
empty( $output['cache_hold'] ) and $output['login_fails'] = -1;
|
1162 |
+
|
1163 |
// 3.0.4 AS number, 3.0.6 Auto updating of DB files, 3.0.8 Geolite2
|
1164 |
$output['Maxmind']['use_asn'] = $output['Geolite2']['use_asn'] = $output['update']['auto'] = FALSE;
|
1165 |
|
1261 |
// expiration time [days]
|
1262 |
if ( version_compare( $output['version'], '3.0.13' ) < 0 )
|
1263 |
$output['validation']['explogs'] /= DAY_IN_SECONDS;
|
1264 |
+
$output['validation']['explogs'] = min( 365, max( 1, (int)$output['validation']['explogs'] ) );
|
|
|
|
|
|
|
1265 |
|
1266 |
return $output;
|
1267 |
}
|
1269 |
/**
|
1270 |
* A fallback function of array_replace_recursive() before PHP 5.3.
|
1271 |
*
|
1272 |
+
* @link https://php.net/manual/en/function.array-replace-recursive.php#92574
|
1273 |
+
* @link https://php.net/manual/en/function.array-replace-recursive.php#109390
|
1274 |
*/
|
1275 |
public function array_replace_recursive() {
|
1276 |
if ( function_exists( 'array_replace_recursive' ) ) {
|
1412 |
$this->dashboard_url( ! empty( $_POST[ $option ]['network_wide'] ) )
|
1413 |
)
|
1414 |
) );
|
1415 |
+
|
1416 |
exit;
|
1417 |
}
|
1418 |
|
1440 |
/**
|
1441 |
* Ajax callback function
|
1442 |
*
|
1443 |
+
* @link https://codex.wordpress.org/AJAX_in_Plugins
|
1444 |
+
* @link https://codex.wordpress.org/Function_Reference/check_ajax_referer
|
1445 |
+
* @link https://core.trac.wordpress.org/browser/trunk/wp-admin/admin-ajax.php
|
1446 |
*/
|
1447 |
public function admin_ajax_callback() {
|
1448 |
+
require_once IP_GEO_BLOCK_PATH . 'admin/includes/class-admin-ajax.php';
|
1449 |
+
|
1450 |
// Check request origin, nonce, capability.
|
1451 |
$this->check_admin_post( TRUE );
|
1452 |
|
|
|
|
|
1453 |
// `$which` and `$cmd` should be restricted by whitelist in each function
|
1454 |
$settings = IP_Geo_Block::get_option();
|
1455 |
$which = isset( $_POST['which'] ) ? $_POST['which'] : NULL;
|
1462 |
break;
|
1463 |
|
1464 |
case 'search': // Get geolocation by IP
|
1465 |
+
$res = array();
|
1466 |
+
foreach ( (array)$which as $cmd ) {
|
1467 |
+
$res[ $cmd ] = IP_Geo_Block_Admin_Ajax::search_ip( $cmd );
|
1468 |
+
}
|
1469 |
break;
|
1470 |
|
1471 |
case 'scan-code': // Fetch providers to get country code
|
1527 |
}
|
1528 |
break;
|
1529 |
|
1530 |
+
case 'generate-link': // Generate new link
|
1531 |
+
$res = array( 'link' => IP_Geo_Block_Util::generate_link() );
|
1532 |
+
break;
|
1533 |
+
|
1534 |
+
case 'delete-link': // Delete existing link
|
1535 |
+
IP_Geo_Block_Util::delete_link();
|
1536 |
+
break;
|
1537 |
+
|
1538 |
case 'show-info': // Show system and debug information
|
1539 |
$res = IP_Geo_Block_Admin_Ajax::get_wp_info();
|
1540 |
break;
|
1575 |
foreach ( array_unique( (array)$which[ $src ] ) as $val ) {
|
1576 |
// replace anonymized IP address with CIDR (IPv4:256, IPv6:4096)
|
1577 |
$val = preg_replace(
|
1578 |
+
array( '/\.\*\*\*$/', '/:\w*\*\*\*$/', '/(::.*)::\/116$/' ),
|
1579 |
+
array( '.0/24', '::/116', '$1/116' ),
|
1580 |
+
trim( $val )
|
1581 |
);
|
1582 |
if ( ( filter_var( preg_replace( '/\/\d+$/', '', $val ), FILTER_VALIDATE_IP ) || preg_match( '/^AS\d+$/', $val ) ) &&
|
1583 |
( FALSE === strpos( $settings['extra_ips'][ $dst ], $val ) ) ) {
|
1585 |
}
|
1586 |
}
|
1587 |
|
1588 |
+
if ( $this->is_network_admin && $settings['network_wide'] )
|
1589 |
$this->update_multisite_settings( $settings );
|
1590 |
else
|
1591 |
update_option( IP_Geo_Block::OPTION_NAME, $settings );
|
1592 |
|
1593 |
+
$res = array( 'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME );
|
|
|
|
|
1594 |
break;
|
1595 |
|
1596 |
case 'restore-network': // Restore blocked per target in logs
|
1627 |
$res = IP_Geo_Block_Admin_Ajax::find_exceptions( $cmd );
|
1628 |
break;
|
1629 |
|
1630 |
+
case 'init-table':
|
|
|
1631 |
// Need to define `IP_GEO_BLOCK_DEBUG` to true
|
1632 |
+
IP_Geo_Block_Logs::delete_tables();
|
1633 |
+
IP_Geo_Block_Logs::create_tables();
|
1634 |
+
$res = array( 'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME );
|
|
|
|
|
|
|
|
|
|
|
1635 |
break;
|
1636 |
}
|
1637 |
|
admin/css/admin.css
CHANGED
@@ -213,22 +213,39 @@ input[id*="ip_geo_block_settings_providers"] + label {
|
|
213 |
color: #2786C2;
|
214 |
display: inline-block;
|
215 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
|
217 |
/* Loading image */
|
218 |
.ip-geo-block-loading,
|
219 |
#ip-geo-block-live-loading {
|
|
|
|
|
220 |
background-size: 16px 16px;
|
221 |
background-position: center center;
|
222 |
background-repeat: no-repeat;
|
223 |
-
height: 16px;
|
224 |
-
width: 16px;
|
225 |
margin-left: 1em;
|
226 |
margin-top: 0.2em;
|
227 |
display: inline-block;
|
228 |
vertical-align: top;
|
229 |
}
|
230 |
.ip-geo-block-loading {
|
231 |
-
background-image: url(data:image/gif;base64,
|
232 |
}
|
233 |
|
234 |
/* Google Map infomation window */
|
@@ -236,6 +253,19 @@ input[id*="ip_geo_block_settings_providers"] + label {
|
|
236 |
height: 400px;
|
237 |
margin: 1em auto;
|
238 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
.gm-style-iw {
|
240 |
width: 18em;
|
241 |
height: auto !important;
|
@@ -333,16 +363,6 @@ table.ip-geo-block-table td:first-child {
|
|
333 |
word-break: normal;
|
334 |
white-space: pre;
|
335 |
}
|
336 |
-
#ip-geo-block-preferred {
|
337 |
-
color: #fff;
|
338 |
-
background: #00838f !important;
|
339 |
-
border-color: #00707a !important;
|
340 |
-
text-shadow: none; /* for WordPress 3.7.21 */
|
341 |
-
}
|
342 |
-
#ip-geo-block-preferred:hover {
|
343 |
-
background-color: #00919e !important;
|
344 |
-
border-color: #00525a !important;
|
345 |
-
}
|
346 |
#ip-geo-block-back-to-top {
|
347 |
margin:0;
|
348 |
text-align:right;
|
@@ -667,11 +687,64 @@ table.collapsed > tbody > tr.child > td.child > ul li span.dtr-data {
|
|
667 |
margin-right: 0.3em;
|
668 |
}
|
669 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
670 |
/* Pagenation */
|
671 |
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
|
672 |
float: none;
|
673 |
text-align: center;
|
674 |
margin-bottom: 1em;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
675 |
}
|
676 |
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate span.ellipsis,
|
677 |
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button,
|
@@ -863,7 +936,7 @@ mark {
|
|
863 |
display: block;
|
864 |
height: 1em;
|
865 |
width: 1em;
|
866 |
-
background:
|
867 |
border-radius: 50%;
|
868 |
position: absolute;
|
869 |
top: 0;
|
@@ -895,8 +968,8 @@ mark {
|
|
895 |
transform: rotate(180deg);
|
896 |
}
|
897 |
.ip-geo-block-live-timer > div:last-child:before {
|
898 |
-
/* older webkit seems buggy with zero so use 0.00001 */
|
899 |
-
transform: rotate(
|
900 |
animation: 30s spin-timer linear 30s forwards;
|
901 |
}
|
902 |
@keyframes spin-timer {
|
@@ -906,7 +979,7 @@ mark {
|
|
906 |
|
907 |
/* sub items in settings */
|
908 |
.ip-geo-block-subitem {
|
909 |
-
margin-left:1.7em
|
910 |
}
|
911 |
.ip-geo-block-subitem:before {
|
912 |
content: "\00bb"; /* » */
|
@@ -916,6 +989,10 @@ mark {
|
|
916 |
.ip-geo-block-subitem dfn {
|
917 |
vertical-align: middle;
|
918 |
}
|
|
|
|
|
|
|
|
|
919 |
|
920 |
/* placeholder */
|
921 |
:placeholder-shown { color: #888; }
|
213 |
color: #2786C2;
|
214 |
display: inline-block;
|
215 |
}
|
216 |
+
.ip-geo-block-primary {
|
217 |
+
color: #fff !important;;
|
218 |
+
background: #00838f !important;
|
219 |
+
border-color: #00707a !important;
|
220 |
+
text-shadow: none; /* for WordPress 3.7.21 */
|
221 |
+
}
|
222 |
+
.ip-geo-block-primary:hover {
|
223 |
+
background-color: #00919e !important;
|
224 |
+
border-color: #00525a !important;
|
225 |
+
}
|
226 |
+
ul#ip-geo-block-logs-preset {
|
227 |
+
margin: 0.25em 0;
|
228 |
+
}
|
229 |
+
ul#ip-geo-block-logs-preset li {
|
230 |
+
float: left;
|
231 |
+
margin-right: 1em;
|
232 |
+
}
|
233 |
|
234 |
/* Loading image */
|
235 |
.ip-geo-block-loading,
|
236 |
#ip-geo-block-live-loading {
|
237 |
+
height: 16px;
|
238 |
+
width: 16px;
|
239 |
background-size: 16px 16px;
|
240 |
background-position: center center;
|
241 |
background-repeat: no-repeat;
|
|
|
|
|
242 |
margin-left: 1em;
|
243 |
margin-top: 0.2em;
|
244 |
display: inline-block;
|
245 |
vertical-align: top;
|
246 |
}
|
247 |
.ip-geo-block-loading {
|
248 |
+
background-image: url(data:image/gif;base64,R0lGODlhEAAQAPYCAKqqqsbGxlZWVsrKyvr6+ubm5tDQ0K6urmZmZmJiYuzs7IaGhvT09JycnLq6us7Ozurq6o6OjtbW1tra2vDw8CgoKCYmJvz8/NLS0kJCQlJSUqysrPLy8vb29pqamra2tm5ubujo6Kampvj4+IiIiMjIyEhISNzc3OLi4rKysj4+PlBQULi4uJKSkmRkZODg4KKiou7u7iQkJB4eHlpaWhISErCwsHh4eMDAwDIyMi4uLqSkpIKCgr6+vt7e3n5+fggICJCQkAwMDEpKSmBgYHZ2dhgYGBYWFnx8fF5eXk5OTiIiIjAwMIyMjISEhDQ0NJaWltTU1AQEBBwcHGpqaoqKiuTk5CoqKlhYWAoKCtjY2Hp6ehAQEJ6ensLCwkxMTJSUlCwsLAYGBnR0dDg4OFxcXLy8vKCgoA4ODsTExMzMzDw8PERERDY2NqioqHJycrS0tGhoaBQUFEZGRjo6OkBAQICAgHBwcFRUVCAgIGxsbP///wAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgACACwAAAAAEAAQAEAHjIACgoOEhYJsbTGGghcPGIJRbFNNhgQKCheDDkllDQYMHSc4MAcvhTB0aFliggQjmYNEFQ6LAh0+VoIwbFW1GGamhCgfUE5NbgMKtQYLc0a1gjsyR3E2IYwMFASDYDJvtRRWFIJ1TMq1ElqCICpetQoBEoInVCsAhhI2XhyEPUgIIG7waALlwAloCAMBACH5BAkKAAIALAEAAQAOAA4AAAeDgAKCEmBYYRVKJAaCjAcrVzIzRjVoTw2MKRk5Ww4KECkuWTWCE0Rrl4yCTow7bAupsBcCW19psKkjBEQaFLeMHBwINBy+ggoxVQkPxSMFMXBUMMUQPhRWVUU9tyFRLwQCA048cCcjIyFaJQYxjA8NEVBnAClmahCwEANwbjYBJwyMAgEAIfkECQoABQAsAQABAA4ADgAAB4OABYInO29DbC5QUYKMZiBfbCptTBUmIow4LgJBaTExZkVLFTAFKD8JB4yMQUZrBixUXaqqVFwkUG8Ys4wpQiZOWwy7ghBiRk08HcOqblUTy4wlLWbLBCMFCgBdurMjFMoFE24ADxAXFwwKITEEjD5mH2YBDxI+IdeqHCcGAxgv7IwCAQAh+QQJCgAAACwBAAEADgAOAAAHhYAAglYfTVQJSCITgowDVSAISQJKJgkpjA8LWyIGHBQBJCoZBwAQDU44jIxdTxoSAxEfqqpbFWApUCezjA5LWCJdI7uCClNXGyLCwxBHFl4HBcMAKVxfEx8Y0glZCxwlOCjDUkwPACElAygMghftAB6MClpRJygQFB0EuyMKBQUKDPQxCgQAIfkECQoAAAAsAQABAA4ADgAAB4SAAIIKahstTQ0OVoKMJzYeLVU8W29OXowvBztePh0dUTtxVD0AHDgHEoyMKWVvPj4sBqqqLUoiGDgQs4wBJmNqARe7gjEqXxgPwsMxbWw+UQzDAGY6LjEnusNjFmAEBVbRs00zc1EAHRAKHYw2CHIyO4wEHAwjgmJCZDC7F8psC7IEBQIAIfkECQoARwAsAQABAA4ADgAAB4OAR4IMPgMfNg4PCoKMEA84LCkAMB47GIwxBiUTEAQjKD0REQ9HBD4YIYyMATwtBRQnqaqMG0UOEC8ds4wYIEEQBbuMHC4gMYvCRxw0CAwcF8kBGj8EHdDCJCYiRxfXsw0qCROqRDYQECw3ORkpqjpAQjVGMxYrB7MPC0MyFQItEowCAQAh+QQJCgACACwBAAEADgAOAAAHgIACghcUVhIYEigMgowjEC8nUQ8BOGkojAQxITEdAhcxEh9wPoIMFCOMjBMAKTEXHaipjGldDxcEsqkvUAe5sh1NLb6pHTxNbGK9vlE3DU5ZLsNnIA4GbTVVuQcJdpdnS0Z3LAoxXhF4LjiMMBl5FjptKiZ6ZrJRLUkqbCAwJ4yBACH5BAUKAAEALAEAAQAOAA4AAAd/gAGCARcjHDExHASDjAQdHAoFLy8Ugw2MgiMKWhIKAQ9MYpiCEA8YHQtZCaOCJ14vX2g2rAEKZgMyNRC0BCksFUa7rCMANgIzH7QvZw4tMmO0DlAPUV9hHqNeVTC7G2tkTmkUHA8iSFUGgzZlGSYaNC4gTWqYEzA3SQhVH1aDgQA7);
|
249 |
}
|
250 |
|
251 |
/* Google Map infomation window */
|
253 |
height: 400px;
|
254 |
margin: 1em auto;
|
255 |
}
|
256 |
+
#ip-geo-block-apis div.nav-tab-wrapper {
|
257 |
+
padding-top: 0;
|
258 |
+
margin-bottom: 1em;
|
259 |
+
}
|
260 |
+
#ip-geo-block-geoinfo {
|
261 |
+
white-space: normal;
|
262 |
+
word-wrap: break-word;
|
263 |
+
word-break: break-all;
|
264 |
+
}
|
265 |
+
#ip-geo-block-geoinfo ul {
|
266 |
+
margin-top: 0;
|
267 |
+
margin-left: 1em;
|
268 |
+
}
|
269 |
.gm-style-iw {
|
270 |
width: 18em;
|
271 |
height: auto !important;
|
363 |
word-break: normal;
|
364 |
white-space: pre;
|
365 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
#ip-geo-block-back-to-top {
|
367 |
margin:0;
|
368 |
text-align:right;
|
687 |
margin-right: 0.3em;
|
688 |
}
|
689 |
|
690 |
+
/* Length menu */
|
691 |
+
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length {
|
692 |
+
padding-top: 0.15em;
|
693 |
+
margin: 0.5em 0 0 0.3em;
|
694 |
+
position: relative;
|
695 |
+
display: inline-block;
|
696 |
+
}
|
697 |
+
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length:after {
|
698 |
+
content: '';
|
699 |
+
width: 6px;
|
700 |
+
height: 6px;
|
701 |
+
border: 0px;
|
702 |
+
border-bottom: solid 2px #999;
|
703 |
+
border-right: solid 2px #999;
|
704 |
+
-ms-transform: rotate(45deg);
|
705 |
+
-webkit-transform: rotate(45deg);
|
706 |
+
transform: rotate(45deg);
|
707 |
+
position: absolute;
|
708 |
+
top: 50%;
|
709 |
+
right: 10px;
|
710 |
+
margin-top: -4px;
|
711 |
+
}
|
712 |
+
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length select {
|
713 |
+
padding-top: 0;
|
714 |
+
-webkit-appearance: none;
|
715 |
+
-moz-appearance: none;
|
716 |
+
appearance: none;
|
717 |
+
font-size: 13px !important;
|
718 |
+
line-height: 1.4em;
|
719 |
+
width: 100%;
|
720 |
+
height: 2.05em !important;
|
721 |
+
background: transparent;
|
722 |
+
position: relative;
|
723 |
+
z-index: 1;
|
724 |
+
padding: 0.125em 1.5em 0.125em 0.25em;
|
725 |
+
border: 1px solid #ddd;
|
726 |
+
border-radius: 4px;
|
727 |
+
box-shadow: none;
|
728 |
+
}
|
729 |
+
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length select::-ms-expand {
|
730 |
+
display: none;
|
731 |
+
}
|
732 |
+
|
733 |
/* Pagenation */
|
734 |
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
|
735 |
float: none;
|
736 |
text-align: center;
|
737 |
margin-bottom: 1em;
|
738 |
+
margin-top: 0 !important;
|
739 |
+
}
|
740 |
+
@media screen and (min-width:640px) {
|
741 |
+
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length {
|
742 |
+
margin: 0.5em 0 0 0.6em;
|
743 |
+
}
|
744 |
+
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
|
745 |
+
position: relative;
|
746 |
+
left: -2.25em;
|
747 |
+
}
|
748 |
}
|
749 |
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate span.ellipsis,
|
750 |
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button,
|
936 |
display: block;
|
937 |
height: 1em;
|
938 |
width: 1em;
|
939 |
+
background: #0073aa;
|
940 |
border-radius: 50%;
|
941 |
position: absolute;
|
942 |
top: 0;
|
968 |
transform: rotate(180deg);
|
969 |
}
|
970 |
.ip-geo-block-live-timer > div:last-child:before {
|
971 |
+
/* older webkit seems buggy with zero so use 0.00001 if you notice something strange */
|
972 |
+
transform: rotate(0deg);
|
973 |
animation: 30s spin-timer linear 30s forwards;
|
974 |
}
|
975 |
@keyframes spin-timer {
|
979 |
|
980 |
/* sub items in settings */
|
981 |
.ip-geo-block-subitem {
|
982 |
+
margin-left: 1.7em
|
983 |
}
|
984 |
.ip-geo-block-subitem:before {
|
985 |
content: "\00bb"; /* » */
|
989 |
.ip-geo-block-subitem dfn {
|
990 |
vertical-align: middle;
|
991 |
}
|
992 |
+
.ip-geo-block-subitem-parent th,
|
993 |
+
.ip-geo-block-subitem-parent td {
|
994 |
+
padding-top: 0;
|
995 |
+
}
|
996 |
|
997 |
/* placeholder */
|
998 |
:placeholder-shown { color: #888; }
|
admin/css/admin.min.css
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
* Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
|
4 |
* This software is released under the MIT License.
|
5 |
*/
|
6 |
-
dfn{cursor:help;border-bottom:1px dotted #888}.ip-geo-block-icon,svg a,table.ip-geo-block-dataTable>tbody>tr{cursor:pointer}fieldset,legend{padding:0;margin:0;border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}fieldset{min-width:0}legend{display:block;line-height:inherit;width:100%}.panel-body,label{display:inline-block}label{max-width:100%}.panel{border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#f5f5f5}#ip-geo-block-back-to-top a,#ip-geo-block-toggle-sections,.ip-geo-block-help-link a{box-shadow:none}.panel-heading{float:left!important;background:#fff}.panel-default>.panel-heading{border-color:inherit}.panel-body{width:100%;padding:0 1em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.panel-body:after,.panel-body:before{content:" ";display:table}.panel-body:after{clear:both}.ip-geo-block-navi-link{text-align:left}.ip-geo-block-help-link{float:right;font-size:90%;font-weight:400}fieldset label{vertical-align:text-middle}fieldset input[type=checkbox]{margin:1px 2px 0}fieldset.ip-geo-block-field{margin:1em 0}fieldset.ip-geo-block-field h2,fieldset.ip-geo-block-field h3{padding:0;margin:0;font-size:14px!important}fieldset.ip-geo-block-field h4{margin:.75em 0 .5em}fieldset.ip-geo-block-field legend.panel-heading{padding:10px}fieldset.ip-geo-block-field .ip-geo-block-dropdown,fieldset.ip-geo-block-field .ip-geo-block-dropup{cursor:pointer;position:relative;padding-left:1em}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before,fieldset.ip-geo-block-field .ip-geo-block-dropup:before{content:'';height:0;width:0;border:.4em solid transparent;position:absolute}fieldset.ip-geo-block-field .ip-geo-block-dropup:before{border-left:.4em solid #555;left:2px;top:18%}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before{border-top:.4em solid #555;left:-2px;top:38%}fieldset.ip-geo-block-field .form-table .ip-geo-block-dropdown,fieldset.ip-geo-block-field .form-table .ip-geo-block-dropup{margin-top:.75em}fieldset.ip-geo-block-field ul.ip-geo-block-dropup:before{top:.25em}fieldset.ip-geo-block-field ul.ip-geo-block-dropdown:before{top:.5em}fieldset.ip-geo-block-field table.form-table{margin:0 0 .5em;width:100%}textarea.regular-text{width:25em}fieldset.ip-geo-block-field input.regular-text,fieldset.ip-geo-block-field textarea.regular-text{font-size:95%}input[id*=ip_geo_block_settings_rewrite_]+label{margin-left:.25em}input[id*=ip_geo_block_settings_providers]+label{min-width:7em}.ip-geo-block-settings-folding{margin:.5em 0}.ip-geo-block-settings-folding ul{margin-bottom:0}.ip-geo-block-settings-folding li{margin:.5em 0}.folding-disable{pointer-events:none;opacity:.5}.folding-inactive{opacity:.5;font-style:oblique!important}.ip-geo-block-float li{display:inline-block;width:18em;margin-top:0}.ip-geo-block-checked{list-style-type:disc}.ip-geo-block-ip-addr{display:inline-block;padding-top:5px}.ip-geo-block-hide{display:none}.ip-geo-block-sup{margin-left:.2em;display:inline-block}.ip-geo-block-note{margin-top:1em;list-style:disc inside}.ip-geo-block-note li{text-indent:-1em;padding-left:1em}.ip-geo-block-border{border-top:inherit}.ip-geo-block-notice{color:#dd3d36}.ip-geo-block-title{width:100px;display:inline-block}.ip-geo-block-result{color:#2786C2;display:inline-block}#ip-geo-block-live-loading,.ip-geo-block-loading{background-size:16px 16px;background-position:center center;background-repeat:no-repeat;height:16px;width:16px;margin-left:1em;margin-top:.2em;display:inline-block;vertical-align:top}.ip-geo-block-loading{background-image:url(data:image/gif;base64,R0lGODlhEAAQAPIGAAAAAMLCwkJCQpKSkmJiYoKCgv///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAGACwAAAAAEAAQAAADM2i63P4wyklrC0IEKgAQnAdOmGYFBLExwboQWcG2rlHEwTDQLUsUOd2mBxkUCgNKa+dIAAAh+QQJCgAGACwAAAIACgAOAAADLWgWIqHQCABEVLPe1R4MBOFFRFNsRUNsYDFewTC8iixvQ1EMyxjEvyBLODQkAAAh+QQJCgAGACwAAAAACgAOAAADLWi6IRJrCQCECoU0ag1xxeBARuEQ0UUU5DUM7fK+qTEUYR0EcM3Ev51uB7wAEwAh+QQJCgAGACwAAAAADgAKAAADLWi6URQrLiJEkSaM0eqrkLFtAVEEAgAIylAUQ5SuSqCFNZjhWG3zmB8wOJQkAAAh+QQJCgAGACwCAAAADgAKAAADK2hqMRMrLuekCnCU8gqBDCZ2glBcYkSUxIJJgQdaUVDOtAAAAr3oPN/llgAAIfkECQoABgAsBgAAAAoADgAAAytoEdauiz0Yx5BQFTvN2EMXWNgUFETZFIJQdERLiGgZtKohAIDQ7T0RrpEAACH5BAkKAAYALAYAAgAKAA4AAAMqaKoR+609Fie1K4zhZiibNRSg1XAQUXQPIQgE835voQgAIARqh+ummSUBACH5BAUKAAYALAIABgAOAAoAAAMsaLpsES2+F9mEddEgBFbBMGACAAiMOCrlGRBFWBQD2L0dYYjfUuQZEKynSAAAOw==)}#ip-geo-block-map{height:400px;margin:1em auto}.gm-style-iw{width:18em;height:auto!important;height:100%;min-height:100%:}.gm-style-iw ul{margin:.1em}.gm-style-iw li{margin:.2em}svg a:hover>text{fill:#0096dd}svg a>text{fill:#0073aa;text-decoration:underline}table.ip-geo-block-statistics-table{float:right}table.ip-geo-block-statistics-table td,table.ip-geo-block-statistics-table th{width:12em;margin:0;padding:.2em;text-align:right;line-height:1.5em;word-wrap:break-word}table.ip-geo-block-statistics-table tr:nth-child(even){background-color:#eee}table.ip-geo-block-table{margin:1em 0;white-space:normal;word-wrap:break-word;word-break:break-all}table.ip-geo-block-table td:first-child{min-width:4.3em}@media screen and (max-width:782px){#ip-geo-block-whois .panel-body{padding:0 .5em}}#ip-geo-block-scan-code{vertical-align:middle}#ip-geo-block-code-list{display:none;margin-bottom:0}#ip-geo-block-chart-countries{height:200px}#ip-geo-block-chart-daily{height:240px}#ip_geo_block_settings_validation_mimetype+label{padding-top:.25em}#ip_geo_block_settings_validation_mimetype+label+ul{margin-top:.7em}#ip_geo_block_settings_create_user{margin-bottom:.5em}#ip-geo-block-wp-info textarea{margin-top:.5em;overflow:auto;width:100%;word-wrap:normal;word-break:normal;white-space:pre}#ip-geo-block-preferred{color:#fff;background:#00838f!important;border-color:#00707a!important;text-shadow:none}#ip-geo-block-preferred:hover{background-color:#00919e!important;border-color:#00525a!important}.ip-geo-block-icon,.ip-geo-block-list-exceptions a.ip-geo-block-icon{background-color:transparent;box-shadow:none;text-decoration:none;outline:0}#ip-geo-block-back-to-top{margin:0;text-align:right}#ip-geo-block-live-update,#ip-geo-block-open-new{margin-left:1em}.ip-geo-block-menu-link{font-size:13px!important}dfn~.ip-geo-block-icon{margin-left:.4em}.ip-geo-block-icon{position:relative}.ip-geo-block-icon:active{top:1px}.ip-geo-block-icon span{height:16px;width:16px;margin:0;border:none;display:inline-block;vertical-align:middle;background-size:16px 16px;background-position:center center;background-repeat:no-repeat}.ip-geo-block-icon-cycle span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAh1BMVEUAda2otLp+rsSHprWHr8IBd7EpfKRGhaNajqeUqrRymKuKoq5yo7prlKgAcqoVe6w8gqQmgq5Tj6wIdqsVdKIshrEMea1Uhp+Anqw0hawDdq4gfKhljqE7hqoLdKYbgbM4jLQygKUGeK8CdawQd6gVeKcad6NKkrSerrZAj7UAc6sAc6rc3NySrVGQAAAALXRSTlP//////////////////////////////////////////////////////////wCl7wv9AAACOklEQVR4Ae2W15rzKgxF9xTZzhTX9B7S/gN6/9ebYqzzGZsw/S7LV3FZgCSIwD/kQ8FVcBU8xatZUczy8luC/ABNOn0DSHEsvyZ4PgLatNCYR3efFxyhTQ8g+qQgJxgv2JefERzJXATRh4LHOUwAHD4S7OGEztRJaN86hAUxtaNWDUf/bRdDBbQMWVDAO8jn89WUhag1MeyCAh6hHofyrliLgZKggDMYgzF3eVAwFq0uCZq5KY0TezjIHDDzC0qqmkwe2ctGDOQVLMkgu+F3/rGXwb4xIPcJ6P3JgkM8wFjmfcFAWfeKQywaAz33BJVuHsUcAt09gVbuLDThAJkdR687ggLmf4gDJLIGV7BydtB8yn3u+fbtuj/LS7G9wZAd1AKK+yxJ1x+aBmibTtgCcEHGHsh0wdbOgNLek4L7lI5BigY8nWuZUQ3qGEXes9JzOKGJztPaGtLslu3lIXJirdxCWkASHGDTMqg7V1DKPplygDG61YJukLHjEErGSXqCSos6xNSOgzP3BDmsQBcchNwkoV8oiNnPA78zIefUgCdJeGIfE7LmFWXsFTCFdzTJ/RlfEMRiSGnFXXbkC7AIeqcKDu4ynseozeouKJiSEYBDwkJyIC1nRUjgblkNWp/e/1vXc2gjoAoLksYgjrrFMi0oDgjEEIDij1scBXMJSH6DAj6RNl7o8MkuLak8Co15/Pk+MRmT0xilQJV/sdWNKg2kTaeroudvNNsDjmejYjSL+e6v2/2r4Cp4BXNajr0H7hRfAAAAAElFTkSuQmCC)}.ip-geo-block-icon-lock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3Ny3y9Zzq8dRmb7M1dlXnsIFdK0AcawAcqwphrYAcKvZ29wAb6oJd680jrqlw9MBcqxmo8MUfbJLl75eoMI7kbzX2ttqp8VSmL1YnL8NeK+Tu89DlL1ImMEOebBNmL4OkqMoAAAAAXRSTlMAQObYZgAAAPlJREFUeAG9kAWyhTAQBIPOsCzufv9TPnf4Ll0CSbpmxXwNy3Yc23rz2fV8kPA99433AIQIiGDTCD0lojiOQPXCDSFJIbF16CMWItkQMkF+inZzSLYhFKLl+a9UKTZaqJTZJYtarZuo40chrv9CqJTN+behVi+Cm7RdDgRld6AMgLxrE/dxBz0BEjwBEmD/uIsWPAOAF9A+CE56ufSryr8oqfOYcBbQJ8YkES7COkFOYzTypqCDOTDo2wljaEw4vp1APYyWKd8WMBozylvCpcvmXeHQ5fCegHia4s1FgZcIVeVFeFx1M4MvYG4eBHdYWufC+addBtf8E3vdjBNhWnVQqAAAAABJRU5ErkJggg==)}.ip-geo-block-icon-unlock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NyzydRzq8dRmb7I09hYnsEFdK0AcawAcqzP1toqhrYAcKvZ29wAb6oMeK8zjbqrxtQBcazBz9Zko8MVfbLF0thMmL07kbtpp8WjwtJSmL1YnL+Tu89DlL1JmMEPebBFV++UAAAAAXRSTlMAQObYZgAAAONJREFUeAG9kAWChDAMAIMmJaTFXf7/ynXflvMbnE5j8DU8Pwh8D1yEUYxEGEchWFEJEjEflESBhTQSQm2MRpIotQhZTmgKgMIg5ZlFKBmrGg7UFXJpEQKW8qIKN7YeikJdBJI2BTtXwfyx0L3XoPphvBEliNU49OoxqEa6g4cTST/OYshvi3hV8+FxSNfluG3jqxG8C6h7gF6jU+AODnTsFGSCA5O4I8wpQDq7I5CUAKWQW+AZYOYtoQPoGDeECWDaioBmWQxeBduoWURso+5WpBdw7R4ENTVDcGE435tJwT+xB+vMEnZRNB0YAAAAAElFTkSuQmCC)}.ip-geo-block-icon-find span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NzS19rD0NWHtMpGk7kYfbAGda0Req+WtcTT1temwM4AcasAcqwAc6wAcKydvMt1pr8Ab6pqpcLX2doggrKoxdNYm7yzw8u/y9HO1tkKdq4th7Td3t6DrcLL0taxyNPGe/YhAAAAAXRSTlMAQObYZgAAARVJREFUeAGtkkeiwyAMRP2xDfxoRjElvd3/lOkNUlZ5u0GPruan/Bnz96Xadr21rvP/7+ujXsAjom78rj4ApCoERIipqfGB1H7wPmYhw1DXjZI6nOel1oJhVAmdUP0tTEDkVC4AYvqIbaDOCqFV6vwRF0tIeYoo6J/X7ICuPAJl9ZynwiIfB5DXxZlRChulbh8xZci0EHZK3TziJFDL504rEOZ+iR5cVj82DoS7XtSshLJpKqaB0Dg3ZjcsQWKaKiF1gVQlITwh/bw2pgKeEeURhE29yKSzUFF03p1V7Wqj2Y7GfrY9X/NirJsPxKsxfBLSSs5GmH8yjAWPSNd8Yoez4f4/G1nIsksqFtGK1i9e39o0P+EAqaoRLlQ+r94AAAAASUVORK5CYII=)}.ip-geo-block-icon-alert span,span.ip-geo-block-icon-alert{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAkFBMVEXc3Nzc2trWl5DHRDTFOyvOgXfc1tXCLBrEMiHEMyLNcmfaxMLDMSDDLx7bu7jRiYHDLhzDMB/LX1PaxsTDLh3YtrHMY1bWmpPJVknSjYXUkYnZuLTMZVnENCPWlI3QhXzENiXXrqrDLRzXsa3Oal7Pe3Hc2NjVn5nNbmPayMbbwb7ay8rUj4fc09Lbw8Db0dDBbRUDAAAAAXRSTlMAQObYZgAAAPVJREFUeAG9ktXWwyAQBonC12brFvff5f2frr4nBredK2DnTFS8Gst2XM8XZmypIGeWcT4PFABaGIXlClfWG1NiC4Ubu705oKRcY32wTAHl2MdTYEqEK8hIiHgHSnSJeaogMyEWO4BijZCvwII2MS9UJ2BXTh+hQidoEttboBOwq3WBnkCNpQlA2iyAhol2hRu71n97p4fw0Z9/ugoPHCfFA+o/iLfCkyBglRJdICBas7uuey+R56fF14wNanj+/QjwY3aX23cBFn6EiHmHNT/ICYxystv/wJy4UHWGlN2cuPB72tFqAq3dP/Hk3zs0E5LZVryGC/hqGNnUa0SVAAAAAElFTkSuQmCC);vertical-align:bottom}table.form-table th .ip-geo-block-cycle span{vertical-align:text-bottom}.ip-geo-block-list{margin-top:0;margin-bottom:.7em}@media screen and (min-width:782px){ul.ip-geo-block-list .code{width:15em}}.ip-geo-block-list-exceptions label{display:inline-block}.ip-geo-block-list-exceptions dfn{border:none}div[class*=ip-geo-block] .dataTables_wrapper.no-footer .dataTables_scrollBody,table.ip-geo-block-dataTable.no-footer,table.ip-geo-block-dataTable>thead>tr>td,table.ip-geo-block-dataTable>thead>tr>th{border-bottom:1px solid #ddd}.ip-geo-block-list-exceptions span.dashicons{font-size:14px}.ip-geo-block-list-exceptions a.ip-geo-block-icon{margin-left:.3em}.form-table td p.ip-geo-block-desc,.form-table td p.ip-geo-block-find-desc{color:#666;font-size:13px!important;margin:4px 0 .5em .5em}.ip-geo-block-find-desc{display:none}.ip-geo-block-admin-post{color:#c43322;margin-left:.25em}.ip-geo-block-warn{color:#c43322;font-weight:700}input#ip_geo_block_settings_behavior_time,input#ip_geo_block_settings_behavior_view{width:3.5em}.ip-geo-block-top-list{display:inline-table;list-style-position:outside;margin:0 2em .5em 1.75em}.ip-geo-block-top-list h4{margin:1em 0}.ip-geo-block-top-list li code{background:0 0}.ip-geo-block-network{margin-bottom:1em}.ip-geo-block-container{margin:0 auto;padding:0 1em;position:relative;width:100%}.ip-geo-block-row{display:flex;flex-direction:column;align-items:flex-start;align-items:stretch;padding:0;width:100%}.ip-geo-block-row .ip-geo-block-column{display:block;flex:1 1 auto;align-self:flex-start;margin-left:0;max-width:100%;width:100%}.ip-geo-block-row .ip-geo-block-column.column-20{flex:0 0 20%;max-width:20%}.ip-geo-block-row .ip-geo-block-column.column-25{flex:0 0 25%;max-width:25%}.ip-geo-block-row .ip-geo-block-column.column-33{flex:0 0 33.3333%;max-width:33.3333%}.ip-geo-block-row .ip-geo-block-column.column-50{flex:0 0 50%;max-width:50%}@media (min-width:40rem){.ip-geo-block-row{flex-direction:row;margin-left:-2em;width:calc(100% + 2em)}.ip-geo-block-row .ip-geo-block-column{margin-bottom:inherit;padding:0 1em}}table.ip-geo-block-dataTable{clear:none!important}table.ip-geo-block-dataTable td,table.ip-geo-block-dataTable th{text-align:right}table.ip-geo-block-dataTable td:nth-child(n+2),table.ip-geo-block-dataTable th:nth-child(n+2){padding-left:0!important}table.ip-geo-block-dataTable th{white-space:nowrap}table.ip-geo-block-dataTable>thead>tr{line-height:1.8em}table.ip-geo-block-dataTable thead td,table.ip-geo-block-dataTable thead th{padding:10px 16px}#ip-geo-block-statistics-cache td:nth-child(3),#ip-geo-block-validation-logs td:nth-child(4){min-width:1.6em}table.ip-geo-block-dataTable.nowrap td,table.ip-geo-block-dataTable>tbody>tr>td span{white-space:normal!important;word-wrap:break-word!important;word-break:break-all!important}table.ip-geo-block-dataTable>tbody>tr>td span{display:inline-block}.ip-geo-block-settings-folding input[type=checkbox]{margin-right:.5em}table.ip-geo-block-dataTable input[type=checkbox]{max-height:16px;max-width:16px;margin:0}table.ip-geo-block-dataTable>tbody>tr>td:first-child,table.ip-geo-block-dataTable>thead>tr>th:first-child{padding:8px 4px 8px 1.4em;text-align:left}table.collapsed>tbody>tr>td.dataTables_empty:first-child::before,table.ip-geo-block-dataTable>tbody>tr>td.dataTables_empty{border:none;text-align:center}table.ip-geo-block-dataTable thead>tr>th:first-child.sorting_asc{background-image:none!important}table.ip-geo-block-dataTable.display tbody tr.even>.sorting_1,table.ip-geo-block-dataTable.display tbody tr.odd>.sorting_1,table.ip-geo-block-dataTable.display tbody tr:hover>.sorting_1{background-color:inherit!important}table.ip-geo-block-dataTable.collapsed>tbody>tr>td:first-child{padding:8px 4px 8px 8px!important}table.collapsed>tbody>tr.parent>td:first-child::before,table.collapsed>tbody>tr>td:first-child::before{content:'';height:0;width:0;display:inline-block;border-radius:0;border:5px solid transparent;box-shadow:none;position:relative;background-color:transparent}table.collapsed>tbody>tr>td:first-child::before{border-left:5px solid #555;top:1px;left:-2px}table.collapsed>tbody>tr.parent>td:first-child::before{border-top:5px solid #555;top:4px;left:-4px}table.collapsed>tbody>tr.child>td:first-child::before{border:none}table.collapsed>tbody>tr.child>td.child>ul li{border:none;padding:0;margin:0;line-height:1.8em}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data,table.collapsed>tbody>tr.child>td.child>ul li span.dtr-title{font-size:13px!important;display:block;white-space:normal;word-wrap:break-word;word-break:break-all}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data{margin-left:1.25em;margin-right:.3em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{float:none;text-align:center;margin-bottom:1em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{min-width:2em;background:inherit;border-color:#ddd;border-radius:0;border-image:none;border-style:solid;border-width:1px 1px 1px 0;box-shadow:none;margin:.5em 0 0;padding:.25em 0;display:inline-block;text-decoration:none}#ip-geo-block-1 #ip-geo-block-section-2 .panel-body,#ip-geo-block-4 #ip-geo-block-section-0 .panel-body,mark{padding:0}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:first-child{border-left-width:1px;border-bottom-left-radius:4px;border-top-left-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:last-child{border-bottom-right-radius:4px;border-top-right-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button{color:#0073aa!important}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover{color:#0096dd!important;background-color:#fff}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{cursor:default;color:#999!important;background-color:transparent}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover{cursor:default;color:#444!important;background-color:#fff!important}#ip-geo-block-1 #ip-geo-block-section-2 table.form-table,#ip-geo-block-4 #ip-geo-block-section-0 table.form-table{margin-left:1em;max-width:95%}#ip-geo-block-live-log,#ip-geo-block-select-duration,#ip-geo-block-select-layout,#ip-geo-block-select-target{margin:0}#ip-geo-block-select-duration li,#ip-geo-block-select-layout li,#ip-geo-block-select-target li{float:left;margin-right:1.5em}#ip-geo-block-select-duration li label,#ip-geo-block-select-target li label{cursor:pointer}#ip_geo_block_settings_search_filter{width:16em;padding-top:3px}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-passed{background-color:#edf6ff!important}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-blocked{background-color:#ffefef!important}.ip-geo-block-new-passed{animation:ip-geo-block-flash-passed 1s ease-out 0s 1 normal both running}.ip-geo-block-new-blocked{animation:ip-geo-block-flash-blocked 1s ease-out 0s 1 normal both running}@keyframes ip-geo-block-flash-passed{0%{background-color:gold}100%{background-color:#edf6ff}}@keyframes ip-geo-block-flash-blocked{0%{background-color:gold}100%{background-color:#ffefef}}mark{background:gold}#ip-geo-block-live-log li{float:left;margin-right:3em}#ip-geo-block-live-log li:last-child{margin-right:0}#ip-geo-block-live-log li input[type=radio]{visibility:hidden;position:absolute}#ip-geo-block-live-log li input[type=radio]+label{display:inline-block;margin:-2px -2px 0;padding:4px 12px;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);border-bottom-color:#b3b3b3;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}#ip-geo-block-live-log li input[type=radio]:checked+label{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#e0e0e0}.ip-geo-block-live-timer{height:1em;width:1em;margin:0;position:relative;top:0;left:0}.ip-geo-block-live-timer:before{content:"";display:block;height:1em;width:1em;background:radial-gradient(#0073aa,#72777c);border-radius:50%;position:absolute;top:0;left:0}.ip-geo-block-live-timer:after{display:none}.ip-geo-block-live-timer>div{position:absolute;width:1em;height:1em;clip:rect(0,1em,1em,.5em)}.ip-geo-block-live-timer>div:before{content:" ";position:absolute;width:1em;height:1em;border-radius:.5em;clip:rect(0,.5em,1em,0);background-color:#f1f1f1;transform:rotate(0)}.ip-geo-block-live-timer>div:first-child:before{animation:30s spin-timer linear forwards}.ip-geo-block-live-timer>div:last-child{transform:rotate(180deg)}.ip-geo-block-live-timer>div:last-child:before{transform:rotate(.00001deg);animation:30s spin-timer linear 30s forwards}@keyframes spin-timer{0%{transform:rotate(0)}100%{transform:rotate(180deg)}}.ip-geo-block-subitem{margin-left:1.7em}.ip-geo-block-subitem:before{content:"\00bb";position:absolute;left:2em}.ip-geo-block-subitem dfn{vertical-align:middle}:placeholder-shown{color:#888}::-webkit-input-placeholder{color:#888}:-moz-placeholder{color:#888;opacity:1}::-moz-placeholder{color:#888;opacity:1}:-ms-input-placeholder{color:#888}
|
3 |
* Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
|
4 |
* This software is released under the MIT License.
|
5 |
*/
|
6 |
+
dfn{cursor:help;border-bottom:1px dotted #888}fieldset,legend{padding:0;margin:0;border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}fieldset{min-width:0}legend{display:block;line-height:inherit;width:100%}label{display:inline-block;max-width:100%}.panel{border-color:#888;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#f5f5f5}.panel-heading{float:left!important;background:#fff}.panel-default>.panel-heading{border-color:inherit}.panel-body{width:100%;padding:0 1em;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.panel-body:after,.panel-body:before{content:" ";display:table}.panel-body:after{clear:both}.ip-geo-block-navi-link{text-align:left}.ip-geo-block-help-link{float:right;font-size:90%;font-weight:400}.ip-geo-block-help-link a{box-shadow:none}fieldset label{vertical-align:text-middle}fieldset input[type=checkbox]{margin:1px 2px 0}fieldset.ip-geo-block-field{margin:1em 0}fieldset.ip-geo-block-field h2,fieldset.ip-geo-block-field h3{padding:0;margin:0;font-size:14px!important}fieldset.ip-geo-block-field h4{margin:.75em 0 .5em 0}fieldset.ip-geo-block-field legend.panel-heading{padding:10px}fieldset.ip-geo-block-field .ip-geo-block-dropdown,fieldset.ip-geo-block-field .ip-geo-block-dropup{cursor:pointer;position:relative;padding-left:1em}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before,fieldset.ip-geo-block-field .ip-geo-block-dropup:before{content:'';height:0;width:0;border:.4em solid transparent;position:absolute}fieldset.ip-geo-block-field .ip-geo-block-dropup:before{border-left:.4em solid #555;left:2px;top:18%}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before{border-top:.4em solid #555;left:-2px;top:38%}fieldset.ip-geo-block-field .form-table .ip-geo-block-dropdown,fieldset.ip-geo-block-field .form-table .ip-geo-block-dropup{margin-top:.75em}fieldset.ip-geo-block-field ul.ip-geo-block-dropup:before{top:.25em}fieldset.ip-geo-block-field ul.ip-geo-block-dropdown:before{top:.5em}fieldset.ip-geo-block-field table.form-table{margin:0 0 .5em;width:100%}textarea.regular-text{width:25em}fieldset.ip-geo-block-field input.regular-text,fieldset.ip-geo-block-field textarea.regular-text{font-size:95%}input[id*=ip_geo_block_settings_rewrite_]+label{margin-left:.25em}input[id*=ip_geo_block_settings_providers]+label{min-width:7em}.ip-geo-block-settings-folding{margin:.5em 0}.ip-geo-block-settings-folding ul{margin-bottom:0}.ip-geo-block-settings-folding li{margin:.5em 0}.folding-disable{pointer-events:none;opacity:.5}.folding-inactive{opacity:.5;font-style:oblique!important}.ip-geo-block-float li{display:inline-block;width:18em;margin-top:0}.ip-geo-block-checked{list-style-type:disc}.ip-geo-block-ip-addr{display:inline-block;padding-top:5px}.ip-geo-block-hide{display:none}.ip-geo-block-sup{margin-left:.2em;display:inline-block}.ip-geo-block-note{margin-top:1em;list-style:disc inside}.ip-geo-block-note li{text-indent:-1em;padding-left:1em}.ip-geo-block-border{border-top:inherit}.ip-geo-block-notice{color:#dd3d36}.ip-geo-block-title{width:100px;display:inline-block}.ip-geo-block-result{color:#2786c2;display:inline-block}.ip-geo-block-primary{color:#fff!important;background:#00838f!important;border-color:#00707a!important;text-shadow:none}.ip-geo-block-primary:hover{background-color:#00919e!important;border-color:#00525a!important}ul#ip-geo-block-logs-preset{margin:.25em 0}ul#ip-geo-block-logs-preset li{float:left;margin-right:1em}#ip-geo-block-live-loading,.ip-geo-block-loading{height:16px;width:16px;background-size:16px 16px;background-position:center center;background-repeat:no-repeat;margin-left:1em;margin-top:.2em;display:inline-block;vertical-align:top}.ip-geo-block-loading{background-image:url(data:image/gif;base64,R0lGODlhEAAQAPYCAKqqqsbGxlZWVsrKyvr6+ubm5tDQ0K6urmZmZmJiYuzs7IaGhvT09JycnLq6us7Ozurq6o6OjtbW1tra2vDw8CgoKCYmJvz8/NLS0kJCQlJSUqysrPLy8vb29pqamra2tm5ubujo6Kampvj4+IiIiMjIyEhISNzc3OLi4rKysj4+PlBQULi4uJKSkmRkZODg4KKiou7u7iQkJB4eHlpaWhISErCwsHh4eMDAwDIyMi4uLqSkpIKCgr6+vt7e3n5+fggICJCQkAwMDEpKSmBgYHZ2dhgYGBYWFnx8fF5eXk5OTiIiIjAwMIyMjISEhDQ0NJaWltTU1AQEBBwcHGpqaoqKiuTk5CoqKlhYWAoKCtjY2Hp6ehAQEJ6ensLCwkxMTJSUlCwsLAYGBnR0dDg4OFxcXLy8vKCgoA4ODsTExMzMzDw8PERERDY2NqioqHJycrS0tGhoaBQUFEZGRjo6OkBAQICAgHBwcFRUVCAgIGxsbP///wAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgACACwAAAAAEAAQAEAHjIACgoOEhYJsbTGGghcPGIJRbFNNhgQKCheDDkllDQYMHSc4MAcvhTB0aFliggQjmYNEFQ6LAh0+VoIwbFW1GGamhCgfUE5NbgMKtQYLc0a1gjsyR3E2IYwMFASDYDJvtRRWFIJ1TMq1ElqCICpetQoBEoInVCsAhhI2XhyEPUgIIG7waALlwAloCAMBACH5BAkKAAIALAEAAQAOAA4AAAeDgAKCEmBYYRVKJAaCjAcrVzIzRjVoTw2MKRk5Ww4KECkuWTWCE0Rrl4yCTow7bAupsBcCW19psKkjBEQaFLeMHBwINBy+ggoxVQkPxSMFMXBUMMUQPhRWVUU9tyFRLwQCA048cCcjIyFaJQYxjA8NEVBnAClmahCwEANwbjYBJwyMAgEAIfkECQoABQAsAQABAA4ADgAAB4OABYInO29DbC5QUYKMZiBfbCptTBUmIow4LgJBaTExZkVLFTAFKD8JB4yMQUZrBixUXaqqVFwkUG8Ys4wpQiZOWwy7ghBiRk08HcOqblUTy4wlLWbLBCMFCgBdurMjFMoFE24ADxAXFwwKITEEjD5mH2YBDxI+IdeqHCcGAxgv7IwCAQAh+QQJCgAAACwBAAEADgAOAAAHhYAAglYfTVQJSCITgowDVSAISQJKJgkpjA8LWyIGHBQBJCoZBwAQDU44jIxdTxoSAxEfqqpbFWApUCezjA5LWCJdI7uCClNXGyLCwxBHFl4HBcMAKVxfEx8Y0glZCxwlOCjDUkwPACElAygMghftAB6MClpRJygQFB0EuyMKBQUKDPQxCgQAIfkECQoAAAAsAQABAA4ADgAAB4SAAIIKahstTQ0OVoKMJzYeLVU8W29OXowvBztePh0dUTtxVD0AHDgHEoyMKWVvPj4sBqqqLUoiGDgQs4wBJmNqARe7gjEqXxgPwsMxbWw+UQzDAGY6LjEnusNjFmAEBVbRs00zc1EAHRAKHYw2CHIyO4wEHAwjgmJCZDC7F8psC7IEBQIAIfkECQoARwAsAQABAA4ADgAAB4OAR4IMPgMfNg4PCoKMEA84LCkAMB47GIwxBiUTEAQjKD0REQ9HBD4YIYyMATwtBRQnqaqMG0UOEC8ds4wYIEEQBbuMHC4gMYvCRxw0CAwcF8kBGj8EHdDCJCYiRxfXsw0qCROqRDYQECw3ORkpqjpAQjVGMxYrB7MPC0MyFQItEowCAQAh+QQJCgACACwBAAEADgAOAAAHgIACghcUVhIYEigMgowjEC8nUQ8BOGkojAQxITEdAhcxEh9wPoIMFCOMjBMAKTEXHaipjGldDxcEsqkvUAe5sh1NLb6pHTxNbGK9vlE3DU5ZLsNnIA4GbTVVuQcJdpdnS0Z3LAoxXhF4LjiMMBl5FjptKiZ6ZrJRLUkqbCAwJ4yBACH5BAUKAAEALAEAAQAOAA4AAAd/gAGCARcjHDExHASDjAQdHAoFLy8Ugw2MgiMKWhIKAQ9MYpiCEA8YHQtZCaOCJ14vX2g2rAEKZgMyNRC0BCksFUa7rCMANgIzH7QvZw4tMmO0DlAPUV9hHqNeVTC7G2tkTmkUHA8iSFUGgzZlGSYaNC4gTWqYEzA3SQhVH1aDgQA7)}#ip-geo-block-map{height:400px;margin:1em auto}#ip-geo-block-apis div.nav-tab-wrapper{padding-top:0;margin-bottom:1em}#ip-geo-block-geoinfo{white-space:normal;word-wrap:break-word;word-break:break-all}#ip-geo-block-geoinfo ul{margin-top:0;margin-left:1em}.gm-style-iw{width:18em;height:auto!important;height:100%;min-height:100%:}.gm-style-iw ul{margin:.1em}.gm-style-iw li{margin:.2em}svg a{cursor:pointer}svg a:hover>text{fill:#0096dd}svg a>text{fill:#0073aa;text-decoration:underline}table.ip-geo-block-statistics-table{float:right}table.ip-geo-block-statistics-table td,table.ip-geo-block-statistics-table th{width:12em;margin:0;padding:.2em;text-align:right;line-height:1.5em;word-wrap:break-word}table.ip-geo-block-statistics-table tr:nth-child(even){background-color:#eee}table.ip-geo-block-table{margin:1em 0;white-space:normal;word-wrap:break-word;word-break:break-all}table.ip-geo-block-table td:first-child{min-width:4.3em}@media screen and (max-width:782px){#ip-geo-block-whois .panel-body{padding:0 .5em}}#ip-geo-block-scan-code{vertical-align:middle}#ip-geo-block-code-list{display:none;margin-bottom:0}#ip-geo-block-chart-countries{height:200px}#ip-geo-block-chart-daily{height:240px}#ip_geo_block_settings_validation_mimetype+label{padding-top:.25em}#ip_geo_block_settings_validation_mimetype+label+ul{margin-top:.7em}#ip_geo_block_settings_create_user{margin-bottom:.5em}#ip-geo-block-back-to-top a,#ip-geo-block-toggle-sections{box-shadow:none}#ip-geo-block-wp-info textarea{margin-top:.5em;overflow:auto;width:100%;word-wrap:normal;word-break:normal;white-space:pre}#ip-geo-block-back-to-top{margin:0;text-align:right}#ip-geo-block-live-update,#ip-geo-block-open-new{margin-left:1em}.ip-geo-block-menu-link{font-size:13px!important}dfn~.ip-geo-block-icon{margin-left:.4em}.ip-geo-block-icon{position:relative;cursor:pointer;outline:0;box-shadow:none;text-decoration:none;background-color:transparent}.ip-geo-block-icon:active{top:1px}.ip-geo-block-icon span{height:16px;width:16px;margin:0;border:none;display:inline-block;vertical-align:middle;background-size:16px 16px;background-position:center center;background-repeat:no-repeat}.ip-geo-block-icon-cycle span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAh1BMVEUAda2otLp+rsSHprWHr8IBd7EpfKRGhaNajqeUqrRymKuKoq5yo7prlKgAcqoVe6w8gqQmgq5Tj6wIdqsVdKIshrEMea1Uhp+Anqw0hawDdq4gfKhljqE7hqoLdKYbgbM4jLQygKUGeK8CdawQd6gVeKcad6NKkrSerrZAj7UAc6sAc6rc3NySrVGQAAAALXRSTlP//////////////////////////////////////////////////////////wCl7wv9AAACOklEQVR4Ae2W15rzKgxF9xTZzhTX9B7S/gN6/9ebYqzzGZsw/S7LV3FZgCSIwD/kQ8FVcBU8xatZUczy8luC/ABNOn0DSHEsvyZ4PgLatNCYR3efFxyhTQ8g+qQgJxgv2JefERzJXATRh4LHOUwAHD4S7OGEztRJaN86hAUxtaNWDUf/bRdDBbQMWVDAO8jn89WUhag1MeyCAh6hHofyrliLgZKggDMYgzF3eVAwFq0uCZq5KY0TezjIHDDzC0qqmkwe2ctGDOQVLMkgu+F3/rGXwb4xIPcJ6P3JgkM8wFjmfcFAWfeKQywaAz33BJVuHsUcAt09gVbuLDThAJkdR687ggLmf4gDJLIGV7BydtB8yn3u+fbtuj/LS7G9wZAd1AKK+yxJ1x+aBmibTtgCcEHGHsh0wdbOgNLek4L7lI5BigY8nWuZUQ3qGEXes9JzOKGJztPaGtLslu3lIXJirdxCWkASHGDTMqg7V1DKPplygDG61YJukLHjEErGSXqCSos6xNSOgzP3BDmsQBcchNwkoV8oiNnPA78zIefUgCdJeGIfE7LmFWXsFTCFdzTJ/RlfEMRiSGnFXXbkC7AIeqcKDu4ynseozeouKJiSEYBDwkJyIC1nRUjgblkNWp/e/1vXc2gjoAoLksYgjrrFMi0oDgjEEIDij1scBXMJSH6DAj6RNl7o8MkuLak8Co15/Pk+MRmT0xilQJV/sdWNKg2kTaeroudvNNsDjmejYjSL+e6v2/2r4Cp4BXNajr0H7hRfAAAAAElFTkSuQmCC)}.ip-geo-block-icon-lock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3Ny3y9Zzq8dRmb7M1dlXnsIFdK0AcawAcqwphrYAcKvZ29wAb6oJd680jrqlw9MBcqxmo8MUfbJLl75eoMI7kbzX2ttqp8VSmL1YnL8NeK+Tu89DlL1ImMEOebBNmL4OkqMoAAAAAXRSTlMAQObYZgAAAPlJREFUeAG9kAWyhTAQBIPOsCzufv9TPnf4Ll0CSbpmxXwNy3Yc23rz2fV8kPA99433AIQIiGDTCD0lojiOQPXCDSFJIbF16CMWItkQMkF+inZzSLYhFKLl+a9UKTZaqJTZJYtarZuo40chrv9CqJTN+behVi+Cm7RdDgRld6AMgLxrE/dxBz0BEjwBEmD/uIsWPAOAF9A+CE56ufSryr8oqfOYcBbQJ8YkES7COkFOYzTypqCDOTDo2wljaEw4vp1APYyWKd8WMBozylvCpcvmXeHQ5fCegHia4s1FgZcIVeVFeFx1M4MvYG4eBHdYWufC+addBtf8E3vdjBNhWnVQqAAAAABJRU5ErkJggg==)}.ip-geo-block-icon-unlock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NyzydRzq8dRmb7I09hYnsEFdK0AcawAcqzP1toqhrYAcKvZ29wAb6oMeK8zjbqrxtQBcazBz9Zko8MVfbLF0thMmL07kbtpp8WjwtJSmL1YnL+Tu89DlL1JmMEPebBFV++UAAAAAXRSTlMAQObYZgAAAONJREFUeAG9kAWChDAMAIMmJaTFXf7/ynXflvMbnE5j8DU8Pwh8D1yEUYxEGEchWFEJEjEflESBhTQSQm2MRpIotQhZTmgKgMIg5ZlFKBmrGg7UFXJpEQKW8qIKN7YeikJdBJI2BTtXwfyx0L3XoPphvBEliNU49OoxqEa6g4cTST/OYshvi3hV8+FxSNfluG3jqxG8C6h7gF6jU+AODnTsFGSCA5O4I8wpQDq7I5CUAKWQW+AZYOYtoQPoGDeECWDaioBmWQxeBduoWURso+5WpBdw7R4ENTVDcGE435tJwT+xB+vMEnZRNB0YAAAAAElFTkSuQmCC)}.ip-geo-block-icon-find span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NzS19rD0NWHtMpGk7kYfbAGda0Req+WtcTT1temwM4AcasAcqwAc6wAcKydvMt1pr8Ab6pqpcLX2doggrKoxdNYm7yzw8u/y9HO1tkKdq4th7Td3t6DrcLL0taxyNPGe/YhAAAAAXRSTlMAQObYZgAAARVJREFUeAGtkkeiwyAMRP2xDfxoRjElvd3/lOkNUlZ5u0GPruan/Bnz96Xadr21rvP/7+ujXsAjom78rj4ApCoERIipqfGB1H7wPmYhw1DXjZI6nOel1oJhVAmdUP0tTEDkVC4AYvqIbaDOCqFV6vwRF0tIeYoo6J/X7ICuPAJl9ZynwiIfB5DXxZlRChulbh8xZci0EHZK3TziJFDL504rEOZ+iR5cVj82DoS7XtSshLJpKqaB0Dg3ZjcsQWKaKiF1gVQlITwh/bw2pgKeEeURhE29yKSzUFF03p1V7Wqj2Y7GfrY9X/NirJsPxKsxfBLSSs5GmH8yjAWPSNd8Yoez4f4/G1nIsksqFtGK1i9e39o0P+EAqaoRLlQ+r94AAAAASUVORK5CYII=)}.ip-geo-block-icon-alert span,span.ip-geo-block-icon-alert{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAkFBMVEXc3Nzc2trWl5DHRDTFOyvOgXfc1tXCLBrEMiHEMyLNcmfaxMLDMSDDLx7bu7jRiYHDLhzDMB/LX1PaxsTDLh3YtrHMY1bWmpPJVknSjYXUkYnZuLTMZVnENCPWlI3QhXzENiXXrqrDLRzXsa3Oal7Pe3Hc2NjVn5nNbmPayMbbwb7ay8rUj4fc09Lbw8Db0dDBbRUDAAAAAXRSTlMAQObYZgAAAPVJREFUeAG9ktXWwyAQBonC12brFvff5f2frr4nBredK2DnTFS8Gst2XM8XZmypIGeWcT4PFABaGIXlClfWG1NiC4Ubu705oKRcY32wTAHl2MdTYEqEK8hIiHgHSnSJeaogMyEWO4BijZCvwII2MS9UJ2BXTh+hQidoEttboBOwq3WBnkCNpQlA2iyAhol2hRu71n97p4fw0Z9/ugoPHCfFA+o/iLfCkyBglRJdICBas7uuey+R56fF14wNanj+/QjwY3aX23cBFn6EiHmHNT/ICYxystv/wJy4UHWGlN2cuPB72tFqAq3dP/Hk3zs0E5LZVryGC/hqGNnUa0SVAAAAAElFTkSuQmCC);vertical-align:bottom}table.form-table th .ip-geo-block-cycle span{vertical-align:text-bottom}.ip-geo-block-list{margin-top:0;margin-bottom:.7em}@media screen and (min-width:782px){ul.ip-geo-block-list .code{width:15em}}.ip-geo-block-list-exceptions label{display:inline-block}.ip-geo-block-list-exceptions dfn{border:none}.ip-geo-block-list-exceptions span.dashicons{font-size:14px}.ip-geo-block-list-exceptions a.ip-geo-block-icon{margin-left:.3em;outline:0;box-shadow:none;text-decoration:none;background-color:transparent}.form-table td p.ip-geo-block-desc,.form-table td p.ip-geo-block-find-desc{color:#666;font-size:13px!important;margin:4px 0 .5em .5em}.ip-geo-block-find-desc{display:none}.ip-geo-block-admin-post{color:#c43322;margin-left:.25em}.ip-geo-block-warn{color:#c43322;font-weight:700}input#ip_geo_block_settings_behavior_time,input#ip_geo_block_settings_behavior_view{width:3.5em}.ip-geo-block-top-list{display:inline-table;list-style-position:outside;margin:0 2em .5em 1.75em}.ip-geo-block-top-list h4{margin:1em 0}.ip-geo-block-top-list li code{background:0 0}.ip-geo-block-network{margin-bottom:1em}.ip-geo-block-container{margin:0 auto;padding:0 1em;position:relative;width:100%}.ip-geo-block-row{display:flex;flex-direction:column;align-items:flex-start;align-items:stretch;padding:0;width:100%}.ip-geo-block-row .ip-geo-block-column{display:block;flex:1 1 auto;align-self:flex-start;margin-left:0;max-width:100%;width:100%}.ip-geo-block-row .ip-geo-block-column.column-20{flex:0 0 20%;max-width:20%}.ip-geo-block-row .ip-geo-block-column.column-25{flex:0 0 25%;max-width:25%}.ip-geo-block-row .ip-geo-block-column.column-33{flex:0 0 33.3333%;max-width:33.3333%}.ip-geo-block-row .ip-geo-block-column.column-50{flex:0 0 50%;max-width:50%}@media (min-width:40rem){.ip-geo-block-row{flex-direction:row;margin-left:-2em;width:calc(100% + 2em)}.ip-geo-block-row .ip-geo-block-column{margin-bottom:inherit;padding:0 1em}}table.ip-geo-block-dataTable{clear:none!important}table.ip-geo-block-dataTable td,table.ip-geo-block-dataTable th{text-align:right}table.ip-geo-block-dataTable td:nth-child(n+2),table.ip-geo-block-dataTable th:nth-child(n+2){padding-left:0!important}table.ip-geo-block-dataTable th{white-space:nowrap}table.ip-geo-block-dataTable>thead>tr{line-height:1.8em}table.ip-geo-block-dataTable>tbody>tr{cursor:pointer}table.ip-geo-block-dataTable.no-footer,table.ip-geo-block-dataTable>thead>tr>td,table.ip-geo-block-dataTable>thead>tr>th{border-bottom:1px solid #ddd}table.ip-geo-block-dataTable thead td,table.ip-geo-block-dataTable thead th{padding:10px 16px}#ip-geo-block-statistics-cache td:nth-child(3),#ip-geo-block-validation-logs td:nth-child(4){min-width:1.6em}div[class*=ip-geo-block] .dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #ddd}table.ip-geo-block-dataTable.nowrap td,table.ip-geo-block-dataTable>tbody>tr>td span{white-space:normal!important;word-wrap:break-word!important;word-break:break-all!important}table.ip-geo-block-dataTable>tbody>tr>td span{display:inline-block}.ip-geo-block-settings-folding input[type=checkbox]{margin-right:.5em}table.ip-geo-block-dataTable input[type=checkbox]{max-height:16px;max-width:16px;margin:0}table.ip-geo-block-dataTable>tbody>tr>td:first-child,table.ip-geo-block-dataTable>thead>tr>th:first-child{padding:8px 4px 8px 1.4em;text-align:left}table.collapsed>tbody>tr>td.dataTables_empty:first-child::before,table.ip-geo-block-dataTable>tbody>tr>td.dataTables_empty{border:none;text-align:center}table.ip-geo-block-dataTable thead>tr>th:first-child.sorting_asc{background-image:none!important}table.ip-geo-block-dataTable.display tbody tr.even>.sorting_1,table.ip-geo-block-dataTable.display tbody tr.odd>.sorting_1,table.ip-geo-block-dataTable.display tbody tr:hover>.sorting_1{background-color:inherit!important}table.ip-geo-block-dataTable.collapsed>tbody>tr>td:first-child{padding:8px 4px 8px 8px!important}table.collapsed>tbody>tr.parent>td:first-child::before,table.collapsed>tbody>tr>td:first-child::before{content:'';height:0;width:0;display:inline-block;border-radius:0;border:5px solid transparent;box-shadow:none;position:relative;background-color:transparent}table.collapsed>tbody>tr>td:first-child::before{border-left:5px solid #555;top:1px;left:-2px}table.collapsed>tbody>tr.parent>td:first-child::before{border-top:5px solid #555;top:4px;left:-4px}table.collapsed>tbody>tr.child>td:first-child::before{border:none}table.collapsed>tbody>tr.child>td.child>ul li{border:none;padding:0;margin:0;line-height:1.8em}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data,table.collapsed>tbody>tr.child>td.child>ul li span.dtr-title{font-size:13px!important;display:block;white-space:normal;word-wrap:break-word;word-break:break-all}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data{margin-left:1.25em;margin-right:.3em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{padding-top:.15em;margin:.5em 0 0 .3em;position:relative;display:inline-block}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length:after{content:'';width:6px;height:6px;border:0;border-bottom:solid 2px #999;border-right:solid 2px #999;-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);position:absolute;top:50%;right:10px;margin-top:-4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length select{padding-top:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:13px!important;line-height:1.4em;width:100%;height:2.05em!important;background:0 0;position:relative;z-index:1;padding:.125em 1.5em .125em .25em;border:1px solid #ddd;border-radius:4px;box-shadow:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length select::-ms-expand{display:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{float:none;text-align:center;margin-bottom:1em;margin-top:0!important}@media screen and (min-width:640px){div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{margin:.5em 0 0 .6em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{position:relative;left:-2.25em}}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{min-width:2em;background:inherit;border-color:#ddd;border-radius:0;border-image:none;border-style:solid;border-width:1px 1px 1px 0;box-shadow:none;margin:.5em 0 0 0;padding:.25em 0;display:inline-block;text-decoration:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:first-child{border-left-width:1px;border-bottom-left-radius:4px;border-top-left-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:last-child{border-bottom-right-radius:4px;border-top-right-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button{color:#0073aa!important}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover{color:#0096dd!important;background-color:#fff}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{cursor:default;color:#999!important;background-color:transparent}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover{cursor:default;color:#444!important;background-color:#fff!important}#ip-geo-block-1 #ip-geo-block-section-2 .panel-body,#ip-geo-block-4 #ip-geo-block-section-0 .panel-body{padding:0}#ip-geo-block-1 #ip-geo-block-section-2 table.form-table,#ip-geo-block-4 #ip-geo-block-section-0 table.form-table{margin-left:1em;max-width:95%}#ip-geo-block-select-duration,#ip-geo-block-select-layout,#ip-geo-block-select-target{margin:0}#ip-geo-block-select-duration li,#ip-geo-block-select-layout li,#ip-geo-block-select-target li{float:left;margin-right:1.5em}#ip-geo-block-select-duration li label,#ip-geo-block-select-target li label{cursor:pointer}#ip_geo_block_settings_search_filter{width:16em;padding-top:3px}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-passed{background-color:#edf6ff!important}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-blocked{background-color:#ffefef!important}.ip-geo-block-new-passed{animation:ip-geo-block-flash-passed 1s ease-out 0s 1 normal both running}.ip-geo-block-new-blocked{animation:ip-geo-block-flash-blocked 1s ease-out 0s 1 normal both running}@keyframes ip-geo-block-flash-passed{0%{background-color:gold}100%{background-color:#edf6ff}}@keyframes ip-geo-block-flash-blocked{0%{background-color:gold}100%{background-color:#ffefef}}mark{padding:0;background:gold}// Gold #ip-geo-block-live-log{margin:0}#ip-geo-block-live-log li{float:left;margin-right:3em}#ip-geo-block-live-log li:last-child{margin-right:0}#ip-geo-block-live-log li input[type=radio]{visibility:hidden;position:absolute}#ip-geo-block-live-log li input[type=radio]+label{display:inline-block;margin:-2px;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);border-bottom-color:#b3b3b3;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}#ip-geo-block-live-log li input[type=radio]:checked+label{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#e0e0e0}.ip-geo-block-live-timer{height:1em;width:1em;margin:0;position:relative;top:0;left:0}.ip-geo-block-live-timer:before{content:"";display:block;height:1em;width:1em;background:#0073aa;border-radius:50%;position:absolute;top:0;left:0}.ip-geo-block-live-timer:after{display:none}.ip-geo-block-live-timer>div{position:absolute;width:1em;height:1em;clip:rect(0,1em,1em,.5em)}.ip-geo-block-live-timer>div:before{content:" ";position:absolute;width:1em;height:1em;border-radius:.5em;clip:rect(0,.5em,1em,0);background-color:#f1f1f1;transform:rotate(0)}.ip-geo-block-live-timer>div:first-child:before{animation:30s spin-timer linear forwards}.ip-geo-block-live-timer>div:last-child{transform:rotate(180deg)}.ip-geo-block-live-timer>div:last-child:before{transform:rotate(0);animation:30s spin-timer linear 30s forwards}@keyframes spin-timer{0%{transform:rotate(0)}100%{transform:rotate(180deg)}}.ip-geo-block-subitem{margin-left:1.7em}.ip-geo-block-subitem:before{content:"\00bb";position:absolute;left:2em}.ip-geo-block-subitem dfn{vertical-align:middle}.ip-geo-block-subitem-parent td,.ip-geo-block-subitem-parent th{padding-top:0}:placeholder-shown{color:#888}::-webkit-input-placeholder{color:#888}:-moz-placeholder{color:#888;opacity:1}::-moz-placeholder{color:#888;opacity:1}:-ms-input-placeholder{color:#888}
|
admin/css/cidr.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:8xp;font-size:14px;line-height:1.4}
|
1 |
+
*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:8xp;font-size:14px;line-height:1.4}.container{margin:0;padding:0}.clr:after,.col:after,.container:after,.row:after{content:"";display:table;clear:both}.row{padding-bottom:0}.col{display:block;float:left;width:100%}.span_2{width:8.33333333333%}.span_11{width:45.8333333333%}.span_24{width:100%}fieldset{border:none;margin:0;padding:.5rem}textarea{width:100%;height:4.5rem;resize:horizontal;border:1px solid #ccc;font-size:12px;font-family:Consolas,Monaco,monospace}legend input[type=button]{margin-left:.5rem;vertical-align:middle}#j,#i{display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;justify-content:center;align-items:center}#j{padding:0 .5rem}ul#h{padding:1.5rem 0 0;list-style:none}ul#h li{width:100%;margin:.1rem 0;display:inline-block}ul#h li input{padding:0}#g{height:3em;text-align:center;border:1px solid #ccc;padding:.5rem;font-size:12px;font-family:Consolas,Monaco,monospace}
|
admin/datatables/js/dataTables.responsive.js
CHANGED
@@ -12,13 +12,13 @@
|
|
12 |
* @copyright Copyright 2014-2016 SpryMedia Ltd.
|
13 |
*
|
14 |
* This source file is free software, available under the following license:
|
15 |
-
* MIT license -
|
16 |
*
|
17 |
* This source file is distributed in the hope that it will be useful, but
|
18 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
19 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
20 |
*
|
21 |
-
* For details please refer to:
|
22 |
*/
|
23 |
(function( factory ){
|
24 |
if ( typeof define === 'function' && define.amd ) {
|
@@ -152,7 +152,7 @@ $.extend( Responsive.prototype, {
|
|
152 |
// resize
|
153 |
$(window).on( 'resize.dtr orientationchange.dtr', DataTable.util.throttle( function () {
|
154 |
// iOS has a bug whereby resize can fire when only scrolling
|
155 |
-
// See:
|
156 |
var width = $(window).width();
|
157 |
|
158 |
if ( width !== oldWindowWidth ) {
|
12 |
* @copyright Copyright 2014-2016 SpryMedia Ltd.
|
13 |
*
|
14 |
* This source file is free software, available under the following license:
|
15 |
+
* MIT license - https://datatables.net/license/mit
|
16 |
*
|
17 |
* This source file is distributed in the hope that it will be useful, but
|
18 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
19 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
20 |
*
|
21 |
+
* For details please refer to: https://www.datatables.net
|
22 |
*/
|
23 |
(function( factory ){
|
24 |
if ( typeof define === 'function' && define.amd ) {
|
152 |
// resize
|
153 |
$(window).on( 'resize.dtr orientationchange.dtr', DataTable.util.throttle( function () {
|
154 |
// iOS has a bug whereby resize can fire when only scrolling
|
155 |
+
// See: https://stackoverflow.com/questions/8898412
|
156 |
var width = $(window).width();
|
157 |
|
158 |
if ( width !== oldWindowWidth ) {
|
admin/datatables/js/datatables-all.js
CHANGED
@@ -12,13 +12,13 @@
|
|
12 |
* @copyright Copyright 2008-2017 SpryMedia Ltd.
|
13 |
*
|
14 |
* This source file is free software, available under the following license:
|
15 |
-
* MIT license -
|
16 |
*
|
17 |
* This source file is distributed in the hope that it will be useful, but
|
18 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
19 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
20 |
*
|
21 |
-
* For details please refer to:
|
22 |
*/
|
23 |
|
24 |
/*jslint evil: true, undef: true, browser: true */
|
@@ -64,7 +64,7 @@
|
|
64 |
* flexible tool, based upon the foundations of progressive enhancement,
|
65 |
* which will add advanced interaction controls to any HTML table. For a
|
66 |
* full list of features please refer to
|
67 |
-
* [DataTables.net](href="
|
68 |
*
|
69 |
* Note that the `DataTable` object is not a global variable but is aliased
|
70 |
* to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may
|
@@ -1345,7 +1345,7 @@
|
|
1345 |
// Escape regular expression special characters
|
1346 |
var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' );
|
1347 |
|
1348 |
-
//
|
1349 |
// - \u20BD - Russian ruble.
|
1350 |
// - \u20a9 - South Korean Won
|
1351 |
// - \u20BA - Turkish Lira
|
@@ -4509,7 +4509,7 @@
|
|
4509 |
// If it looks like there is an HTML entity in the string,
|
4510 |
// attempt to decode it so sorting works as expected. Note that
|
4511 |
// we could use a single line of jQuery to do this, but the DOM
|
4512 |
-
// method used here is much faster
|
4513 |
if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {
|
4514 |
__filter_div.innerHTML = cellData;
|
4515 |
cellData = __filter_div_textContent ?
|
@@ -6443,7 +6443,7 @@
|
|
6443 |
|
6444 |
if ( tn ) {
|
6445 |
msg += '. For more information about this error, please see '+
|
6446 |
-
'
|
6447 |
}
|
6448 |
|
6449 |
if ( ! level ) {
|
@@ -9408,7 +9408,7 @@
|
|
9408 |
/**
|
9409 |
* Version string for plug-ins to check compatibility. Allowed format is
|
9410 |
* `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used
|
9411 |
-
* only for non-release builds. See
|
9412 |
* @member
|
9413 |
* @type string
|
9414 |
* @default Version number
|
@@ -9981,7 +9981,7 @@
|
|
9981 |
* --------
|
9982 |
*
|
9983 |
* As an object, the parameters in the object are passed to
|
9984 |
-
* [jQuery.ajax](
|
9985 |
* of the Ajax request. DataTables has a number of default parameters which
|
9986 |
* you can override using this option. Please refer to the jQuery
|
9987 |
* documentation for a full description of the options available, although
|
@@ -11688,7 +11688,7 @@
|
|
11688 |
* $(document).ready( function() {
|
11689 |
* $('#example').dataTable( {
|
11690 |
* "language": {
|
11691 |
-
* "url": "
|
11692 |
* }
|
11693 |
* } );
|
11694 |
* } );
|
@@ -14747,7 +14747,7 @@
|
|
14747 |
// string
|
14748 |
"string-pre": function ( a ) {
|
14749 |
// This is a little complex, but faster than always calling toString,
|
14750 |
-
//
|
14751 |
return _empty(a) ?
|
14752 |
'' :
|
14753 |
typeof a === 'string' ?
|
@@ -15256,13 +15256,13 @@
|
|
15256 |
* @copyright Copyright 2014-2016 SpryMedia Ltd.
|
15257 |
*
|
15258 |
* This source file is free software, available under the following license:
|
15259 |
-
* MIT license -
|
15260 |
*
|
15261 |
* This source file is distributed in the hope that it will be useful, but
|
15262 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
15263 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
15264 |
*
|
15265 |
-
* For details please refer to:
|
15266 |
*/
|
15267 |
(function( factory ){
|
15268 |
if ( typeof define === 'function' && define.amd ) {
|
@@ -15396,7 +15396,7 @@ $.extend( Responsive.prototype, {
|
|
15396 |
// resize
|
15397 |
$(window).on( 'resize.dtr orientationchange.dtr', DataTable.util.throttle( function () {
|
15398 |
// iOS has a bug whereby resize can fire when only scrolling
|
15399 |
-
// See:
|
15400 |
var width = $(window).width();
|
15401 |
|
15402 |
if ( width !== oldWindowWidth ) {
|
12 |
* @copyright Copyright 2008-2017 SpryMedia Ltd.
|
13 |
*
|
14 |
* This source file is free software, available under the following license:
|
15 |
+
* MIT license - https://datatables.net/license
|
16 |
*
|
17 |
* This source file is distributed in the hope that it will be useful, but
|
18 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
19 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
20 |
*
|
21 |
+
* For details please refer to: https://www.datatables.net
|
22 |
*/
|
23 |
|
24 |
/*jslint evil: true, undef: true, browser: true */
|
64 |
* flexible tool, based upon the foundations of progressive enhancement,
|
65 |
* which will add advanced interaction controls to any HTML table. For a
|
66 |
* full list of features please refer to
|
67 |
+
* [DataTables.net](href="https://datatables.net).
|
68 |
*
|
69 |
* Note that the `DataTable` object is not a global variable but is aliased
|
70 |
* to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may
|
1345 |
// Escape regular expression special characters
|
1346 |
var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' );
|
1347 |
|
1348 |
+
// https://en.wikipedia.org/wiki/Foreign_exchange_market
|
1349 |
// - \u20BD - Russian ruble.
|
1350 |
// - \u20a9 - South Korean Won
|
1351 |
// - \u20BA - Turkish Lira
|
4509 |
// If it looks like there is an HTML entity in the string,
|
4510 |
// attempt to decode it so sorting works as expected. Note that
|
4511 |
// we could use a single line of jQuery to do this, but the DOM
|
4512 |
+
// method used here is much faster https://jsperf.com/html-decode
|
4513 |
if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {
|
4514 |
__filter_div.innerHTML = cellData;
|
4515 |
cellData = __filter_div_textContent ?
|
6443 |
|
6444 |
if ( tn ) {
|
6445 |
msg += '. For more information about this error, please see '+
|
6446 |
+
'https://datatables.net/tn/'+tn;
|
6447 |
}
|
6448 |
|
6449 |
if ( ! level ) {
|
9408 |
/**
|
9409 |
* Version string for plug-ins to check compatibility. Allowed format is
|
9410 |
* `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used
|
9411 |
+
* only for non-release builds. See https://semver.org/ for more information.
|
9412 |
* @member
|
9413 |
* @type string
|
9414 |
* @default Version number
|
9981 |
* --------
|
9982 |
*
|
9983 |
* As an object, the parameters in the object are passed to
|
9984 |
+
* [jQuery.ajax](https://api.jquery.com/jQuery.ajax/) allowing fine control
|
9985 |
* of the Ajax request. DataTables has a number of default parameters which
|
9986 |
* you can override using this option. Please refer to the jQuery
|
9987 |
* documentation for a full description of the options available, although
|
11688 |
* $(document).ready( function() {
|
11689 |
* $('#example').dataTable( {
|
11690 |
* "language": {
|
11691 |
+
* "url": "https://www.sprymedia.co.uk/dataTables/lang.txt"
|
11692 |
* }
|
11693 |
* } );
|
11694 |
* } );
|
14747 |
// string
|
14748 |
"string-pre": function ( a ) {
|
14749 |
// This is a little complex, but faster than always calling toString,
|
14750 |
+
// https://jsperf.com/tostring-v-check
|
14751 |
return _empty(a) ?
|
14752 |
'' :
|
14753 |
typeof a === 'string' ?
|
15256 |
* @copyright Copyright 2014-2016 SpryMedia Ltd.
|
15257 |
*
|
15258 |
* This source file is free software, available under the following license:
|
15259 |
+
* MIT license - https://datatables.net/license/mit
|
15260 |
*
|
15261 |
* This source file is distributed in the hope that it will be useful, but
|
15262 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
15263 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
15264 |
*
|
15265 |
+
* For details please refer to: https://www.datatables.net
|
15266 |
*/
|
15267 |
(function( factory ){
|
15268 |
if ( typeof define === 'function' && define.amd ) {
|
15396 |
// resize
|
15397 |
$(window).on( 'resize.dtr orientationchange.dtr', DataTable.util.throttle( function () {
|
15398 |
// iOS has a bug whereby resize can fire when only scrolling
|
15399 |
+
// See: https://stackoverflow.com/questions/8898412
|
15400 |
var width = $(window).width();
|
15401 |
|
15402 |
if ( width !== oldWindowWidth ) {
|
admin/datatables/js/datatables-all.min.js
CHANGED
@@ -71,7 +71,7 @@ function wa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=V(a),e=a.oFeatures,f
|
|
71 |
c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:zb(a.oPreviousSearch),columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:zb(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,
|
72 |
b)}}function Ib(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g)&&!(b.columns&&f.length!==b.columns.length))){a.oLoadedState=h.extend(!0,{},b);b.start!==k&&(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==k&&(a._iDisplayLength=b.length);b.order!==k&&(a.aaSorting=[],h.each(b.order,function(b,c){a.aaSorting.push(c[0]>=f.length?[0,c[1]]:c)}));b.search!==
|
73 |
k&&h.extend(a.oPreviousSearch,Ab(b.search));if(b.columns){d=0;for(e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==k&&(f[d].bVisible=g.visible),g.search!==k&&h.extend(a.aoPreSearchCols[d],Ab(g.search))}r(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g=a.fnStateLoadCallback.call(a.oInstance,a,b);g!==k&&b(g)}else c()}function ya(a){var b=m.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function J(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+
|
74 |
-
" - ":"")+c;d&&(c+=". For more information about this error, please see
|
75 |
h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Va(a,b,c){h(a).on("click.DT",b,function(b){a.blur();c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT",function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function r(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+
|
76 |
".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Ra(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Ma(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ha(a,b){var c=[],c=Kb.numbers_length,d=Math.floor(c/2);b<=c?c=W(0,b):a<=d?(c=W(0,
|
77 |
c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=W(b-(c-2),b):(c=W(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function cb(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Wa)},"html-num":function(b){return za(b,a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Wa)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Lb(a){return function(){var b=
|
71 |
c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:zb(a.oPreviousSearch),columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:zb(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,
|
72 |
b)}}function Ib(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g)&&!(b.columns&&f.length!==b.columns.length))){a.oLoadedState=h.extend(!0,{},b);b.start!==k&&(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==k&&(a._iDisplayLength=b.length);b.order!==k&&(a.aaSorting=[],h.each(b.order,function(b,c){a.aaSorting.push(c[0]>=f.length?[0,c[1]]:c)}));b.search!==
|
73 |
k&&h.extend(a.oPreviousSearch,Ab(b.search));if(b.columns){d=0;for(e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==k&&(f[d].bVisible=g.visible),g.search!==k&&h.extend(a.aoPreSearchCols[d],Ab(g.search))}r(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g=a.fnStateLoadCallback.call(a.oInstance,a,b);g!==k&&b(g)}else c()}function ya(a){var b=m.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function J(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+
|
74 |
+
" - ":"")+c;d&&(c+=". For more information about this error, please see https://datatables.net/tn/"+d);if(b)E.console&&console.log&&console.log(c);else if(b=m.ext,b=b.sErrMode||b.errMode,a&&r(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function F(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?F(a,b,d[0],d[1]):F(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Jb(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],
|
75 |
h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Va(a,b,c){h(a).on("click.DT",b,function(b){a.blur();c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT",function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function r(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+
|
76 |
".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Ra(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Ma(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ha(a,b){var c=[],c=Kb.numbers_length,d=Math.floor(c/2);b<=c?c=W(0,b):a<=d?(c=W(0,
|
77 |
c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=W(b-(c-2),b):(c=W(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function cb(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Wa)},"html-num":function(b){return za(b,a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Wa)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Lb(a){return function(){var b=
|
admin/datatables/js/jquery.dataTables.js
CHANGED
@@ -12,13 +12,13 @@
|
|
12 |
* @copyright Copyright 2008-2017 SpryMedia Ltd.
|
13 |
*
|
14 |
* This source file is free software, available under the following license:
|
15 |
-
* MIT license -
|
16 |
*
|
17 |
* This source file is distributed in the hope that it will be useful, but
|
18 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
19 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
20 |
*
|
21 |
-
* For details please refer to:
|
22 |
*/
|
23 |
|
24 |
/*jslint evil: true, undef: true, browser: true */
|
@@ -64,7 +64,7 @@
|
|
64 |
* flexible tool, based upon the foundations of progressive enhancement,
|
65 |
* which will add advanced interaction controls to any HTML table. For a
|
66 |
* full list of features please refer to
|
67 |
-
* [DataTables.net](href="
|
68 |
*
|
69 |
* Note that the `DataTable` object is not a global variable but is aliased
|
70 |
* to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may
|
@@ -1345,7 +1345,7 @@
|
|
1345 |
// Escape regular expression special characters
|
1346 |
var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' );
|
1347 |
|
1348 |
-
//
|
1349 |
// - \u20BD - Russian ruble.
|
1350 |
// - \u20a9 - South Korean Won
|
1351 |
// - \u20BA - Turkish Lira
|
@@ -4509,7 +4509,7 @@
|
|
4509 |
// If it looks like there is an HTML entity in the string,
|
4510 |
// attempt to decode it so sorting works as expected. Note that
|
4511 |
// we could use a single line of jQuery to do this, but the DOM
|
4512 |
-
// method used here is much faster
|
4513 |
if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {
|
4514 |
__filter_div.innerHTML = cellData;
|
4515 |
cellData = __filter_div_textContent ?
|
@@ -6443,7 +6443,7 @@
|
|
6443 |
|
6444 |
if ( tn ) {
|
6445 |
msg += '. For more information about this error, please see '+
|
6446 |
-
'
|
6447 |
}
|
6448 |
|
6449 |
if ( ! level ) {
|
@@ -9408,7 +9408,7 @@
|
|
9408 |
/**
|
9409 |
* Version string for plug-ins to check compatibility. Allowed format is
|
9410 |
* `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used
|
9411 |
-
* only for non-release builds. See
|
9412 |
* @member
|
9413 |
* @type string
|
9414 |
* @default Version number
|
@@ -9981,7 +9981,7 @@
|
|
9981 |
* --------
|
9982 |
*
|
9983 |
* As an object, the parameters in the object are passed to
|
9984 |
-
* [jQuery.ajax](
|
9985 |
* of the Ajax request. DataTables has a number of default parameters which
|
9986 |
* you can override using this option. Please refer to the jQuery
|
9987 |
* documentation for a full description of the options available, although
|
@@ -11688,7 +11688,7 @@
|
|
11688 |
* $(document).ready( function() {
|
11689 |
* $('#example').dataTable( {
|
11690 |
* "language": {
|
11691 |
-
* "url": "
|
11692 |
* }
|
11693 |
* } );
|
11694 |
* } );
|
@@ -14747,7 +14747,7 @@
|
|
14747 |
// string
|
14748 |
"string-pre": function ( a ) {
|
14749 |
// This is a little complex, but faster than always calling toString,
|
14750 |
-
//
|
14751 |
return _empty(a) ?
|
14752 |
'' :
|
14753 |
typeof a === 'string' ?
|
12 |
* @copyright Copyright 2008-2017 SpryMedia Ltd.
|
13 |
*
|
14 |
* This source file is free software, available under the following license:
|
15 |
+
* MIT license - https://datatables.net/license
|
16 |
*
|
17 |
* This source file is distributed in the hope that it will be useful, but
|
18 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
19 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
20 |
*
|
21 |
+
* For details please refer to: https://www.datatables.net
|
22 |
*/
|
23 |
|
24 |
/*jslint evil: true, undef: true, browser: true */
|
64 |
* flexible tool, based upon the foundations of progressive enhancement,
|
65 |
* which will add advanced interaction controls to any HTML table. For a
|
66 |
* full list of features please refer to
|
67 |
+
* [DataTables.net](href="https://datatables.net).
|
68 |
*
|
69 |
* Note that the `DataTable` object is not a global variable but is aliased
|
70 |
* to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may
|
1345 |
// Escape regular expression special characters
|
1346 |
var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' );
|
1347 |
|
1348 |
+
// https://en.wikipedia.org/wiki/Foreign_exchange_market
|
1349 |
// - \u20BD - Russian ruble.
|
1350 |
// - \u20a9 - South Korean Won
|
1351 |
// - \u20BA - Turkish Lira
|
4509 |
// If it looks like there is an HTML entity in the string,
|
4510 |
// attempt to decode it so sorting works as expected. Note that
|
4511 |
// we could use a single line of jQuery to do this, but the DOM
|
4512 |
+
// method used here is much faster https://jsperf.com/html-decode
|
4513 |
if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {
|
4514 |
__filter_div.innerHTML = cellData;
|
4515 |
cellData = __filter_div_textContent ?
|
6443 |
|
6444 |
if ( tn ) {
|
6445 |
msg += '. For more information about this error, please see '+
|
6446 |
+
'https://datatables.net/tn/'+tn;
|
6447 |
}
|
6448 |
|
6449 |
if ( ! level ) {
|
9408 |
/**
|
9409 |
* Version string for plug-ins to check compatibility. Allowed format is
|
9410 |
* `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used
|
9411 |
+
* only for non-release builds. See https://semver.org/ for more information.
|
9412 |
* @member
|
9413 |
* @type string
|
9414 |
* @default Version number
|
9981 |
* --------
|
9982 |
*
|
9983 |
* As an object, the parameters in the object are passed to
|
9984 |
+
* [jQuery.ajax](https://api.jquery.com/jQuery.ajax/) allowing fine control
|
9985 |
* of the Ajax request. DataTables has a number of default parameters which
|
9986 |
* you can override using this option. Please refer to the jQuery
|
9987 |
* documentation for a full description of the options available, although
|
11688 |
* $(document).ready( function() {
|
11689 |
* $('#example').dataTable( {
|
11690 |
* "language": {
|
11691 |
+
* "url": "https://www.sprymedia.co.uk/dataTables/lang.txt"
|
11692 |
* }
|
11693 |
* } );
|
11694 |
* } );
|
14747 |
// string
|
14748 |
"string-pre": function ( a ) {
|
14749 |
// This is a little complex, but faster than always calling toString,
|
14750 |
+
// https://jsperf.com/tostring-v-check
|
14751 |
return _empty(a) ?
|
14752 |
'' :
|
14753 |
typeof a === 'string' ?
|
admin/datatables/js/jquery.dataTables.min.js
CHANGED
@@ -71,7 +71,7 @@ function wa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=V(a),e=a.oFeatures,f
|
|
71 |
c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:zb(a.oPreviousSearch),columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:zb(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,
|
72 |
b)}}function Ib(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g)&&!(b.columns&&f.length!==b.columns.length))){a.oLoadedState=h.extend(!0,{},b);b.start!==k&&(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==k&&(a._iDisplayLength=b.length);b.order!==k&&(a.aaSorting=[],h.each(b.order,function(b,c){a.aaSorting.push(c[0]>=f.length?[0,c[1]]:c)}));b.search!==
|
73 |
k&&h.extend(a.oPreviousSearch,Ab(b.search));if(b.columns){d=0;for(e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==k&&(f[d].bVisible=g.visible),g.search!==k&&h.extend(a.aoPreSearchCols[d],Ab(g.search))}r(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g=a.fnStateLoadCallback.call(a.oInstance,a,b);g!==k&&b(g)}else c()}function ya(a){var b=m.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function J(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+
|
74 |
-
" - ":"")+c;d&&(c+=". For more information about this error, please see
|
75 |
h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Va(a,b,c){h(a).on("click.DT",b,function(b){a.blur();c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT",function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function r(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+
|
76 |
".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Ra(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Ma(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ha(a,b){var c=[],c=Kb.numbers_length,d=Math.floor(c/2);b<=c?c=W(0,b):a<=d?(c=W(0,
|
77 |
c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=W(b-(c-2),b):(c=W(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function cb(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Wa)},"html-num":function(b){return za(b,a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Wa)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Lb(a){return function(){var b=
|
71 |
c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:zb(a.oPreviousSearch),columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:zb(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,
|
72 |
b)}}function Ib(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g)&&!(b.columns&&f.length!==b.columns.length))){a.oLoadedState=h.extend(!0,{},b);b.start!==k&&(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==k&&(a._iDisplayLength=b.length);b.order!==k&&(a.aaSorting=[],h.each(b.order,function(b,c){a.aaSorting.push(c[0]>=f.length?[0,c[1]]:c)}));b.search!==
|
73 |
k&&h.extend(a.oPreviousSearch,Ab(b.search));if(b.columns){d=0;for(e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==k&&(f[d].bVisible=g.visible),g.search!==k&&h.extend(a.aoPreSearchCols[d],Ab(g.search))}r(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g=a.fnStateLoadCallback.call(a.oInstance,a,b);g!==k&&b(g)}else c()}function ya(a){var b=m.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function J(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+
|
74 |
+
" - ":"")+c;d&&(c+=". For more information about this error, please see https://datatables.net/tn/"+d);if(b)E.console&&console.log&&console.log(c);else if(b=m.ext,b=b.sErrMode||b.errMode,a&&r(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function F(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?F(a,b,d[0],d[1]):F(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Jb(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],
|
75 |
h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Va(a,b,c){h(a).on("click.DT",b,function(b){a.blur();c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT",function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function r(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+
|
76 |
".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Ra(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Ma(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ha(a,b){var c=[],c=Kb.numbers_length,d=Math.floor(c/2);b<=c?c=W(0,b):a<=d?(c=W(0,
|
77 |
c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=W(b-(c-2),b):(c=W(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function cb(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Wa)},"html-num":function(b){return za(b,a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Wa)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Lb(a){return function(){var b=
|
admin/datatables/license.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
Copyright (c) 2008-2015 SpryMedia Limited
|
2 |
-
|
3 |
|
4 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
of this software and associated documentation files (the "Software"), to deal
|
1 |
Copyright (c) 2008-2015 SpryMedia Limited
|
2 |
+
https://datatables.net
|
3 |
|
4 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
of this software and associated documentation files (the "Software"), to deal
|
admin/images/ajax-loader-snake.gif
ADDED
Binary file
|
admin/includes/class-admin-ajax.php
CHANGED
@@ -40,9 +40,9 @@ class IP_Geo_Block_Admin_Ajax {
|
|
40 |
}
|
41 |
|
42 |
$tmp = microtime( TRUE );
|
43 |
-
$res['host'] = esc_html( IP_Geo_Block_Lkup::gethostbyaddr( $ip ) );
|
44 |
$tmp = microtime( TRUE ) - $tmp;
|
45 |
-
$res['DNS
|
46 |
}
|
47 |
|
48 |
return $res;
|
@@ -72,7 +72,7 @@ class IP_Geo_Block_Admin_Ajax {
|
|
72 |
FALSE === $ret ? __( 'n/a', 'ip-geo-block' ) : (
|
73 |
! empty( $ret['errorMessage'] ) ? $ret['errorMessage'] : (
|
74 |
! empty( $ret['countryCode' ] ) ? $ret['countryCode' ] :
|
75 |
-
__( '
|
76 |
),
|
77 |
);
|
78 |
}
|
@@ -149,9 +149,9 @@ class IP_Geo_Block_Admin_Ajax {
|
|
149 |
array_shift( $row ); // remove `No`
|
150 |
$row = array_map( 'esc_html', $row );
|
151 |
|
152 |
-
if ( $options['anonymize'] ) {
|
153 |
-
$row[2] =
|
154 |
-
$row[8] =
|
155 |
}
|
156 |
|
157 |
$res[] = array(
|
@@ -179,7 +179,9 @@ class IP_Geo_Block_Admin_Ajax {
|
|
179 |
* @param string $which 'comment', 'xmlrpc', 'login', 'admin' or 'public'
|
180 |
*/
|
181 |
public static function restore_logs( $which ) {
|
182 |
-
return array( 'data' => self::format_logs(
|
|
|
|
|
183 |
}
|
184 |
|
185 |
/**
|
@@ -256,7 +258,7 @@ class IP_Geo_Block_Admin_Ajax {
|
|
256 |
/* AS number */ $val['asn' ],
|
257 |
/* Host name */ $val['host'],
|
258 |
/* Target */ $val['hook'],
|
259 |
-
/* Failure / Total */ sprintf( '%d / %d', (int)$val['fail'], (int)$val['
|
260 |
/* Elapsed[sec] */ $time - (int)$val['time'],
|
261 |
) ) . PHP_EOL;
|
262 |
}
|
@@ -293,7 +295,7 @@ class IP_Geo_Block_Admin_Ajax {
|
|
293 |
/* AS number */ '<span>' . esc_html( $val['asn' ] ) . '</span>',
|
294 |
/* Host name */ '<span>' . esc_html( $val['host'] ) . '</span>',
|
295 |
/* Target */ '<span>' . esc_html( $val['hook'] ) . '</span>',
|
296 |
-
/* Fails/Calls */ '<span>' . sprintf( '%d / %d', (int)$val['fail'], (int)$val['
|
297 |
/* Elapsed[sec] */ '<span>' . ( $time - (int)$val['time'] ) . '</span>',
|
298 |
);
|
299 |
}
|
@@ -306,7 +308,18 @@ class IP_Geo_Block_Admin_Ajax {
|
|
306 |
*/
|
307 |
public static function get_network_count() {
|
308 |
if ( ! defined( 'TEST_RESTORE_NETWORK' ) or ! TEST_RESTORE_NETWORK ):
|
309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
else:
|
311 |
return TEST_NETWORK_BLOG_COUNT;
|
312 |
endif;
|
@@ -347,7 +360,7 @@ if ( ! defined( 'TEST_RESTORE_NETWORK' ) or ! TEST_RESTORE_NETWORK ):
|
|
347 |
foreach ( $wpdb->get_col( "SELECT `blog_id` FROM `$wpdb->blogs`" ) as $id ) {
|
348 |
switch_to_blog( $id );
|
349 |
|
350 |
-
if ( $offset <= $i && $i < $length ) {
|
351 |
// array of ( `time`, `ip`, `hook`, `code`, `method`, `data` )
|
352 |
$name = get_bloginfo( 'name' );
|
353 |
$logs = IP_Geo_Block_Logs::get_recent_logs( $duration );
|
@@ -361,12 +374,12 @@ if ( ! defined( 'TEST_RESTORE_NETWORK' ) or ! TEST_RESTORE_NETWORK ):
|
|
361 |
|
362 |
// link over network
|
363 |
$count[ $name ]['link'] = esc_url( add_query_arg(
|
364 |
-
array( 'page' => IP_Geo_Block::PLUGIN_NAME
|
365 |
admin_url( 'options-general.php' )
|
366 |
) );
|
367 |
-
|
368 |
-
restore_current_blog();
|
369 |
}
|
|
|
|
|
370 |
}
|
371 |
else:
|
372 |
for ( $i = 0; $i < TEST_NETWORK_BLOG_COUNT; ++$i ) {
|
@@ -509,12 +522,12 @@ endif; // TEST_RESTORE_NETWORK
|
|
509 |
'[extra_ips][white_list]',
|
510 |
'[extra_ips][black_list]',
|
511 |
'[anonymize]',
|
|
|
512 |
'[signature]',
|
513 |
'[login_fails]',
|
514 |
'[response_code]',
|
515 |
'[response_msg]', // 3.0.0
|
516 |
'[redirect_uri]', // 3.0.0
|
517 |
-
'[restrict_api]', // 3.0.13
|
518 |
'[validation][timing]', // 2.2.9
|
519 |
'[validation][proxy]',
|
520 |
'[validation][comment]',
|
@@ -702,8 +715,8 @@ endif; // TEST_RESTORE_NETWORK
|
|
702 |
}
|
703 |
|
704 |
// Fallback function for PHP 5.3 and under
|
705 |
-
// @link
|
706 |
-
// @link
|
707 |
private static function json_unescaped_unicode( $input ) {
|
708 |
return preg_replace_callback(
|
709 |
'/(?:\\\\u[0-9a-zA-Z]{4})++/',
|
@@ -765,6 +778,7 @@ endif; // TEST_RESTORE_NETWORK
|
|
765 |
$result += array( $matches[1] => $which );
|
766 |
}
|
767 |
}
|
|
|
768 |
}
|
769 |
|
770 |
return $result;
|
@@ -836,7 +850,7 @@ endif; // TEST_RESTORE_NETWORK
|
|
836 |
'PECL phar:' => class_exists( 'PharData', FALSE ) ? 'yes' : 'no',
|
837 |
'BC Math:' => (extension_loaded('gmp') ? 'gmp ' : '') . (function_exists('bcadd') ? 'yes' : 'no'),
|
838 |
'mb_strcut:' => function_exists( 'mb_strcut' ) ? 'yes' : 'no', // @since PHP 4.0.6
|
839 |
-
'OpenSSL:' =>
|
840 |
'SQLite(PDO):' => extension_loaded( 'pdo_sqlite' ) ? 'yes' : 'no',
|
841 |
'DNS lookup:' => ('8.8.8.8' !== $val ? 'available' : 'n/a') . sprintf( ' [%.1f msec]', $key * 1000.0 ),
|
842 |
'User agent:' => $_SERVER['HTTP_USER_AGENT'],
|
40 |
}
|
41 |
|
42 |
$tmp = microtime( TRUE );
|
43 |
+
$res['host (DNS)'] = esc_html( IP_Geo_Block_Lkup::gethostbyaddr( $ip ) );
|
44 |
$tmp = microtime( TRUE ) - $tmp;
|
45 |
+
$res['host (DNS)'] .= sprintf( ' (%.1f [msec])', $tmp * 1000.0 );
|
46 |
}
|
47 |
|
48 |
return $res;
|
72 |
FALSE === $ret ? __( 'n/a', 'ip-geo-block' ) : (
|
73 |
! empty( $ret['errorMessage'] ) ? $ret['errorMessage'] : (
|
74 |
! empty( $ret['countryCode' ] ) ? $ret['countryCode' ] :
|
75 |
+
__( 'n/a', 'ip-geo-block' ) ) )
|
76 |
),
|
77 |
);
|
78 |
}
|
149 |
array_shift( $row ); // remove `No`
|
150 |
$row = array_map( 'esc_html', $row );
|
151 |
|
152 |
+
if ( $options['anonymize'] && FALSE === strpos( $row[2], '***' ) ) {
|
153 |
+
$row[2] = IP_Geo_Block_Util::anonymize_ip( $row[2], TRUE );
|
154 |
+
$row[8] = IP_Geo_Block_Util::anonymize_ip( $row[8], FALSE );
|
155 |
}
|
156 |
|
157 |
$res[] = array(
|
179 |
* @param string $which 'comment', 'xmlrpc', 'login', 'admin' or 'public'
|
180 |
*/
|
181 |
public static function restore_logs( $which ) {
|
182 |
+
return array( 'data' => self::format_logs(
|
183 |
+
apply_filters( IP_Geo_Block::PLUGIN_NAME . '-logs', IP_Geo_Block_Logs::restore_logs( $which ) )
|
184 |
+
) ); // DataTables requires `data`
|
185 |
}
|
186 |
|
187 |
/**
|
258 |
/* AS number */ $val['asn' ],
|
259 |
/* Host name */ $val['host'],
|
260 |
/* Target */ $val['hook'],
|
261 |
+
/* Failure / Total */ sprintf( '%d / %d', (int)$val['fail'], (int)$val['reqs'] ),
|
262 |
/* Elapsed[sec] */ $time - (int)$val['time'],
|
263 |
) ) . PHP_EOL;
|
264 |
}
|
295 |
/* AS number */ '<span>' . esc_html( $val['asn' ] ) . '</span>',
|
296 |
/* Host name */ '<span>' . esc_html( $val['host'] ) . '</span>',
|
297 |
/* Target */ '<span>' . esc_html( $val['hook'] ) . '</span>',
|
298 |
+
/* Fails/Calls */ '<span>' . sprintf( '%d / %d', (int)$val['fail'], (int)$val['reqs'] ) . '</span>',
|
299 |
/* Elapsed[sec] */ '<span>' . ( $time - (int)$val['time'] ) . '</span>',
|
300 |
);
|
301 |
}
|
308 |
*/
|
309 |
public static function get_network_count() {
|
310 |
if ( ! defined( 'TEST_RESTORE_NETWORK' ) or ! TEST_RESTORE_NETWORK ):
|
311 |
+
if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) {
|
312 |
+
return get_blog_count(); // get_sites( array( 'count' => TRUE ) ) @since 4.6
|
313 |
+
} else {
|
314 |
+
$count = 0;
|
315 |
+
global $wpdb;
|
316 |
+
foreach ( $wpdb->get_col( "SELECT `blog_id` FROM `$wpdb->blogs`" ) as $id ) {
|
317 |
+
switch_to_blog( $id );
|
318 |
+
is_plugin_active( IP_GEO_BLOCK_BASE ) and ++$count;
|
319 |
+
restore_current_blog();
|
320 |
+
}
|
321 |
+
return $count;
|
322 |
+
}
|
323 |
else:
|
324 |
return TEST_NETWORK_BLOG_COUNT;
|
325 |
endif;
|
360 |
foreach ( $wpdb->get_col( "SELECT `blog_id` FROM `$wpdb->blogs`" ) as $id ) {
|
361 |
switch_to_blog( $id );
|
362 |
|
363 |
+
if ( is_plugin_active( IP_GEO_BLOCK_BASE ) && $offset <= $i && $i < $length ) {
|
364 |
// array of ( `time`, `ip`, `hook`, `code`, `method`, `data` )
|
365 |
$name = get_bloginfo( 'name' );
|
366 |
$logs = IP_Geo_Block_Logs::get_recent_logs( $duration );
|
374 |
|
375 |
// link over network
|
376 |
$count[ $name ]['link'] = esc_url( add_query_arg(
|
377 |
+
array( 'page' => IP_Geo_Block::PLUGIN_NAME ),
|
378 |
admin_url( 'options-general.php' )
|
379 |
) );
|
|
|
|
|
380 |
}
|
381 |
+
|
382 |
+
restore_current_blog();
|
383 |
}
|
384 |
else:
|
385 |
for ( $i = 0; $i < TEST_NETWORK_BLOG_COUNT; ++$i ) {
|
522 |
'[extra_ips][white_list]',
|
523 |
'[extra_ips][black_list]',
|
524 |
'[anonymize]',
|
525 |
+
'[restrict_api]', // 3.0.13
|
526 |
'[signature]',
|
527 |
'[login_fails]',
|
528 |
'[response_code]',
|
529 |
'[response_msg]', // 3.0.0
|
530 |
'[redirect_uri]', // 3.0.0
|
|
|
531 |
'[validation][timing]', // 2.2.9
|
532 |
'[validation][proxy]',
|
533 |
'[validation][comment]',
|
715 |
}
|
716 |
|
717 |
// Fallback function for PHP 5.3 and under
|
718 |
+
// @link https://qiita.com/keromichan16/items/5ff45a77fb0d48e046cc
|
719 |
+
// @link https://stackoverflow.com/questions/16498286/why-does-the-php-json-encode-function-convert-utf-8-strings-to-hexadecimal-entit/
|
720 |
private static function json_unescaped_unicode( $input ) {
|
721 |
return preg_replace_callback(
|
722 |
'/(?:\\\\u[0-9a-zA-Z]{4})++/',
|
778 |
$result += array( $matches[1] => $which );
|
779 |
}
|
780 |
}
|
781 |
+
break;
|
782 |
}
|
783 |
|
784 |
return $result;
|
850 |
'PECL phar:' => class_exists( 'PharData', FALSE ) ? 'yes' : 'no',
|
851 |
'BC Math:' => (extension_loaded('gmp') ? 'gmp ' : '') . (function_exists('bcadd') ? 'yes' : 'no'),
|
852 |
'mb_strcut:' => function_exists( 'mb_strcut' ) ? 'yes' : 'no', // @since PHP 4.0.6
|
853 |
+
'OpenSSL:' => defined( 'OPENSSL_RAW_DATA' ) ? 'yes' : 'no', // @since PHP 5.3.3
|
854 |
'SQLite(PDO):' => extension_loaded( 'pdo_sqlite' ) ? 'yes' : 'no',
|
855 |
'DNS lookup:' => ('8.8.8.8' !== $val ? 'available' : 'n/a') . sprintf( ' [%.1f msec]', $key * 1000.0 ),
|
856 |
'User agent:' => $_SERVER['HTTP_USER_AGENT'],
|
admin/includes/class-admin-rewrite.php
CHANGED
@@ -67,7 +67,7 @@ class IP_Geo_Block_Admin_Rewrite {
|
|
67 |
);
|
68 |
|
69 |
private function __construct() {
|
70 |
-
//
|
71 |
$this->doc_root = str_replace( DIRECTORY_SEPARATOR, '/', str_replace( $_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME'] ) );
|
72 |
$this->base_uri = str_replace( $this->doc_root, '', str_replace( DIRECTORY_SEPARATOR, '/', IP_GEO_BLOCK_PATH ) );
|
73 |
|
@@ -166,7 +166,7 @@ class IP_Geo_Block_Admin_Rewrite {
|
|
166 |
if ( ! $fs->is_readable( $file ) ) {
|
167 |
return new WP_Error( 'Error',
|
168 |
sprintf( __( 'Unable to read <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $file ) . ' ' .
|
169 |
-
sprintf( __( 'Or please refer to %s to set it manually.', 'ip-geo-block' ), '<a href="
|
170 |
);
|
171 |
}
|
172 |
}
|
@@ -192,7 +192,7 @@ class IP_Geo_Block_Admin_Rewrite {
|
|
192 |
if ( ! $file || FALSE === $fs->put_contents( $file, implode( PHP_EOL, $content ) ) ) {
|
193 |
$this->show_message(
|
194 |
sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $file ) . ' ' .
|
195 |
-
sprintf( __( 'Or please refer to %s to set it manually.', 'ip-geo-block' ), '<a href="
|
196 |
);
|
197 |
return FALSE;
|
198 |
}
|
67 |
);
|
68 |
|
69 |
private function __construct() {
|
70 |
+
// https://stackoverflow.com/questions/25017381/setting-php-document-root-on-webserver
|
71 |
$this->doc_root = str_replace( DIRECTORY_SEPARATOR, '/', str_replace( $_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME'] ) );
|
72 |
$this->base_uri = str_replace( $this->doc_root, '', str_replace( DIRECTORY_SEPARATOR, '/', IP_GEO_BLOCK_PATH ) );
|
73 |
|
166 |
if ( ! $fs->is_readable( $file ) ) {
|
167 |
return new WP_Error( 'Error',
|
168 |
sprintf( __( 'Unable to read <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $file ) . ' ' .
|
169 |
+
sprintf( __( 'Or please refer to %s to set it manually.', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/how-to-fix-permission-troubles.html" title="How to fix permission troubles? | IP Geo Block">How to fix permission troubles?</a>' )
|
170 |
);
|
171 |
}
|
172 |
}
|
192 |
if ( ! $file || FALSE === $fs->put_contents( $file, implode( PHP_EOL, $content ) ) ) {
|
193 |
$this->show_message(
|
194 |
sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $file ) . ' ' .
|
195 |
+
sprintf( __( 'Or please refer to %s to set it manually.', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/how-to-fix-permission-troubles.html" title="How to fix permission troubles? | IP Geo Block">How to fix permission troubles?</a>' )
|
196 |
);
|
197 |
return FALSE;
|
198 |
}
|
admin/includes/tab-accesslog.php
CHANGED
@@ -16,7 +16,7 @@ class IP_Geo_Block_Admin_Tab {
|
|
16 |
*----------------------------------------*/
|
17 |
add_settings_section(
|
18 |
$section = $plugin_slug . '-logs',
|
19 |
-
array( __( 'Validation logs', 'ip-geo-block' ), '<a href="
|
20 |
( $options['validation']['reclogs'] ?
|
21 |
array( __CLASS__, 'validation_logs' ) :
|
22 |
array( __CLASS__, 'warn_accesslog' )
|
@@ -26,6 +26,7 @@ class IP_Geo_Block_Admin_Tab {
|
|
26 |
|
27 |
if ( $options['validation']['reclogs'] ):
|
28 |
|
|
|
29 |
$html = '<ul id="ip-geo-block-live-log">';
|
30 |
$html .= '<li><input type="radio" name="ip-geo-block-live-log" id="ip-geo-block-live-log-start" value="start"><label for="ip-geo-block-live-log-start" title="Start"><span class="ip-geo-block-icon-play"></span></label></li>';
|
31 |
$html .= '<li><input type="radio" name="ip-geo-block-live-log" id="ip-geo-block-live-log-pause" value="pause"><label for="ip-geo-block-live-log-pause" title="Pause"><span class="ip-geo-block-icon-pause"></span></label></li>';
|
@@ -33,9 +34,8 @@ if ( $options['validation']['reclogs'] ):
|
|
33 |
$html .= '</ul>';
|
34 |
|
35 |
// Live update
|
36 |
-
$field = 'live-log';
|
37 |
add_settings_field(
|
38 |
-
$option_name.'
|
39 |
__( 'Live update', 'ip-geo-block' ) . '<div id="ip-geo-block-live-loading"><div></div><div></div></div>',
|
40 |
array( $context, 'callback_field' ),
|
41 |
$option_slug,
|
@@ -43,11 +43,12 @@ if ( $options['validation']['reclogs'] ):
|
|
43 |
array(
|
44 |
'type' => 'html',
|
45 |
'option' => $option_name,
|
46 |
-
'field' =>
|
47 |
'value' => $html,
|
48 |
'class' => isset( $cookie[ $tab ][1] ) && $cookie[ $tab ][1] === 'o' ? '' : 'ip-geo-block-hide',
|
49 |
)
|
50 |
);
|
|
|
51 |
|
52 |
// make a list of target (same as in tab-accesslog.php)
|
53 |
$target = array(
|
@@ -65,9 +66,8 @@ if ( $options['validation']['reclogs'] ):
|
|
65 |
}
|
66 |
|
67 |
// Select target
|
68 |
-
$field = 'select_target';
|
69 |
add_settings_field(
|
70 |
-
$option_name.'
|
71 |
__( 'Select target', 'ip-geo-block' ),
|
72 |
array( $context, 'callback_field' ),
|
73 |
$option_slug,
|
@@ -75,15 +75,14 @@ if ( $options['validation']['reclogs'] ):
|
|
75 |
array(
|
76 |
'type' => 'html',
|
77 |
'option' => $option_name,
|
78 |
-
'field' =>
|
79 |
'value' => '<ul id="' . $plugin_slug . '-select-target">' . $html . '</ul>',
|
80 |
)
|
81 |
);
|
82 |
|
83 |
// Search in logs
|
84 |
-
$field = 'search_filter';
|
85 |
add_settings_field(
|
86 |
-
$option_name.'
|
87 |
__( 'Search in logs', 'ip-geo-block' ),
|
88 |
array( $context, 'callback_field' ),
|
89 |
$option_slug,
|
@@ -91,16 +90,38 @@ if ( $options['validation']['reclogs'] ):
|
|
91 |
array(
|
92 |
'type' => 'text',
|
93 |
'option' => $option_name,
|
94 |
-
'field' =>
|
95 |
'value' => isset( $_GET['s'] ) ? esc_html( $_GET['s'] ) : '', // preset filter
|
96 |
'after' => '<a class="button button-secondary" id="ip-geo-block-reset-filter" title="' . __( 'Reset', 'ip-geo-block' ) . '" href="#!">'. __( 'Reset', 'ip-geo-block' ) . '</a>',
|
97 |
)
|
98 |
);
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
// Bulk action
|
101 |
-
$field = 'bulk_action';
|
102 |
add_settings_field(
|
103 |
-
$option_name.'
|
104 |
__( 'Bulk action', 'ip-geo-block' ),
|
105 |
array( $context, 'callback_field' ),
|
106 |
$option_slug,
|
@@ -108,7 +129,7 @@ if ( $options['validation']['reclogs'] ):
|
|
108 |
array(
|
109 |
'type' => 'select',
|
110 |
'option' => $option_name,
|
111 |
-
'field' =>
|
112 |
'value' => 0,
|
113 |
'list' => array(
|
114 |
0 => NULL,
|
@@ -123,9 +144,8 @@ if ( $options['validation']['reclogs'] ):
|
|
123 |
);
|
124 |
|
125 |
// Clear logs
|
126 |
-
$field = 'clear_all';
|
127 |
add_settings_field(
|
128 |
-
$option_name.'
|
129 |
__( 'Clear logs', 'ip-geo-block' ),
|
130 |
array( $context, 'callback_field' ),
|
131 |
$option_slug,
|
@@ -133,7 +153,7 @@ if ( $options['validation']['reclogs'] ):
|
|
133 |
array(
|
134 |
'type' => 'button',
|
135 |
'option' => $option_name,
|
136 |
-
'field' =>
|
137 |
'value' => __( 'Clear all', 'ip-geo-block' ),
|
138 |
'after' => '<div id="'.$plugin_slug.'-logs"></div>',
|
139 |
'class' => empty( $cookie[ $tab ][1] ) || $cookie[ $tab ][1] !== 'o' ? '' : 'ip-geo-block-hide',
|
@@ -141,9 +161,8 @@ if ( $options['validation']['reclogs'] ):
|
|
141 |
);
|
142 |
|
143 |
// Export logs
|
144 |
-
$field = 'export_logs';
|
145 |
add_settings_field(
|
146 |
-
$option_name.'
|
147 |
__( 'Export logs', 'ip-geo-block' ),
|
148 |
array( $context, 'callback_field' ),
|
149 |
$option_slug,
|
@@ -171,7 +190,7 @@ endif; // $options['validation']['reclogs']
|
|
171 |
public static function warn_accesslog() {
|
172 |
$context = IP_Geo_Block_Admin::get_instance();
|
173 |
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
|
174 |
-
echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord “
|
175 |
echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
|
176 |
}
|
177 |
|
16 |
*----------------------------------------*/
|
17 |
add_settings_section(
|
18 |
$section = $plugin_slug . '-logs',
|
19 |
+
array( __( 'Validation logs', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/record-settings-and-logs.html" title="Validation logs | IP Geo Block">' . __( 'Help', 'ip-geo-block' ) . '</a>' ),
|
20 |
( $options['validation']['reclogs'] ?
|
21 |
array( __CLASS__, 'validation_logs' ) :
|
22 |
array( __CLASS__, 'warn_accesslog' )
|
26 |
|
27 |
if ( $options['validation']['reclogs'] ):
|
28 |
|
29 |
+
if ( extension_loaded( 'pdo_sqlite' ) ):
|
30 |
$html = '<ul id="ip-geo-block-live-log">';
|
31 |
$html .= '<li><input type="radio" name="ip-geo-block-live-log" id="ip-geo-block-live-log-start" value="start"><label for="ip-geo-block-live-log-start" title="Start"><span class="ip-geo-block-icon-play"></span></label></li>';
|
32 |
$html .= '<li><input type="radio" name="ip-geo-block-live-log" id="ip-geo-block-live-log-pause" value="pause"><label for="ip-geo-block-live-log-pause" title="Pause"><span class="ip-geo-block-icon-pause"></span></label></li>';
|
34 |
$html .= '</ul>';
|
35 |
|
36 |
// Live update
|
|
|
37 |
add_settings_field(
|
38 |
+
$option_name.'_live-log',
|
39 |
__( 'Live update', 'ip-geo-block' ) . '<div id="ip-geo-block-live-loading"><div></div><div></div></div>',
|
40 |
array( $context, 'callback_field' ),
|
41 |
$option_slug,
|
43 |
array(
|
44 |
'type' => 'html',
|
45 |
'option' => $option_name,
|
46 |
+
'field' => 'live-log',
|
47 |
'value' => $html,
|
48 |
'class' => isset( $cookie[ $tab ][1] ) && $cookie[ $tab ][1] === 'o' ? '' : 'ip-geo-block-hide',
|
49 |
)
|
50 |
);
|
51 |
+
endif; // extension_loaded( 'pdo_sqlite' )
|
52 |
|
53 |
// make a list of target (same as in tab-accesslog.php)
|
54 |
$target = array(
|
66 |
}
|
67 |
|
68 |
// Select target
|
|
|
69 |
add_settings_field(
|
70 |
+
$option_name.'_select_target',
|
71 |
__( 'Select target', 'ip-geo-block' ),
|
72 |
array( $context, 'callback_field' ),
|
73 |
$option_slug,
|
75 |
array(
|
76 |
'type' => 'html',
|
77 |
'option' => $option_name,
|
78 |
+
'field' => 'select_target',
|
79 |
'value' => '<ul id="' . $plugin_slug . '-select-target">' . $html . '</ul>',
|
80 |
)
|
81 |
);
|
82 |
|
83 |
// Search in logs
|
|
|
84 |
add_settings_field(
|
85 |
+
$option_name.'_search_filter',
|
86 |
__( 'Search in logs', 'ip-geo-block' ),
|
87 |
array( $context, 'callback_field' ),
|
88 |
$option_slug,
|
90 |
array(
|
91 |
'type' => 'text',
|
92 |
'option' => $option_name,
|
93 |
+
'field' => 'search_filter',
|
94 |
'value' => isset( $_GET['s'] ) ? esc_html( $_GET['s'] ) : '', // preset filter
|
95 |
'after' => '<a class="button button-secondary" id="ip-geo-block-reset-filter" title="' . __( 'Reset', 'ip-geo-block' ) . '" href="#!">'. __( 'Reset', 'ip-geo-block' ) . '</a>',
|
96 |
)
|
97 |
);
|
98 |
|
99 |
+
// Preset filters
|
100 |
+
$filters = apply_filters( $plugin_slug . '-logs-preset', array() );
|
101 |
+
if ( ! empty( $filters ) ) {
|
102 |
+
$html = '<ul id="ip-geo-block-logs-preset">';
|
103 |
+
foreach ( $filters as $filter ) {
|
104 |
+
$html .= '<li><a href="#!" data-value="' . esc_attr( $filter['value'] ) . '">' . esc_html( $filter['title'] ) . '</a></li>';
|
105 |
+
}
|
106 |
+
|
107 |
+
add_settings_field(
|
108 |
+
$option_name.'_logs_preset',
|
109 |
+
'<div class="ip-geo-block-subitem">' . __( 'Preset filters', 'ip-geo-block' ) . '</div>',
|
110 |
+
array( $context, 'callback_field' ),
|
111 |
+
$option_slug,
|
112 |
+
$section,
|
113 |
+
array(
|
114 |
+
'type' => 'html',
|
115 |
+
'option' => $option_name,
|
116 |
+
'field' => 'logs_preset',
|
117 |
+
'value' => $html,
|
118 |
+
)
|
119 |
+
);
|
120 |
+
}
|
121 |
+
|
122 |
// Bulk action
|
|
|
123 |
add_settings_field(
|
124 |
+
$option_name.'_bulk_action',
|
125 |
__( 'Bulk action', 'ip-geo-block' ),
|
126 |
array( $context, 'callback_field' ),
|
127 |
$option_slug,
|
129 |
array(
|
130 |
'type' => 'select',
|
131 |
'option' => $option_name,
|
132 |
+
'field' => 'bulk_action',
|
133 |
'value' => 0,
|
134 |
'list' => array(
|
135 |
0 => NULL,
|
144 |
);
|
145 |
|
146 |
// Clear logs
|
|
|
147 |
add_settings_field(
|
148 |
+
$option_name.'_clear_all',
|
149 |
__( 'Clear logs', 'ip-geo-block' ),
|
150 |
array( $context, 'callback_field' ),
|
151 |
$option_slug,
|
153 |
array(
|
154 |
'type' => 'button',
|
155 |
'option' => $option_name,
|
156 |
+
'field' => 'clear_all',
|
157 |
'value' => __( 'Clear all', 'ip-geo-block' ),
|
158 |
'after' => '<div id="'.$plugin_slug.'-logs"></div>',
|
159 |
'class' => empty( $cookie[ $tab ][1] ) || $cookie[ $tab ][1] !== 'o' ? '' : 'ip-geo-block-hide',
|
161 |
);
|
162 |
|
163 |
// Export logs
|
|
|
164 |
add_settings_field(
|
165 |
+
$option_name.'_export_logs',
|
166 |
__( 'Export logs', 'ip-geo-block' ),
|
167 |
array( $context, 'callback_field' ),
|
168 |
$option_slug,
|
190 |
public static function warn_accesslog() {
|
191 |
$context = IP_Geo_Block_Admin::get_instance();
|
192 |
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
|
193 |
+
echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord “Validation logs”%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
|
194 |
echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
|
195 |
}
|
196 |
|
admin/includes/tab-attribution.php
CHANGED
@@ -8,21 +8,16 @@ class IP_Geo_Block_Admin_Tab {
|
|
8 |
$option_name = IP_Geo_Block::OPTION_NAME
|
9 |
);
|
10 |
|
11 |
-
$section = IP_Geo_Block::PLUGIN_NAME . '-attribution';
|
12 |
-
$field = 'attribution';
|
13 |
-
|
14 |
add_settings_section(
|
15 |
-
$section,
|
16 |
__( 'Attribution links', 'ip-geo-block' ),
|
17 |
NULL,
|
18 |
$option_slug
|
19 |
);
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
foreach ( $providers as $provider => $key ) {
|
24 |
add_settings_field(
|
25 |
-
$option_name.'
|
26 |
$provider,
|
27 |
array( $context, 'callback_field' ),
|
28 |
$option_slug,
|
@@ -30,7 +25,7 @@ class IP_Geo_Block_Admin_Tab {
|
|
30 |
array(
|
31 |
'type' => 'html',
|
32 |
'option' => $option_name,
|
33 |
-
'field' =>
|
34 |
'value' => $key,
|
35 |
)
|
36 |
);
|
8 |
$option_name = IP_Geo_Block::OPTION_NAME
|
9 |
);
|
10 |
|
|
|
|
|
|
|
11 |
add_settings_section(
|
12 |
+
$section = IP_Geo_Block::PLUGIN_NAME . '-attribution',
|
13 |
__( 'Attribution links', 'ip-geo-block' ),
|
14 |
NULL,
|
15 |
$option_slug
|
16 |
);
|
17 |
|
18 |
+
foreach ( IP_Geo_Block_Provider::get_providers( 'link' ) as $provider => $key ) {
|
|
|
|
|
19 |
add_settings_field(
|
20 |
+
$option_name.'_attribution_'.$provider,
|
21 |
$provider,
|
22 |
array( $context, 'callback_field' ),
|
23 |
$option_slug,
|
25 |
array(
|
26 |
'type' => 'html',
|
27 |
'option' => $option_name,
|
28 |
+
'field' => 'attribution',
|
29 |
'value' => $key,
|
30 |
)
|
31 |
);
|
admin/includes/tab-geolocation.php
CHANGED
@@ -12,9 +12,8 @@ class IP_Geo_Block_Admin_Tab {
|
|
12 |
/*----------------------------------------*
|
13 |
* Geolocation
|
14 |
*----------------------------------------*/
|
15 |
-
$section = IP_Geo_Block::PLUGIN_NAME . '-search';
|
16 |
add_settings_section(
|
17 |
-
$section,
|
18 |
__( 'Search IP address geolocation', 'ip-geo-block' ),
|
19 |
NULL,
|
20 |
$option_slug
|
@@ -23,7 +22,6 @@ class IP_Geo_Block_Admin_Tab {
|
|
23 |
// make providers list
|
24 |
$list = array();
|
25 |
$providers = IP_Geo_Block_Provider::get_providers( 'key' );
|
26 |
-
|
27 |
foreach ( $providers as $provider => $key ) {
|
28 |
if ( ! is_string( $key ) ||
|
29 |
! empty( $options['providers'][ $provider ] ) ) {
|
@@ -32,22 +30,29 @@ class IP_Geo_Block_Admin_Tab {
|
|
32 |
}
|
33 |
|
34 |
// get selected item
|
|
|
|
|
35 |
$cookie = $context->get_cookie();
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
-
$field = 'service';
|
39 |
-
$provider = array_keys( $providers );
|
40 |
add_settings_field(
|
41 |
-
$option_name.'
|
42 |
__( 'Geolocation API', 'ip-geo-block' ),
|
43 |
array( $context, 'callback_field' ),
|
44 |
$option_slug,
|
45 |
$section,
|
46 |
array(
|
47 |
'type' => 'select',
|
|
|
48 |
'option' => $option_name,
|
49 |
-
'field' =>
|
50 |
-
'value' => $provider
|
51 |
'list' => $list,
|
52 |
)
|
53 |
);
|
@@ -55,18 +60,17 @@ class IP_Geo_Block_Admin_Tab {
|
|
55 |
// preset IP address
|
56 |
if ( isset( $_GET['s'] ) ) {
|
57 |
$list = preg_replace(
|
58 |
-
array( '
|
59 |
-
array( '.0',
|
60 |
-
$_GET['s']
|
61 |
-
); //
|
62 |
$list = filter_var( $list, FILTER_VALIDATE_IP ) ? $list : '';
|
63 |
} else {
|
64 |
$list = '';
|
65 |
}
|
66 |
|
67 |
-
$field = 'ip_address';
|
68 |
add_settings_field(
|
69 |
-
$option_name.'
|
70 |
__( 'IP address', 'ip-geo-block' ),
|
71 |
array( $context, 'callback_field' ),
|
72 |
$option_slug,
|
@@ -74,15 +78,14 @@ class IP_Geo_Block_Admin_Tab {
|
|
74 |
array(
|
75 |
'type' => 'text',
|
76 |
'option' => $option_name,
|
77 |
-
'field' =>
|
78 |
'value' => $list,
|
79 |
)
|
80 |
);
|
81 |
|
82 |
// Anonymize IP address
|
83 |
-
$field = 'anonymize';
|
84 |
add_settings_field(
|
85 |
-
$option_name.'
|
86 |
__( '<dfn title="IP address is always encrypted on recording in Cache and Logs. Moreover, this option replaces the end of IP address with “***” to make it anonymous.">Anonymize IP address</dfn>', 'ip-geo-block' ),
|
87 |
array( $context, 'callback_field' ),
|
88 |
$option_slug,
|
@@ -90,15 +93,14 @@ class IP_Geo_Block_Admin_Tab {
|
|
90 |
array(
|
91 |
'type' => 'checkbox',
|
92 |
'option' => $option_name,
|
93 |
-
'field' =>
|
94 |
-
'value' => ( ! empty( $options[
|
95 |
)
|
96 |
);
|
97 |
|
98 |
// Search geolocation
|
99 |
-
$field = 'get_location';
|
100 |
add_settings_field(
|
101 |
-
$option_name.'
|
102 |
__( 'Search geolocation', 'ip-geo-block' ),
|
103 |
array( $context, 'callback_field' ),
|
104 |
$option_slug,
|
@@ -106,7 +108,7 @@ class IP_Geo_Block_Admin_Tab {
|
|
106 |
array(
|
107 |
'type' => 'button',
|
108 |
'option' => $option_name,
|
109 |
-
'field' =>
|
110 |
'value' => __( 'Search now', 'ip-geo-block' ),
|
111 |
'after' => '<div id="ip-geo-block-loading"></div>',
|
112 |
)
|
12 |
/*----------------------------------------*
|
13 |
* Geolocation
|
14 |
*----------------------------------------*/
|
|
|
15 |
add_settings_section(
|
16 |
+
$section = IP_Geo_Block::PLUGIN_NAME . '-search',
|
17 |
__( 'Search IP address geolocation', 'ip-geo-block' ),
|
18 |
NULL,
|
19 |
$option_slug
|
22 |
// make providers list
|
23 |
$list = array();
|
24 |
$providers = IP_Geo_Block_Provider::get_providers( 'key' );
|
|
|
25 |
foreach ( $providers as $provider => $key ) {
|
26 |
if ( ! is_string( $key ) ||
|
27 |
! empty( $options['providers'][ $provider ] ) ) {
|
30 |
}
|
31 |
|
32 |
// get selected item
|
33 |
+
$provider = array();
|
34 |
+
$providers = array_keys( $providers );
|
35 |
$cookie = $context->get_cookie();
|
36 |
+
if ( isset( $cookie[ $tab ] ) ) {
|
37 |
+
foreach ( array_slice( (array)$cookie[ $tab ], 3 ) as $key => $val ) {
|
38 |
+
if ( 'o' === $val ) {
|
39 |
+
$provider[] = $providers[ $key ];
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
|
|
|
|
|
44 |
add_settings_field(
|
45 |
+
$option_name.'_service',
|
46 |
__( 'Geolocation API', 'ip-geo-block' ),
|
47 |
array( $context, 'callback_field' ),
|
48 |
$option_slug,
|
49 |
$section,
|
50 |
array(
|
51 |
'type' => 'select',
|
52 |
+
'attr' => 'multiple="multiple"',
|
53 |
'option' => $option_name,
|
54 |
+
'field' => 'service',
|
55 |
+
'value' => ! empty( $provider ) ? $provider : $providers[0],
|
56 |
'list' => $list,
|
57 |
)
|
58 |
);
|
60 |
// preset IP address
|
61 |
if ( isset( $_GET['s'] ) ) {
|
62 |
$list = preg_replace(
|
63 |
+
array( '/\.\*+$/', '/:\w*\*+$/', '/(::.*)::$/' ),
|
64 |
+
array( '.0', '::', '$1' ),
|
65 |
+
trim( $_GET['s'] )
|
66 |
+
); // de-anonymize if `***` exists
|
67 |
$list = filter_var( $list, FILTER_VALIDATE_IP ) ? $list : '';
|
68 |
} else {
|
69 |
$list = '';
|
70 |
}
|
71 |
|
|
|
72 |
add_settings_field(
|
73 |
+
$option_name.'_ip_address',
|
74 |
__( 'IP address', 'ip-geo-block' ),
|
75 |
array( $context, 'callback_field' ),
|
76 |
$option_slug,
|
78 |
array(
|
79 |
'type' => 'text',
|
80 |
'option' => $option_name,
|
81 |
+
'field' => 'ip_address',
|
82 |
'value' => $list,
|
83 |
)
|
84 |
);
|
85 |
|
86 |
// Anonymize IP address
|
|
|
87 |
add_settings_field(
|
88 |
+
$option_name.'_anonymize',
|
89 |
__( '<dfn title="IP address is always encrypted on recording in Cache and Logs. Moreover, this option replaces the end of IP address with “***” to make it anonymous.">Anonymize IP address</dfn>', 'ip-geo-block' ),
|
90 |
array( $context, 'callback_field' ),
|
91 |
$option_slug,
|
93 |
array(
|
94 |
'type' => 'checkbox',
|
95 |
'option' => $option_name,
|
96 |
+
'field' => 'anonymize',
|
97 |
+
'value' => ( ! empty( $options['anonymize'] ) || ! empty( $options['restrict_api'] ) ) ? TRUE : FALSE,
|
98 |
)
|
99 |
);
|
100 |
|
101 |
// Search geolocation
|
|
|
102 |
add_settings_field(
|
103 |
+
$option_name.'_get_location',
|
104 |
__( 'Search geolocation', 'ip-geo-block' ),
|
105 |
array( $context, 'callback_field' ),
|
106 |
$option_slug,
|
108 |
array(
|
109 |
'type' => 'button',
|
110 |
'option' => $option_name,
|
111 |
+
'field' => 'get_location',
|
112 |
'value' => __( 'Search now', 'ip-geo-block' ),
|
113 |
'after' => '<div id="ip-geo-block-loading"></div>',
|
114 |
)
|
admin/includes/tab-network.php
CHANGED
@@ -56,9 +56,8 @@ class IP_Geo_Block_Admin_Tab {
|
|
56 |
$html .= '">' . __( 'Apply', 'ip-geo-block' ) . '</a></li>';
|
57 |
$html .= '</ul>';
|
58 |
|
59 |
-
$field = 'chart-size';
|
60 |
add_settings_field(
|
61 |
-
$option_name.'
|
62 |
__( 'Chart display layout', 'ip-geo-block' ),
|
63 |
array( $context, 'callback_field' ),
|
64 |
$option_slug,
|
@@ -86,9 +85,8 @@ class IP_Geo_Block_Admin_Tab {
|
|
86 |
. ($key == self::$controls['time'] ? ' checked="checked"' : '') . ' />' . $val . '</label></li>' . "\n";
|
87 |
}
|
88 |
|
89 |
-
$field = 'select_duration';
|
90 |
add_settings_field(
|
91 |
-
$option_name.'
|
92 |
__( 'Duration to retrieve', 'ip-geo-block' ),
|
93 |
array( $context, 'callback_field' ),
|
94 |
$option_slug,
|
@@ -111,7 +109,7 @@ class IP_Geo_Block_Admin_Tab {
|
|
111 |
if ( self::$controls['warn'] ) {
|
112 |
$context = IP_Geo_Block_Admin::get_instance();
|
113 |
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 5 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-5' );
|
114 |
-
echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord “
|
115 |
echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
|
116 |
}
|
117 |
|
56 |
$html .= '">' . __( 'Apply', 'ip-geo-block' ) . '</a></li>';
|
57 |
$html .= '</ul>';
|
58 |
|
|
|
59 |
add_settings_field(
|
60 |
+
$option_name.'_chart-size',
|
61 |
__( 'Chart display layout', 'ip-geo-block' ),
|
62 |
array( $context, 'callback_field' ),
|
63 |
$option_slug,
|
85 |
. ($key == self::$controls['time'] ? ' checked="checked"' : '') . ' />' . $val . '</label></li>' . "\n";
|
86 |
}
|
87 |
|
|
|
88 |
add_settings_field(
|
89 |
+
$option_name.'_select_duration',
|
90 |
__( 'Duration to retrieve', 'ip-geo-block' ),
|
91 |
array( $context, 'callback_field' ),
|
92 |
$option_slug,
|
109 |
if ( self::$controls['warn'] ) {
|
110 |
$context = IP_Geo_Block_Admin::get_instance();
|
111 |
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 5 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-5' );
|
112 |
+
echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord “Validation logs”%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '"><strong>', '</strong></a>' ), '</p>', "\n";
|
113 |
echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
|
114 |
}
|
115 |
|
admin/includes/tab-settings.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php'; // for get_plugins()
|
3 |
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-opts.php';
|
4 |
require_once IP_GEO_BLOCK_PATH . 'admin/includes/class-admin-rewrite.php';
|
5 |
|
@@ -9,9 +8,20 @@ class IP_Geo_Block_Admin_Tab {
|
|
9 |
$options = IP_Geo_Block::get_option();
|
10 |
$plugin_slug = IP_Geo_Block::PLUGIN_NAME; // 'ip-geo-block'
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
/**
|
13 |
* Register a setting and its sanitization callback.
|
14 |
-
* @link
|
15 |
*
|
16 |
* register_setting( $option_group, $option_name, $sanitize_callback );
|
17 |
* @param string $option_group A settings group name.
|
@@ -27,7 +37,7 @@ class IP_Geo_Block_Admin_Tab {
|
|
27 |
|
28 |
/**
|
29 |
* Add new section to a new page inside the existing page.
|
30 |
-
* @link
|
31 |
*
|
32 |
* add_settings_section( $id, $title, $callback, $page );
|
33 |
* @param string $id String for use in the 'id' attribute of tags.
|
@@ -41,14 +51,14 @@ class IP_Geo_Block_Admin_Tab {
|
|
41 |
*----------------------------------------*/
|
42 |
add_settings_section(
|
43 |
$section = $plugin_slug . '-validation-rule',
|
44 |
-
__( 'Validation rule settings', 'ip-geo-block' ),
|
45 |
NULL,
|
46 |
$option_slug
|
47 |
);
|
48 |
|
49 |
/**
|
50 |
* Register a settings field to the settings page and section.
|
51 |
-
* @link
|
52 |
*
|
53 |
* add_settings_field( $id, $title, $callback, $page, $section, $args );
|
54 |
* @param string $id String for use in the 'id' attribute of tags.
|
@@ -61,9 +71,8 @@ class IP_Geo_Block_Admin_Tab {
|
|
61 |
// Get the country code of client
|
62 |
$key = IP_Geo_Block::get_geolocation( $val = IP_Geo_Block::get_ip_address( $options ) );
|
63 |
|
64 |
-
$field = 'ip_client';
|
65 |
add_settings_field(
|
66 |
-
$option_name.'
|
67 |
__( '<dfn title="You can confirm the appropriate Geolocation APIs and country code by referring “Scan country code”.">Your IP address / Country</dfn>', 'ip-geo-block' ),
|
68 |
array( $context, 'callback_field' ),
|
69 |
$option_slug,
|
@@ -71,9 +80,9 @@ class IP_Geo_Block_Admin_Tab {
|
|
71 |
array(
|
72 |
'type' => 'html',
|
73 |
'option' => $option_name,
|
74 |
-
'field' =>
|
75 |
-
'value' => '<span class="ip-geo-block-ip-addr">' . esc_html( $key['ip'] . ' / ' . ( $key['code'] && isset( $key['provider'] ) ? $key['code'] . ' (' . $key['provider'] . ')' : __( '
|
76 |
-
'after' => ' <a class="button
|
77 |
)
|
78 |
);
|
79 |
|
@@ -81,9 +90,8 @@ if ( $key = IP_Geo_Block_Util::get_server_ip() && $key !== $val && ! IP_Geo_Bloc
|
|
81 |
// Get the country code of server
|
82 |
$key = IP_Geo_Block::get_geolocation( $_SERVER['SERVER_ADDR'] );
|
83 |
|
84 |
-
$field = 'ip_server';
|
85 |
add_settings_field(
|
86 |
-
$option_name.'
|
87 |
__( '<dfn title="You can confirm the appropriate Geolocation APIs and country code by referring “Scan country code”.">Server IP address / Country</dfn>', 'ip-geo-block' ),
|
88 |
array( $context, 'callback_field' ),
|
89 |
$option_slug,
|
@@ -91,9 +99,9 @@ if ( $key = IP_Geo_Block_Util::get_server_ip() && $key !== $val && ! IP_Geo_Bloc
|
|
91 |
array(
|
92 |
'type' => 'html',
|
93 |
'option' => $option_name,
|
94 |
-
'field' =>
|
95 |
-
'value' => '<span class="ip-geo-block-ip-addr">' . esc_html( $key['ip'] . ' / ' . ( $key['code'] && isset( $key['provider'] ) ? $key['code'] . ' (' . $key['provider'] . ')' : __( '
|
96 |
-
'after' => ' <a class="button
|
97 |
)
|
98 |
);
|
99 |
endif;
|
@@ -107,23 +115,13 @@ endif;
|
|
107 |
|
108 |
$rule_desc = array(
|
109 |
__( 'Please select either “Whitelist” or “Blacklist”.', 'ip-geo-block' ),
|
110 |
-
__( '<dfn title="“Block by country” will be bypassed in case of empty. The special code “XX” is assigned as private IP address including localhost. And “ZZ” is for unknown IP address (i.e. not in the geolocation databases). Please use “YY” if you need the code that does not correspond to any of the countries.">Whitelist of country code</dfn>', 'ip-geo-block' ) . '<br />(<a rel="noreferrer" href="
|
111 |
-
__( '<dfn title="“Block by country” will be bypassed in case of empty. The special code “XX” is assigned as private IP address including localhost. And “ZZ” is for unknown IP address (i.e. not in the geolocation databases). Please use “YY” if you need the code that does not correspond to any of the countries.">Blacklist of country code</dfn>', 'ip-geo-block' ) . '<br />(<a rel="noreferrer" href="
|
112 |
-
);
|
113 |
-
|
114 |
-
$comma = array(
|
115 |
-
'<span class="ip-geo-block-sup">' . __( '(comma separated)', 'ip-geo-block' ) . '</span>',
|
116 |
-
'<span class="ip-geo-block-sup">' . __( '(comma or RET separated)', 'ip-geo-block' ) . '</span>',
|
117 |
-
'<span title="' . __( 'Toggle selection', 'ip-geo-block' ) . '"></span>',
|
118 |
-
'<span title="' . __( 'Find blocked requests in “Logs“', 'ip-geo-block' ) . '"></span>',
|
119 |
-
__( 'Before adding as “Exception”, please click on “<a class="ip-geo-block-icon ip-geo-block-icon-alert" title="This button is just a sample."><span></span></a>” button (if exists) attached to the following list to confirm that the blocked request is not malicious.', 'ip-geo-block' ),
|
120 |
-
__( 'Open CIDR calculator for IPv4 / IPv6.', 'ip-geo-block' ),
|
121 |
);
|
122 |
|
123 |
// Matching rule
|
124 |
-
$field = 'matching_rule';
|
125 |
add_settings_field(
|
126 |
-
$option_name.'
|
127 |
'<dfn title="' . $rule_desc[0] . '">' . __( 'Matching rule', 'ip-geo-block' ) . '</dfn>',
|
128 |
array( $context, 'callback_field' ),
|
129 |
$option_slug,
|
@@ -131,8 +129,8 @@ endif;
|
|
131 |
array(
|
132 |
'type' => 'select',
|
133 |
'option' => $option_name,
|
134 |
-
'field' =>
|
135 |
-
'value' => $options[
|
136 |
'list' => $rule,
|
137 |
'desc' => array(
|
138 |
-1 => $rule_desc[0],
|
@@ -144,9 +142,8 @@ endif;
|
|
144 |
);
|
145 |
|
146 |
// Country code for matching rule (ISO 3166-1 alpha-2)
|
147 |
-
$field = 'white_list';
|
148 |
add_settings_field(
|
149 |
-
$option_name.'
|
150 |
$rule_desc[1],
|
151 |
array( $context, 'callback_field' ),
|
152 |
$option_slug,
|
@@ -154,16 +151,15 @@ endif;
|
|
154 |
array(
|
155 |
'type' => 'text',
|
156 |
'option' => $option_name,
|
157 |
-
'field' =>
|
158 |
-
'value' => $options[
|
159 |
-
'after' => $
|
160 |
'class' => $options['matching_rule'] == 0 ? '' : 'ip-geo-block-hide',
|
161 |
)
|
162 |
);
|
163 |
|
164 |
-
$field = 'black_list';
|
165 |
add_settings_field(
|
166 |
-
$option_name.'
|
167 |
$rule_desc[2],
|
168 |
array( $context, 'callback_field' ),
|
169 |
$option_slug,
|
@@ -171,18 +167,16 @@ endif;
|
|
171 |
array(
|
172 |
'type' => 'text',
|
173 |
'option' => $option_name,
|
174 |
-
'field' =>
|
175 |
-
'value' => $options[
|
176 |
-
'after' => $
|
177 |
'class' => $options['matching_rule'] == 1 ? '' : 'ip-geo-block-hide',
|
178 |
)
|
179 |
);
|
180 |
|
181 |
// Use AS number
|
182 |
-
$field = 'Maxmind';
|
183 |
-
$key = 'use_asn';
|
184 |
add_settings_field(
|
185 |
-
$option_name.'
|
186 |
__( '<dfn title="It enables utilizing “AS number” in the “Whitelist/Blacklist of extra IP addresses” to specify a group of IP networks.">Use Autonomous System Number</dfn>', 'ip-geo-block' ) .
|
187 |
' (<a rel="noreferrer" href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" title="Autonomous system (Internet) - Wikipedia">ASN</a>)',
|
188 |
array( $context, 'callback_field' ),
|
@@ -191,63 +185,58 @@ endif;
|
|
191 |
array(
|
192 |
'type' => 'checkbox',
|
193 |
'option' => $option_name,
|
194 |
-
'field' =>
|
195 |
-
'sub-field' =>
|
196 |
-
'value' => 1 === (int)$options[
|
197 |
-
'after' => '<p class="ip-geo-block-desc">' . sprintf( __( 'Some useful tools to find ASN are introduced in “%s”.', 'ip-geo-block' ), '<a rel="noreferrer" href="
|
198 |
)
|
199 |
);
|
200 |
|
201 |
// White list of extra IP addresses prior to country code (CIDR, ASN)
|
202 |
-
$field = 'extra_ips';
|
203 |
-
$key = 'white_list';
|
204 |
add_settings_field(
|
205 |
-
$option_name.'
|
206 |
__( '<dfn title="e.g. “192.0.64.0/18” for Jetpack server, “69.46.36.0/27” for WordFence server or “AS32934” for Facebook.">Whitelist of extra IP addresses prior to country code</dfn>', 'ip-geo-block' ) .
|
207 |
' (<a rel="noreferrer" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" title="Classless Inter-Domain Routing - Wikipedia">CIDR</a>' .
|
208 |
', <a rel="noreferrer" href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" title="Autonomous system (Internet) - Wikipedia">ASN</a>)' .
|
209 |
-
'<a class="ip-geo-block-icon ip-geo-block-icon-cidr" title="' . $
|
210 |
array( $context, 'callback_field' ),
|
211 |
$option_slug,
|
212 |
$section,
|
213 |
array(
|
214 |
'type' => 'textarea',
|
215 |
'option' => $option_name,
|
216 |
-
'field' =>
|
217 |
-
'sub-field' =>
|
218 |
-
'value' => $options[
|
219 |
'placeholder' => '192.168.0.0/16,2001:db8::/96,AS1234',
|
220 |
-
'after' => $
|
221 |
)
|
222 |
);
|
223 |
|
224 |
// Black list of extra IP addresses prior to country code (CIDR, ASN)
|
225 |
-
$key = 'black_list';
|
226 |
add_settings_field(
|
227 |
-
$option_name.'
|
228 |
__( '<dfn title="Server level access control is recommended (e.g. .htaccess).">Blacklist of extra IP addresses prior to country code</dfn>', 'ip-geo-block' ) .
|
229 |
' (<a rel="noreferrer" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" title="Classless Inter-Domain Routing - Wikipedia">CIDR</a>' .
|
230 |
', <a rel="noreferrer" href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" title="Autonomous system (Internet) - Wikipedia">ASN</a>)' .
|
231 |
-
'<a class="ip-geo-block-icon ip-geo-block-icon-cidr" title="' . $
|
232 |
array( $context, 'callback_field' ),
|
233 |
$option_slug,
|
234 |
$section,
|
235 |
array(
|
236 |
'type' => 'textarea',
|
237 |
'option' => $option_name,
|
238 |
-
'field' =>
|
239 |
-
'sub-field' =>
|
240 |
-
'value' => $options[
|
241 |
'placeholder' => '192.168.0.0/16,2001:db8::/96,AS1234',
|
242 |
-
'after' => $
|
243 |
)
|
244 |
);
|
245 |
|
246 |
// $_SERVER keys to retrieve extra IP addresses
|
247 |
-
$field = 'validation';
|
248 |
-
$key = 'proxy';
|
249 |
add_settings_field(
|
250 |
-
$option_name.'
|
251 |
__( '<dfn title="If your server is placed behind the proxy server or the load balancing server, you need to put the appropriate key such as “HTTP_X_FORWARDED_FOR”, “HTTP_X_REAL_IP” or something like that to retrieve the client IP address.">$_SERVER keys to retrieve extra IP addresses</dfn>', 'ip-geo-block' ),
|
252 |
array( $context, 'callback_field' ),
|
253 |
$option_slug,
|
@@ -255,18 +244,17 @@ endif;
|
|
255 |
array(
|
256 |
'type' => 'text',
|
257 |
'option' => $option_name,
|
258 |
-
'field' =>
|
259 |
-
'sub-field' =>
|
260 |
-
'value' => $options[
|
261 |
'placeholder' => IP_Geo_Block_Util::get_proxy_var(),
|
262 |
-
'after' => $
|
263 |
)
|
264 |
);
|
265 |
|
266 |
// Bad signatures
|
267 |
-
$field = 'signature';
|
268 |
add_settings_field(
|
269 |
-
$option_name.'
|
270 |
__( '<dfn title="It validates malicious signatures independently of “Block by country” and “Prevent Zero-day Exploit” for the target “Admin area”, “Admin ajax/post”, “Plugins area” and “Themes area”.">Bad signatures in query</dfn> <nobr>(<a class="ip-geo-block-icon ip-geo-block-icon-cycle" id="ip-geo-block-decode" title="When you find ugly character string in the text area, please click to restore."><span></span></a>)</nobr>', 'ip-geo-block' ),
|
271 |
array( $context, 'callback_field' ),
|
272 |
$option_slug,
|
@@ -274,14 +262,14 @@ endif;
|
|
274 |
array(
|
275 |
'type' => 'textarea',
|
276 |
'option' => $option_name,
|
277 |
-
'field' =>
|
278 |
-
'value' => $options[
|
279 |
-
'after' => $
|
280 |
)
|
281 |
);
|
282 |
|
283 |
// Prevent malicious upload - white list of file extention and MIME type
|
284 |
-
$list = '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Select allowed MIME type.">Whitelist of allowed MIME type</dfn>', 'ip-geo-block' ) . "<a class=\"ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide\">" . $
|
285 |
|
286 |
// get_allowed_mime_types() in wp-includes/functions.php @since 2.8.6
|
287 |
foreach ( IP_Geo_Block_Util::get_allowed_mime_types() as $key => $val ) {
|
@@ -297,13 +285,11 @@ endif;
|
|
297 |
|
298 |
// Verify capability
|
299 |
$list .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the capabilities to be verified. Depending on the particular type of uploader, certain capability may be required. Default is “upload_files” for Administrator, Editor and Author. This verification will be skipped if empty.">Capabilities to be verified</dfn>', 'ip-geo-block' ) . ' <span class="ip-geo-block-desc">' . __( '( See “<a rel="noreferrer" href="https://codex.wordpress.org/Roles_and_Capabilities" title="Roles and Capabilities « WordPress Codex">Roles and Capabilities</a>” )', 'ip-geo-block' ) . '</span>' . "\n";
|
300 |
-
$list .= '<li class="ip-geo-block-hide"><ul><li><input type="text" id="ip_geo_block_settings_mimetype_capability" name="ip_geo_block_settings[mimetype][capability]" class="regular-text code" placeholder="upload_files" value="' . esc_attr( implode( ',', $options['mimetype']['capability'] ) ) . '" />' . $
|
301 |
|
302 |
// Prevent malicious file uploading
|
303 |
-
$field = 'validation';
|
304 |
-
$key = 'mimetype';
|
305 |
add_settings_field(
|
306 |
-
$option_name.'
|
307 |
__( '<dfn title="It restricts the file types on upload in order to block malware and backdoor via both back-end and front-end. Please consider to select “mu-plugins” (ip-geo-block-mu.php) at “Validation timing” so that other staff would not fetch the uploaded files before this validation.">Prevent malicious file uploading</dfn>', 'ip-geo-block' ),
|
308 |
array( $context, 'callback_field' ),
|
309 |
$option_slug,
|
@@ -311,9 +297,9 @@ endif;
|
|
311 |
array(
|
312 |
'type' => 'select',
|
313 |
'option' => $option_name,
|
314 |
-
'field' =>
|
315 |
-
'sub-field' =>
|
316 |
-
'value' => $options[
|
317 |
'list' => array(
|
318 |
0 => __( 'Disable', 'ip-geo-block' ),
|
319 |
1 => __( 'Verify file extension and MIME type', 'ip-geo-block' ),
|
@@ -323,44 +309,18 @@ endif;
|
|
323 |
)
|
324 |
);
|
325 |
|
326 |
-
// Max number of failed login attempts per IP address
|
327 |
-
$field = 'login_fails';
|
328 |
-
add_settings_field(
|
329 |
-
$option_name.'_'.$field,
|
330 |
-
__( '<dfn title="This is applied to “XML-RPC” and “Login form”. Lockout period is defined as expiration time of “IP address Cache” in “Privacy and record settings” section.">Max number of failed login attempts per IP address</dfn>', 'ip-geo-block' ),
|
331 |
-
array( $context, 'callback_field' ),
|
332 |
-
$option_slug,
|
333 |
-
$section,
|
334 |
-
array(
|
335 |
-
'type' => 'select',
|
336 |
-
'option' => $option_name,
|
337 |
-
'field' => $field,
|
338 |
-
'value' => $options[ $field ],
|
339 |
-
'list' => array(
|
340 |
-
-1 => 'Disable',
|
341 |
-
0 => 0,
|
342 |
-
1 => 1,
|
343 |
-
3 => 3,
|
344 |
-
5 => 5,
|
345 |
-
7 => 7,
|
346 |
-
10 => 10,
|
347 |
-
),
|
348 |
-
)
|
349 |
-
);
|
350 |
-
|
351 |
// Response code (RFC 2616)
|
352 |
-
$field = 'response_code';
|
353 |
add_settings_field(
|
354 |
-
$option_name.'
|
355 |
-
sprintf( __( '<dfn title="You can put your original 403.php and so on into your theme directory.">Response code</dfn> %s', 'ip-geo-block' ), '(<a rel="noreferrer" href="
|
356 |
array( $context, 'callback_field' ),
|
357 |
$option_slug,
|
358 |
$section,
|
359 |
array(
|
360 |
'type' => 'select',
|
361 |
'option' => $option_name,
|
362 |
-
'field' =>
|
363 |
-
'value' => $options[
|
364 |
'list' => array(
|
365 |
200 => '200 OK',
|
366 |
301 => '301 Moved Permanently',
|
@@ -379,9 +339,8 @@ endif;
|
|
379 |
);
|
380 |
|
381 |
// Redirect URI
|
382 |
-
$field = 'redirect_uri';
|
383 |
add_settings_field(
|
384 |
-
$option_name.'
|
385 |
__( '<dfn title="Specify the URL for response code 2xx and 3xx. If it is pointed to a public facing page, visitors would not be blocked on the page to prevent loop of redirection even when you enable [Block by country] in [Front-end target settings] section. Empty URL is altered to your home.">Redirect URL</dfn>', 'ip-geo-block' ),
|
386 |
array( $context, 'callback_field' ),
|
387 |
$option_slug,
|
@@ -389,17 +348,16 @@ endif;
|
|
389 |
array(
|
390 |
'type' => 'text',
|
391 |
'option' => $option_name,
|
392 |
-
'field' =>
|
393 |
-
'value' => $options[
|
394 |
'class' => $options['response_code'] < 400 ? '' : 'ip-geo-block-hide',
|
395 |
'placeholder' => '/about/',
|
396 |
)
|
397 |
);
|
398 |
|
399 |
// Response message
|
400 |
-
$field = 'response_msg';
|
401 |
add_settings_field(
|
402 |
-
$option_name.'
|
403 |
__( '<dfn title="Specify the message for response code 4xx and 5xx.">Response message</dfn>', 'ip-geo-block' ),
|
404 |
array( $context, 'callback_field' ),
|
405 |
$option_slug,
|
@@ -407,19 +365,17 @@ endif;
|
|
407 |
array(
|
408 |
'type' => 'text',
|
409 |
'option' => $option_name,
|
410 |
-
'field' =>
|
411 |
-
'value' => $options[
|
412 |
'class' => $options['response_code'] >= 400 ? '' : 'ip-geo-block-hide',
|
413 |
)
|
414 |
);
|
415 |
|
416 |
// Validation timing
|
417 |
-
$
|
418 |
-
$key = 'timing';
|
419 |
-
$options[ $field ][ $key ] = IP_Geo_Block_Opts::get_validation_timing();
|
420 |
|
421 |
add_settings_field(
|
422 |
-
$option_name.'
|
423 |
'<dfn title="' . __( 'Select when to run the validation.', 'ip-geo-block' ) . '">' . __( 'Validation timing', 'ip-geo-block' ) . '</dfn>',
|
424 |
array( $context, 'callback_field' ),
|
425 |
$option_slug,
|
@@ -427,16 +383,16 @@ endif;
|
|
427 |
array(
|
428 |
'type' => 'select',
|
429 |
'option' => $option_name,
|
430 |
-
'field' =>
|
431 |
-
'sub-field' =>
|
432 |
-
'value' => $options[
|
433 |
'list' => array(
|
434 |
0 => __( '“init” action hook', 'ip-geo-block' ),
|
435 |
1 => __( '“mu-plugins” (ip-geo-block-mu.php)', 'ip-geo-block' ),
|
436 |
),
|
437 |
'desc' => array(
|
438 |
0 => __( 'Validate at “init” action hook in the same manner as typical plugins.', 'ip-geo-block' ),
|
439 |
-
1 => __( 'Validate at an earlier phase than other typical plugins. It can reduce load on server but has <a rel=\'noreferrer\' href=\'
|
440 |
),
|
441 |
)
|
442 |
);
|
@@ -446,7 +402,7 @@ endif;
|
|
446 |
*----------------------------------------*/
|
447 |
add_settings_section(
|
448 |
$section = $plugin_slug . '-validation-target',
|
449 |
-
__( 'Back-end target settings', 'ip-geo-block' ),
|
450 |
array( __CLASS__, 'note_target' ),
|
451 |
$option_slug
|
452 |
);
|
@@ -463,38 +419,62 @@ endif;
|
|
463 |
);
|
464 |
|
465 |
// Comment post
|
466 |
-
$field = 'validation';
|
467 |
-
$key = 'comment';
|
468 |
add_settings_field(
|
469 |
-
$option_name.'
|
470 |
-
$target[
|
471 |
array( $context, 'callback_field' ),
|
472 |
$option_slug,
|
473 |
$section,
|
474 |
array(
|
475 |
'type' => 'checkbox',
|
476 |
'option' => $option_name,
|
477 |
-
'field' =>
|
478 |
-
'sub-field' =>
|
479 |
-
'value' => $options[
|
480 |
'text' => __( 'Block by country', 'ip-geo-block' ),
|
481 |
)
|
482 |
);
|
483 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
484 |
// XML-RPC
|
485 |
-
$key = 'xmlrpc';
|
486 |
add_settings_field(
|
487 |
-
$option_name.'
|
488 |
-
$target[
|
489 |
array( $context, 'callback_field' ),
|
490 |
$option_slug,
|
491 |
$section,
|
492 |
array(
|
493 |
'type' => 'select',
|
494 |
'option' => $option_name,
|
495 |
-
'field' =>
|
496 |
-
'sub-field' =>
|
497 |
-
'value' => $options[
|
498 |
'list' => array(
|
499 |
0 => __( 'Disable', 'ip-geo-block' ),
|
500 |
1 => __( 'Block by country', 'ip-geo-block' ),
|
@@ -517,21 +497,20 @@ endif;
|
|
517 |
}
|
518 |
|
519 |
// Login form
|
520 |
-
$key = 'login';
|
521 |
add_settings_field(
|
522 |
-
$option_name.'
|
523 |
-
$target[
|
524 |
array( $context, 'callback_field' ),
|
525 |
$option_slug,
|
526 |
$section,
|
527 |
array(
|
528 |
'type' => 'checkbox',
|
529 |
'option' => $option_name,
|
530 |
-
'field' =>
|
531 |
-
'sub-field' =>
|
532 |
-
'value' => $options[
|
533 |
'text' => __( 'Block by country', 'ip-geo-block' ),
|
534 |
-
'after' => '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual action as a blocking target.">Target actions</dfn>', 'ip-geo-block' ) . '<a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide">' . $
|
535 |
)
|
536 |
);
|
537 |
|
@@ -545,20 +524,44 @@ endif;
|
|
545 |
2 => __( 'Regardless of the country code, it will block a malicious request related to the services only for the dashboard.', 'ip-geo-block' ),
|
546 |
);
|
547 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
// Admin area
|
549 |
-
$key = 'admin';
|
550 |
add_settings_field(
|
551 |
-
$option_name.'
|
552 |
-
$target[
|
553 |
array( $context, 'callback_field' ),
|
554 |
$option_slug,
|
555 |
$section,
|
556 |
array(
|
557 |
'type' => 'checkboxes',
|
558 |
'option' => $option_name,
|
559 |
-
'field' =>
|
560 |
-
'sub-field' =>
|
561 |
-
'value' => $options[
|
562 |
'list' => $list,
|
563 |
'desc' => $desc,
|
564 |
)
|
@@ -583,13 +586,11 @@ endif;
|
|
583 |
. '</li>' . "\n";
|
584 |
}
|
585 |
|
586 |
-
$path = IP_Geo_Block::get_wp_path();
|
587 |
-
|
588 |
// Admin ajax/post
|
589 |
-
$
|
590 |
-
$val
|
591 |
add_settings_field(
|
592 |
-
$option_name.'
|
593 |
sprintf( $dfn, $val.'admin-(ajax|post).php', __( 'Admin ajax/post', 'ip-geo-block' ) ),
|
594 |
array( $context, 'callback_field' ),
|
595 |
$option_slug,
|
@@ -597,19 +598,19 @@ endif;
|
|
597 |
array(
|
598 |
'type' => 'checkboxes',
|
599 |
'option' => $option_name,
|
600 |
-
'field' =>
|
601 |
-
'sub-field' =>
|
602 |
-
'value' => $options[
|
603 |
'list' => $list,
|
604 |
'desc' => $desc,
|
605 |
'after' =>
|
606 |
'<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . "\n" .
|
607 |
' <dfn title="' . __( 'Specify the action name (“action=…”) or the page name (“page=…”) to prevent unintended blocking caused by “Block by country” (for non logged-in user) and “Prevent Zero-day Exploit” (for logged-in user).', 'ip-geo-block' ) . '">' . __( 'Exceptions', 'ip-geo-block' ) . "</dfn>\n" .
|
608 |
-
' <a class="ip-geo-block-hide ip-geo-block-icon ip-geo-block-icon-unlock"><span title="' . __( 'Toggle with non logged-in user', 'ip-geo-block' ) . '"></span></a><a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide" data-target="admin">' . $
|
609 |
' <li class="ip-geo-block-hide">' . "\n" .
|
610 |
-
' <input class="regular-text code" id="ip_geo_block_settings_exception_admin" name="ip_geo_block_settings[exception][admin]" type="text" value="' . esc_attr( implode( ',', $options['exception']['admin'] ) ) . '">' . $
|
611 |
' <h4>' . __( 'Candidate actions/pages', 'ip-geo-block' ) . "</h4>\n" .
|
612 |
-
' <p class="ip-geo-block-find-desc">' . $
|
613 |
' </li>' . "\n" .
|
614 |
' <li class="ip-geo-block-hide">' . "\n" .
|
615 |
' <ul class="ip-geo-block-list-exceptions" id="ip-geo-block-list-admin">' . "\n" .
|
@@ -626,7 +627,7 @@ endif;
|
|
626 |
__( 'Select the item which causes unintended blocking in order to exclude from the validation target. Grayed item indicates “INACTIVE”.', 'ip-geo-block' ),
|
627 |
__( 'It configures “%s” to validate a direct request to the PHP file which does not load WordPress core. Make sure to deny direct access to the hidden files beginning with a dot by the server\'s configuration.', 'ip-geo-block' ),
|
628 |
__( 'Sorry, but your server type is not supported.', 'ip-geo-block' ),
|
629 |
-
__( 'You need to click
|
630 |
);
|
631 |
|
632 |
// Set rewrite condition
|
@@ -654,19 +655,18 @@ endif;
|
|
654 |
}
|
655 |
|
656 |
// Plugins area
|
657 |
-
$
|
658 |
-
$
|
659 |
-
|
660 |
-
. '
|
661 |
-
.
|
662 |
-
.
|
663 |
-
. '<label for="ip_geo_block_settings_rewrite_' . $key . '"><dfn title="'
|
664 |
. ( $config ? sprintf( $desc[2], $val . $config ) : $desc[3] )
|
665 |
. '">' . __( 'Force to load WP core', 'ip-geo-block' )
|
666 |
. '</dfn></label><br />';
|
667 |
|
668 |
add_settings_field(
|
669 |
-
$option_name.'
|
670 |
sprintf( $dfn, $val.'…/*.php', __( 'Plugins area', 'ip-geo-block' ) ),
|
671 |
array( $context, 'callback_field' ),
|
672 |
$option_slug,
|
@@ -674,9 +674,9 @@ endif;
|
|
674 |
array(
|
675 |
'type' => 'select',
|
676 |
'option' => $option_name,
|
677 |
-
'field' =>
|
678 |
-
'sub-field' =>
|
679 |
-
'value' => $options[
|
680 |
'list' => $list,
|
681 |
'desc' => array(
|
682 |
2 => sprintf( $desc[0], $val ),
|
@@ -684,9 +684,9 @@ endif;
|
|
684 |
'after' => $tmp .
|
685 |
'<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . "\n" .
|
686 |
' <dfn title="' . $desc[1] . '">' . __( 'Exceptions', 'ip-geo-block' ) . "</dfn>\n" .
|
687 |
-
' <a class="ip-geo-block-hide ip-geo-block-icon ip-geo-block-icon-cycle">' . $
|
688 |
' <li class="ip-geo-block-hide">' . "\n" .
|
689 |
-
' <p class="ip-geo-block-find-desc">' . $
|
690 |
' </li>' . "\n" .
|
691 |
' <li class="ip-geo-block-hide">' . "\n" .
|
692 |
' <ul class="ip-geo-block-list-exceptions" id="ip-geo-block-list-plugins">' . "\n" .
|
@@ -715,19 +715,18 @@ endif;
|
|
715 |
}
|
716 |
|
717 |
// Themes area
|
718 |
-
$
|
719 |
-
$
|
720 |
-
|
721 |
-
. '
|
722 |
-
.
|
723 |
-
.
|
724 |
-
. '<label for="ip_geo_block_settings_rewrite_' . $key . '"><dfn title="'
|
725 |
. ( $config ? sprintf( $desc[2], $val . $config ) : $desc[3] )
|
726 |
. '">' . __( 'Force to load WP core', 'ip-geo-block' )
|
727 |
. '</dfn></label><br />';
|
728 |
|
729 |
add_settings_field(
|
730 |
-
$option_name.'
|
731 |
sprintf( $dfn, $val.'…/*.php', __( 'Themes area', 'ip-geo-block' ) ),
|
732 |
array( $context, 'callback_field' ),
|
733 |
$option_slug,
|
@@ -735,9 +734,9 @@ endif;
|
|
735 |
array(
|
736 |
'type' => 'select',
|
737 |
'option' => $option_name,
|
738 |
-
'field' =>
|
739 |
-
'sub-field' =>
|
740 |
-
'value' => $options[
|
741 |
'list' => $list,
|
742 |
'desc' => array(
|
743 |
2 => sprintf( $desc[0], $val ),
|
@@ -745,9 +744,9 @@ endif;
|
|
745 |
'after' => $tmp .
|
746 |
'<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . "\n" .
|
747 |
' <dfn title="' . $desc[1] . '">' . __( 'Exceptions', 'ip-geo-block' ) . "</dfn>\n" .
|
748 |
-
' <a class="ip-geo-block-hide ip-geo-block-icon ip-geo-block-icon-cycle">' . $
|
749 |
' <li class="ip-geo-block-hide">' . "\n" .
|
750 |
-
' <p class="ip-geo-block-find-desc">' . $
|
751 |
' </li>' . "\n" .
|
752 |
' <li class="ip-geo-block-hide">' . "\n" .
|
753 |
' <ul class="ip-geo-block-list-exceptions" id="ip-geo-block-list-themes">' . "\n" .
|
@@ -763,34 +762,31 @@ endif;
|
|
763 |
*----------------------------------------*/
|
764 |
add_settings_section(
|
765 |
$section = $plugin_slug . '-public',
|
766 |
-
array( __( 'Front-end target settings', 'ip-geo-block' ), '<a href="
|
767 |
array( __CLASS__, 'note_public' ),
|
768 |
$option_slug
|
769 |
);
|
770 |
|
771 |
// Public facing pages
|
772 |
-
$key = 'public';
|
773 |
add_settings_field(
|
774 |
-
$option_name.'
|
775 |
-
$target[
|
776 |
array( $context, 'callback_field' ),
|
777 |
$option_slug,
|
778 |
$section,
|
779 |
array(
|
780 |
'type' => 'checkbox',
|
781 |
'option' => $option_name,
|
782 |
-
'field' =>
|
783 |
-
'sub-field' =>
|
784 |
-
'value' => $options[
|
785 |
'text' => __( 'Block by country', 'ip-geo-block' ),
|
786 |
)
|
787 |
);
|
788 |
|
789 |
// Matching rule
|
790 |
-
$field = 'public';
|
791 |
-
$key = 'matching_rule';
|
792 |
add_settings_field(
|
793 |
-
$option_name.'
|
794 |
'<dfn title="' . $rule_desc[0] . '">' . __( 'Matching rule', 'ip-geo-block' ) . '</dfn>',
|
795 |
array( $context, 'callback_field' ),
|
796 |
$option_slug,
|
@@ -798,17 +794,16 @@ endif;
|
|
798 |
array(
|
799 |
'type' => 'select',
|
800 |
'option' => $option_name,
|
801 |
-
'field' =>
|
802 |
-
'sub-field' =>
|
803 |
-
'value' => $options[
|
804 |
'list' => array( -1 => __( 'Follow “Validation rule settings”', 'ip-geo-block' ) ) + $rule,
|
805 |
)
|
806 |
);
|
807 |
|
808 |
// Country code for matching rule (ISO 3166-1 alpha-2)
|
809 |
-
$key = 'white_list';
|
810 |
add_settings_field(
|
811 |
-
$option_name.'
|
812 |
$rule_desc[1],
|
813 |
array( $context, 'callback_field' ),
|
814 |
$option_slug,
|
@@ -816,17 +811,16 @@ endif;
|
|
816 |
array(
|
817 |
'type' => 'text',
|
818 |
'option' => $option_name,
|
819 |
-
'field' =>
|
820 |
-
'sub-field' =>
|
821 |
-
'value' => $options[
|
822 |
-
'after' => $
|
823 |
-
'class' => $options[
|
824 |
)
|
825 |
);
|
826 |
|
827 |
-
$key = 'black_list';
|
828 |
add_settings_field(
|
829 |
-
$option_name.'
|
830 |
$rule_desc[2],
|
831 |
array( $context, 'callback_field' ),
|
832 |
$option_slug,
|
@@ -834,28 +828,27 @@ endif;
|
|
834 |
array(
|
835 |
'type' => 'text',
|
836 |
'option' => $option_name,
|
837 |
-
'field' =>
|
838 |
-
'sub-field' =>
|
839 |
-
'value' => $options[
|
840 |
-
'after' => $
|
841 |
-
'class' => $options[
|
842 |
)
|
843 |
);
|
844 |
|
845 |
// Response code (RFC 2616)
|
846 |
-
$key = 'response_code';
|
847 |
add_settings_field(
|
848 |
-
$option_name.'
|
849 |
-
sprintf( __( '<dfn title="You can configure a different response code from the Back-end. This is useful to prevent violation against your affiliate program.">Response code</dfn> %s', 'ip-geo-block' ), '(<a rel="noreferrer" href="
|
850 |
array( $context, 'callback_field' ),
|
851 |
$option_slug,
|
852 |
$section,
|
853 |
array(
|
854 |
'type' => 'select',
|
855 |
'option' => $option_name,
|
856 |
-
'field' =>
|
857 |
-
'sub-field' =>
|
858 |
-
'value' => $options[
|
859 |
'list' => array(
|
860 |
200 => '200 OK',
|
861 |
301 => '301 Moved Permanently',
|
@@ -870,14 +863,13 @@ endif;
|
|
870 |
500 => '500 Internal Server Error',
|
871 |
503 => '503 Service Unavailable',
|
872 |
),
|
873 |
-
'class' => $options[
|
874 |
)
|
875 |
);
|
876 |
|
877 |
// Redirect URI
|
878 |
-
$key = 'redirect_uri';
|
879 |
add_settings_field(
|
880 |
-
$option_name.'
|
881 |
__( '<dfn title="Specify the URL for response code 2xx and 3xx. If it is pointed to a public facing page, visitors would not be blocked on the page to prevent loop of redirection even when you enable [Block by country] in [Front-end target settings] section. Empty URL is altered to your home.">Redirect URL</dfn>', 'ip-geo-block' ),
|
882 |
array( $context, 'callback_field' ),
|
883 |
$option_slug,
|
@@ -885,18 +877,17 @@ endif;
|
|
885 |
array(
|
886 |
'type' => 'text',
|
887 |
'option' => $option_name,
|
888 |
-
'field' =>
|
889 |
-
'sub-field' =>
|
890 |
-
'value' => $options[
|
891 |
-
'class' => $options[
|
892 |
'placeholder' => '/about/',
|
893 |
)
|
894 |
);
|
895 |
|
896 |
// Response message
|
897 |
-
$key = 'response_msg';
|
898 |
add_settings_field(
|
899 |
-
$option_name.'
|
900 |
__( '<dfn title="Specify the message for response code 4xx and 5xx.">Response message</dfn>', 'ip-geo-block' ),
|
901 |
array( $context, 'callback_field' ),
|
902 |
$option_slug,
|
@@ -904,65 +895,64 @@ endif;
|
|
904 |
array(
|
905 |
'type' => 'text',
|
906 |
'option' => $option_name,
|
907 |
-
'field' =>
|
908 |
-
'sub-field' =>
|
909 |
-
'value' => $options[
|
910 |
-
'class' => $options[
|
911 |
)
|
912 |
);
|
913 |
|
914 |
// List of page
|
915 |
-
$exception = '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual page as a blocking target.">Page</dfn>', 'ip-geo-block' ) . '<a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide">' . $
|
916 |
$tmp = get_pages();
|
917 |
if ( ! empty( $tmp ) ) {
|
918 |
foreach ( $tmp as $key ) {
|
919 |
$val = esc_attr( $key->post_name );
|
920 |
-
$exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_pages_' . $val . '" name="ip_geo_block_settings[public][target_pages][' . $val . ']" value="1"' . checked( isset( $options[
|
921 |
$exception .= '<label for="ip_geo_block_settings_public_target_pages_' . $val . '">' . esc_html( $key->post_title ) . '</label></li>' . "\n";
|
922 |
}
|
923 |
}
|
924 |
$exception .= '</ul></li></ul>' . "\n";
|
925 |
|
926 |
// List of post type
|
927 |
-
$exception .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual post type on a single page as a blocking target.">Post type</dfn>', 'ip-geo-block' ) . '<a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide">' . $
|
928 |
$tmp = get_post_types( array( 'public' => TRUE ) );
|
929 |
if ( ! empty( $tmp ) ) {
|
930 |
foreach ( $tmp as $key ) {
|
931 |
$val = esc_attr( $key );
|
932 |
-
$exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_posts_' . $val . '" name="ip_geo_block_settings[public][target_posts][' . $val . ']" value="1"' . checked( isset( $options[
|
933 |
$exception .= '<label for="ip_geo_block_settings_public_target_posts_' . $val . '">' . esc_html( $key ) . '</label></li>' . "\n";
|
934 |
}
|
935 |
}
|
936 |
$exception .= '</ul></li></ul>' . "\n";
|
937 |
|
938 |
// List of category
|
939 |
-
$exception .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual category on a single page or archive page as a blocking target.">Category</dfn>', 'ip-geo-block' ) . '<a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide">' . $
|
940 |
$tmp = get_categories( array( 'hide_empty' => FALSE ) );
|
941 |
if ( ! empty( $tmp ) ) {
|
942 |
foreach ( $tmp as $key ) {
|
943 |
$val = esc_attr( $key->slug );
|
944 |
-
$exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_cates_' . $val . '" name="ip_geo_block_settings[public][target_cates][' . $val . ']" value="1"' . checked( isset( $options[
|
945 |
$exception .= '<label for="ip_geo_block_settings_public_target_cates_' . $val . '">' . esc_html( $key->name ) . '</label></li>' . "\n";
|
946 |
}
|
947 |
}
|
948 |
$exception .= '</ul></li></ul>' . "\n";
|
949 |
|
950 |
// List of tag
|
951 |
-
$exception .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual tag on a single page or archive page as a blocking target.">Tag</dfn>', 'ip-geo-block' ) . '<a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide">' . $
|
952 |
$tmp = get_tags( array( 'hide_empty' => FALSE ) );
|
953 |
if ( ! empty( $tmp ) ) {
|
954 |
foreach ( $tmp as $key ) {
|
955 |
$val = esc_attr( $key->slug );
|
956 |
-
$exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_tags_' . $val . '" name="ip_geo_block_settings[public][target_tags][' . $val . ']" value="1"' . checked( isset( $options[
|
957 |
$exception .= '<label for="ip_geo_block_settings_public_target_tags_' . $val . '">' . esc_html( $key->name ) . '</label></li>' . "\n";
|
958 |
}
|
959 |
}
|
960 |
$exception .= '</ul></li></ul>' . "\n";
|
961 |
|
962 |
// Validation target
|
963 |
-
$key = 'target_rule';
|
964 |
add_settings_field(
|
965 |
-
$option_name.'
|
966 |
'<dfn title="' . __( 'Specify the validation target on front-end.', 'ip-geo-block' ) . '">' . __( 'Validation target', 'ip-geo-block' ) . '</dfn>',
|
967 |
array( $context, 'callback_field' ),
|
968 |
$option_slug,
|
@@ -970,9 +960,9 @@ endif;
|
|
970 |
array(
|
971 |
'type' => 'select',
|
972 |
'option' => $option_name,
|
973 |
-
'field' =>
|
974 |
-
'sub-field' =>
|
975 |
-
'value' => $options[
|
976 |
'list' => array(
|
977 |
0 => __( 'All requests', 'ip-geo-block' ),
|
978 |
1 => __( 'Specify the targets', 'ip-geo-block' ),
|
@@ -984,18 +974,36 @@ endif;
|
|
984 |
)
|
985 |
);
|
986 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
987 |
// Badly-behaved bots and crawlers
|
988 |
$exception = '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the frequency of request for certain period of time.">Blocking condition</dfn>', 'ip-geo-block' ) . "\n<li class=\"ip-geo-block-hide\"><ul>\n<li>";
|
989 |
$exception .= sprintf(
|
990 |
__( 'More than %1$s page view (PV) in %2$s seconds', 'ip-geo-block' ),
|
991 |
-
'<input type="number" id="ip_geo_block_settings_behavior_view" name="ip_geo_block_settings[behavior][view]" class="regular-text code" value="' . (int)$options['behavior']['view'] . '" placeholder="
|
992 |
-
'<input type="number" id="ip_geo_block_settings_behavior_time" name="ip_geo_block_settings[behavior][time]" class="regular-text code" value="' . (int)$options['behavior']['time'] . '" placeholder="
|
993 |
);
|
994 |
$exception .= "</li>\n</ul></li></ul>\n";
|
995 |
|
996 |
-
$key = 'behavior';
|
997 |
add_settings_field(
|
998 |
-
$option_name.'
|
999 |
__( '<dfn title="It will validate the frequency of request.">Block badly-behaved bots and crawlers</dfn>', 'ip-geo-block' ),
|
1000 |
array( $context, 'callback_field' ),
|
1001 |
$option_slug,
|
@@ -1003,17 +1011,16 @@ endif;
|
|
1003 |
array(
|
1004 |
'type' => 'checkbox',
|
1005 |
'option' => $option_name,
|
1006 |
-
'field' =>
|
1007 |
-
'sub-field' =>
|
1008 |
-
'value' => $options[
|
1009 |
'after' => $exception,
|
1010 |
)
|
1011 |
);
|
1012 |
|
1013 |
// UA string and qualification
|
1014 |
-
$key = 'ua_list';
|
1015 |
add_settings_field(
|
1016 |
-
$option_name.'
|
1017 |
'<dfn title="' . __( 'A part of user agent string and a qualification connected with a separator that indicates an applicable rule and can be “:” (pass) or “#” (block). A “qualification” can be “DNS”, “FEED”, country code or IP address with CIDR. A negative operator “!” can be placed just before a “qualification”.', 'ip-geo-block' ) . '">' . __( 'UA string and qualification', 'ip-geo-block' ) . '</dfn>',
|
1018 |
array( $context, 'callback_field' ),
|
1019 |
$option_slug,
|
@@ -1021,54 +1028,33 @@ endif;
|
|
1021 |
array(
|
1022 |
'type' => 'textarea',
|
1023 |
'option' => $option_name,
|
1024 |
-
'field' =>
|
1025 |
-
'sub-field' =>
|
1026 |
-
'value' => $options[
|
1027 |
-
'after' => $
|
1028 |
)
|
1029 |
);
|
1030 |
|
1031 |
-
|
1032 |
-
// Excluded action
|
1033 |
-
$key = 'exception';
|
1034 |
add_settings_field(
|
1035 |
-
$option_name.'
|
1036 |
-
'<dfn title="' . __( '
|
1037 |
-
array( $context, 'callback_field' ),
|
1038 |
-
$option_slug,
|
1039 |
-
$section,
|
1040 |
-
array(
|
1041 |
-
'type' => 'text',
|
1042 |
-
'option' => $option_name,
|
1043 |
-
'field' => $key,
|
1044 |
-
'sub-field' => $field,
|
1045 |
-
'value' => implode( ',', $options[ $key ][ $field ] ),
|
1046 |
-
'after' => $comma[0],
|
1047 |
-
)
|
1048 |
-
);
|
1049 |
-
endif;
|
1050 |
-
|
1051 |
-
// DNS reverse lookup
|
1052 |
-
$key = 'dnslkup';
|
1053 |
-
add_settings_field(
|
1054 |
-
$option_name.'_'.$field.'_'.$key,
|
1055 |
-
'<dfn title="' . __( 'It enables to verify the host by reverse DNS lookup which would spend some server resources. If it is disabled, “HOST” and “HOST=…”in “UA string and qualification” will always return “true”.', 'ip-geo-block' ) . '">' . __( 'DNS reverse lookup', 'ip-geo-block' ) . '</dfn>',
|
1056 |
array( $context, 'callback_field' ),
|
1057 |
$option_slug,
|
1058 |
$section,
|
1059 |
array(
|
1060 |
'type' => 'checkbox',
|
1061 |
'option' => $option_name,
|
1062 |
-
'field' =>
|
1063 |
-
'sub-field' =>
|
1064 |
-
'value' => $options[
|
|
|
1065 |
)
|
1066 |
);
|
1067 |
|
1068 |
// Simulation mode
|
1069 |
-
$key = 'simulate';
|
1070 |
add_settings_field(
|
1071 |
-
$option_name.'
|
1072 |
'<dfn title="' . __( 'It enables to simulate validation without deployment. The results can be found as “public” in Logs.', 'ip-geo-block' ) . '">' . __( 'Simulation mode', 'ip-geo-block' ) . '</dfn>',
|
1073 |
array( $context, 'callback_field' ),
|
1074 |
$option_slug,
|
@@ -1076,9 +1062,9 @@ endif;
|
|
1076 |
array(
|
1077 |
'type' => 'checkbox',
|
1078 |
'option' => $option_name,
|
1079 |
-
'field' =>
|
1080 |
-
'sub-field' =>
|
1081 |
-
'value' => $options[
|
1082 |
)
|
1083 |
);
|
1084 |
|
@@ -1087,15 +1073,14 @@ endif;
|
|
1087 |
*----------------------------------------*/
|
1088 |
add_settings_section(
|
1089 |
$section = $plugin_slug . '-recording',
|
1090 |
-
__( 'Privacy and record settings', 'ip-geo-block' ),
|
1091 |
array( __CLASS__, 'note_privacy' ),
|
1092 |
$option_slug
|
1093 |
);
|
1094 |
|
1095 |
// Anonymize IP address
|
1096 |
-
$field = 'anonymize';
|
1097 |
add_settings_field(
|
1098 |
-
$option_name.'
|
1099 |
__( '<dfn title="IP address is always encrypted on recording in Cache and Logs. Moreover, this option replaces the end of IP address with “***” to make it anonymous.">Anonymize IP address</dfn>', 'ip-geo-block' ),
|
1100 |
array( $context, 'callback_field' ),
|
1101 |
$option_slug,
|
@@ -1103,15 +1088,14 @@ endif;
|
|
1103 |
array(
|
1104 |
'type' => 'checkbox',
|
1105 |
'option' => $option_name,
|
1106 |
-
'field' =>
|
1107 |
-
'value' => ! empty( $options[
|
1108 |
)
|
1109 |
);
|
1110 |
|
1111 |
// Do not send IP address to external APIs
|
1112 |
-
$field = 'restrict_api';
|
1113 |
add_settings_field(
|
1114 |
-
$option_name.'
|
1115 |
__( '<dfn title="This option restricts not to send IP address to the external Geolocation APIs.">Do not send IP address to external APIs</dfn>', 'ip-geo-block' ),
|
1116 |
array( $context, 'callback_field' ),
|
1117 |
$option_slug,
|
@@ -1119,32 +1103,29 @@ endif;
|
|
1119 |
array(
|
1120 |
'type' => 'checkbox',
|
1121 |
'option' => $option_name,
|
1122 |
-
'field' =>
|
1123 |
-
'value' => ! empty( $options[
|
1124 |
)
|
1125 |
);
|
1126 |
|
1127 |
-
// Record
|
1128 |
-
$field = 'save_statistics';
|
1129 |
add_settings_field(
|
1130 |
-
$option_name.'
|
1131 |
-
__( '<dfn title="This option enables to record the number blocked countries and the number of blocked requests per day.">Record “Statistics”</dfn>', 'ip-geo-block' ),
|
1132 |
array( $context, 'callback_field' ),
|
1133 |
$option_slug,
|
1134 |
$section,
|
1135 |
array(
|
1136 |
'type' => 'checkbox',
|
1137 |
'option' => $option_name,
|
1138 |
-
'field' =>
|
1139 |
-
'value' => $options[
|
1140 |
)
|
1141 |
);
|
1142 |
|
1143 |
if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
1144 |
-
$field = 'validation';
|
1145 |
-
$key = 'recdays';
|
1146 |
add_settings_field(
|
1147 |
-
$option_name.'
|
1148 |
'<div class="ip-geo-block-subitem">' . __( 'Maximum period for “Statistics” [days]', 'ip-geo-block' ) . '</div>',
|
1149 |
array( $context, 'callback_field' ),
|
1150 |
$option_slug,
|
@@ -1152,33 +1133,32 @@ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
|
1152 |
array(
|
1153 |
'type' => 'text',
|
1154 |
'option' => $option_name,
|
1155 |
-
'field' =>
|
1156 |
-
'sub-field' =>
|
1157 |
-
'value' => $options[
|
|
|
1158 |
)
|
1159 |
);
|
1160 |
endif;
|
1161 |
|
1162 |
-
// Record IP address
|
1163 |
-
$field = 'cache_hold';
|
1164 |
add_settings_field(
|
1165 |
-
$option_name.'
|
1166 |
-
__( '<dfn title="This option enables to record the IP address, country code and failure counter of login attempts into the cache on database to minimize the impact on site speed.">Record “IP address
|
1167 |
array( $context, 'callback_field' ),
|
1168 |
$option_slug,
|
1169 |
$section,
|
1170 |
array(
|
1171 |
'type' => 'checkbox',
|
1172 |
'option' => $option_name,
|
1173 |
-
'field' =>
|
1174 |
-
'value' => $options[
|
1175 |
)
|
1176 |
);
|
1177 |
|
1178 |
// Expiration time [sec] for each entry
|
1179 |
-
$field = 'cache_time';
|
1180 |
add_settings_field(
|
1181 |
-
$option_name.'
|
1182 |
'<div class="ip-geo-block-subitem">' . __( '<dfn title="If user authentication fails consecutively beyond “Max number of failed login attempts per IP address”, subsequent login will also be prohibited for this period.">Expiration time [sec] for each entry</dfn>', 'ip-geo-block' ) . '</div>',
|
1183 |
array( $context, 'callback_field' ),
|
1184 |
$option_slug,
|
@@ -1186,25 +1166,25 @@ endif;
|
|
1186 |
array(
|
1187 |
'type' => 'text',
|
1188 |
'option' => $option_name,
|
1189 |
-
'field' =>
|
1190 |
-
'value' => $options[
|
|
|
1191 |
)
|
1192 |
);
|
1193 |
|
1194 |
-
// Record
|
1195 |
-
$field = 'validation';
|
1196 |
add_settings_field(
|
1197 |
-
$option_name.'
|
1198 |
-
__( '<dfn title="This option enables to record the validation logs including IP addresses.">Record “
|
1199 |
array( $context, 'callback_field' ),
|
1200 |
$option_slug,
|
1201 |
$section,
|
1202 |
array(
|
1203 |
'type' => 'select',
|
1204 |
'option' => $option_name,
|
1205 |
-
'field' =>
|
1206 |
'sub-field' => 'reclogs',
|
1207 |
-
'value' => $options[
|
1208 |
'list' => array(
|
1209 |
0 => __( 'Disable', 'ip-geo-block' ),
|
1210 |
1 => __( 'When blocked', 'ip-geo-block' ),
|
@@ -1218,25 +1198,25 @@ endif;
|
|
1218 |
);
|
1219 |
|
1220 |
// Expiration time [days] for each entry
|
1221 |
-
$key = 'explogs';
|
1222 |
add_settings_field(
|
1223 |
-
$option_name.'
|
1224 |
-
'<div class="ip-geo-block-subitem">' . sprintf( __( '<dfn title="The maximum number of entries in the logs is also limited to %d.">Expiration time [days] for each entry</dfn>', 'ip-geo-block' ), $options[
|
1225 |
array( $context, 'callback_field' ),
|
1226 |
$option_slug,
|
1227 |
$section,
|
1228 |
array(
|
1229 |
'type' => 'text',
|
1230 |
'option' => $option_name,
|
1231 |
-
'field' =>
|
1232 |
-
'sub-field' =>
|
1233 |
-
'value' => $options[
|
|
|
1234 |
)
|
1235 |
);
|
1236 |
|
1237 |
// $_POST key to record with value
|
1238 |
add_settings_field(
|
1239 |
-
$option_name.'
|
1240 |
'<div class="ip-geo-block-subitem">' . __( '<dfn title="e.g. action, comment, log, pwd, FILES">$_POST key to record with value</dfn>', 'ip-geo-block' ) . '</div>',
|
1241 |
array( $context, 'callback_field' ),
|
1242 |
$option_slug,
|
@@ -1244,35 +1224,35 @@ endif;
|
|
1244 |
array(
|
1245 |
'type' => 'text',
|
1246 |
'option' => $option_name,
|
1247 |
-
'field' =>
|
1248 |
'sub-field' => 'postkey',
|
1249 |
-
'value' => $options[
|
1250 |
-
'after' => $
|
|
|
1251 |
)
|
1252 |
);
|
1253 |
|
1254 |
if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
1255 |
-
// Maximum entries
|
1256 |
-
$key = 'maxlogs';
|
1257 |
add_settings_field(
|
1258 |
-
$option_name.'
|
1259 |
-
'<div class="ip-geo-block-subitem">' . __( 'Maximum entries
|
1260 |
array( $context, 'callback_field' ),
|
1261 |
$option_slug,
|
1262 |
$section,
|
1263 |
array(
|
1264 |
'type' => 'text',
|
1265 |
'option' => $option_name,
|
1266 |
-
'field' =>
|
1267 |
-
'sub-field' =>
|
1268 |
-
'value' => $options[
|
|
|
1269 |
)
|
1270 |
);
|
1271 |
|
1272 |
// Live update
|
1273 |
-
$field = 'live_update';
|
1274 |
add_settings_field(
|
1275 |
-
$option_name.'
|
1276 |
'<div class="ip-geo-block-subitem">' . __( '<dfn title="Select SQLite database source.">Database source of SQLite for “Live update”</dfn>', 'ip-geo-block' ) . '</div>',
|
1277 |
array( $context, 'callback_field' ),
|
1278 |
$option_slug,
|
@@ -1280,9 +1260,10 @@ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
|
1280 |
array(
|
1281 |
'type' => 'select',
|
1282 |
'option' => $option_name,
|
1283 |
-
'field' =>
|
1284 |
'sub-field' => 'in_memory',
|
1285 |
-
'value' => extension_loaded( 'pdo_sqlite' ) ? $options[
|
|
|
1286 |
'list' => array(
|
1287 |
-1 => NULL,
|
1288 |
0 => __( 'Ordinary file', 'ip-geo-block' ),
|
@@ -1297,9 +1278,8 @@ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
|
1297 |
);
|
1298 |
|
1299 |
// Reset data source of live log
|
1300 |
-
$field = 'reset_live';
|
1301 |
add_settings_field(
|
1302 |
-
$option_name.'
|
1303 |
'<div class="ip-geo-block-subitem">' . __( 'Reset database source of “Live update”', 'ip-geo-block' ) . '</div>',
|
1304 |
array( $context, 'callback_field' ),
|
1305 |
$option_slug,
|
@@ -1307,9 +1287,10 @@ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
|
1307 |
array(
|
1308 |
'type' => 'button',
|
1309 |
'option' => $option_name,
|
1310 |
-
'field' =>
|
1311 |
'value' => __( 'Reset now', 'ip-geo-block' ),
|
1312 |
'after' => '<div id="ip-geo-block-reset-live"></div>',
|
|
|
1313 |
)
|
1314 |
);
|
1315 |
endif;
|
@@ -1319,26 +1300,24 @@ endif;
|
|
1319 |
$tmp = $tmp ? IP_Geo_Block_Util::localdate( $tmp ) : '<span class="ip-geo-block-warn">' . __( 'Task could not be found in WP-Cron. Please try to deactivate this plugin once and activate again.', 'ip-geo-block' ). '</span>';
|
1320 |
|
1321 |
// Interval [sec] to cleanup expired entries of IP address
|
1322 |
-
$field = 'cache_time_gc';
|
1323 |
add_settings_field(
|
1324 |
-
$option_name.'
|
1325 |
-
__( '<dfn title="This option enables to schedule the WP-Cron event to remove the expired entries in “IP address
|
1326 |
array( $context, 'callback_field' ),
|
1327 |
$option_slug,
|
1328 |
$section,
|
1329 |
array(
|
1330 |
'type' => 'text',
|
1331 |
'option' => $option_name,
|
1332 |
-
'field' =>
|
1333 |
-
'value' => $options[
|
1334 |
'after' => '<p class="ip-geo-block-desc">' . sprintf( __( 'Next schedule: %s', 'ip-geo-block'), $tmp ) . '</p>',
|
1335 |
)
|
1336 |
);
|
1337 |
|
1338 |
// Remove all settings and records at uninstallation
|
1339 |
-
$field = 'clean_uninstall';
|
1340 |
add_settings_field(
|
1341 |
-
$option_name.'
|
1342 |
__( 'Remove all settings and records at uninstallation', 'ip-geo-block' ),
|
1343 |
array( $context, 'callback_field' ),
|
1344 |
$option_slug,
|
@@ -1346,8 +1325,8 @@ endif;
|
|
1346 |
array(
|
1347 |
'type' => 'checkbox',
|
1348 |
'option' => $option_name,
|
1349 |
-
'field' =>
|
1350 |
-
'value' => $options[
|
1351 |
)
|
1352 |
);
|
1353 |
|
@@ -1356,14 +1335,14 @@ endif;
|
|
1356 |
*----------------------------------------*/
|
1357 |
add_settings_section(
|
1358 |
$section = $plugin_slug . '-provider',
|
1359 |
-
__( 'Geolocation API settings', 'ip-geo-block' ),
|
1360 |
array( __CLASS__, 'note_services' ),
|
1361 |
$option_slug
|
1362 |
);
|
1363 |
|
1364 |
// Local DBs and APIs
|
1365 |
$provider = IP_Geo_Block_Provider::get_providers( 'key' ); // all available providers
|
1366 |
-
$providers = IP_Geo_Block_Provider::get_addons( $options['providers'] ); // only local
|
1367 |
|
1368 |
// Disable 3rd parties API
|
1369 |
if ( ! empty( $options['restrict_api'] ) ) {
|
@@ -1374,18 +1353,17 @@ endif;
|
|
1374 |
}
|
1375 |
|
1376 |
// API selection and key settings
|
1377 |
-
$field = 'providers';
|
1378 |
add_settings_field(
|
1379 |
-
$option_name.'
|
1380 |
-
__( '<dfn title="IP address
|
1381 |
array( $context, 'callback_field' ),
|
1382 |
$option_slug,
|
1383 |
$section,
|
1384 |
array(
|
1385 |
'type' => 'check-provider',
|
1386 |
'option' => $option_name,
|
1387 |
-
'field' =>
|
1388 |
-
'value' => $options[
|
1389 |
'local' => $providers,
|
1390 |
'providers' => $provider,
|
1391 |
'titles' => IP_Geo_Block_Provider::get_providers( 'type' ),
|
@@ -1394,9 +1372,8 @@ endif;
|
|
1394 |
|
1395 |
if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
1396 |
// Timeout for network API
|
1397 |
-
$field = 'timeout';
|
1398 |
add_settings_field(
|
1399 |
-
$option_name.'
|
1400 |
__( 'Timeout for network API [sec]', 'ip-geo-block' ),
|
1401 |
array( $context, 'callback_field' ),
|
1402 |
$option_slug,
|
@@ -1404,8 +1381,8 @@ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
|
1404 |
array(
|
1405 |
'type' => 'text',
|
1406 |
'option' => $option_name,
|
1407 |
-
'field' =>
|
1408 |
-
'value' => $options[
|
1409 |
)
|
1410 |
);
|
1411 |
endif;
|
@@ -1413,16 +1390,9 @@ endif;
|
|
1413 |
/*----------------------------------------*
|
1414 |
* Local database settings
|
1415 |
*----------------------------------------*/
|
1416 |
-
if ( empty( $providers ) ) {
|
1417 |
-
$context->add_admin_notice( 'error', sprintf(
|
1418 |
-
__( 'Can not find Geolocation API libraries in <code>%s</code>. It seems to have failed downloading <a rel="noreferrer" href="https://github.com/tokkonopapa/WordPress-IP-Geo-API/archive/master.zip" title="Download the contents of tokkonopapa/WordPress-IP-Geo-API as a zip file">ZIP file</a> from <a rel="noreferrer" href="https://github.com/tokkonopapa/WordPress-IP-Geo-API" title="tokkonopapa/WordPress-IP-Geo-API - GitHub">WordPress-IP-Geo-API</a>. Please install <code>ip-geo-api</code> with write permission according to <a rel="noreferrer" href="http://www.ipgeoblock.com/codex/how-to-fix-permission-troubles.html" title="How can I fix permission troubles? | IP Geo Block">this instruction</a>.', 'ip-geo-block' ),
|
1419 |
-
apply_filters( 'ip-geo-block-api-dir', basename( WP_CONTENT_DIR ) )
|
1420 |
-
) );
|
1421 |
-
}
|
1422 |
-
|
1423 |
add_settings_section(
|
1424 |
$section = $plugin_slug . '-database',
|
1425 |
-
array( __( 'Local database settings', 'ip-geo-block' ), '<a href="
|
1426 |
array( __CLASS__, 'note_database' ),
|
1427 |
$option_slug
|
1428 |
);
|
@@ -1457,9 +1427,8 @@ endif;
|
|
1457 |
$tmp = $tmp ? IP_Geo_Block_Util::localdate( $tmp ) : '<span class="ip-geo-block-warn">' . __( 'Task could not be found in WP-Cron. Please try to deactivate this plugin once and activate again.', 'ip-geo-block' ). '</span>';
|
1458 |
|
1459 |
// Auto updating (once a month)
|
1460 |
-
$field = 'update';
|
1461 |
add_settings_field(
|
1462 |
-
$option_name.'
|
1463 |
__( 'Auto updating (once a month)', 'ip-geo-block' ),
|
1464 |
array( $context, 'callback_field' ),
|
1465 |
$option_slug,
|
@@ -1467,17 +1436,17 @@ endif;
|
|
1467 |
array(
|
1468 |
'type' => 'checkbox',
|
1469 |
'option' => $option_name,
|
1470 |
-
'field' =>
|
1471 |
'sub-field' => 'auto',
|
1472 |
-
'value' => $options[
|
1473 |
'disabled' => empty( $providers ),
|
1474 |
-
'after' => $options[
|
1475 |
)
|
1476 |
);
|
1477 |
|
1478 |
// Download database
|
1479 |
add_settings_field(
|
1480 |
-
$option_name.'
|
1481 |
__( 'Download database', 'ip-geo-block' ),
|
1482 |
array( $context, 'callback_field' ),
|
1483 |
$option_slug,
|
@@ -1485,56 +1454,19 @@ endif;
|
|
1485 |
array(
|
1486 |
'type' => 'button',
|
1487 |
'option' => $option_name,
|
1488 |
-
'field' =>
|
1489 |
'value' => __( 'Download now', 'ip-geo-block' ),
|
1490 |
'disabled' => empty( $providers ),
|
1491 |
'after' => '<div id="ip-geo-block-download"></div>',
|
1492 |
)
|
1493 |
);
|
1494 |
|
1495 |
-
/*----------------------------------------*
|
1496 |
-
* Submission settings
|
1497 |
-
*----------------------------------------*/
|
1498 |
-
add_settings_section(
|
1499 |
-
$section = $plugin_slug . '-submission',
|
1500 |
-
__( 'Submission settings', 'ip-geo-block' ),
|
1501 |
-
NULL,
|
1502 |
-
$option_slug
|
1503 |
-
);
|
1504 |
-
|
1505 |
-
$val = $GLOBALS['allowedtags'];
|
1506 |
-
unset( $val['blockquote'] );
|
1507 |
-
|
1508 |
-
// Message on comment form
|
1509 |
-
$field = 'comment';
|
1510 |
-
add_settings_field(
|
1511 |
-
$option_name.'_'.$field,
|
1512 |
-
'<dfn title="' . __( 'The whole will be wrapped by <p> tag. Allowed tags: ', 'ip-geo-block' ) . implode( ', ', array_keys( $val ) ) . '">' . __( 'Message on comment form', 'ip-geo-block' ) . '</dfn>',
|
1513 |
-
array( $context, 'callback_field' ),
|
1514 |
-
$option_slug,
|
1515 |
-
$section,
|
1516 |
-
array(
|
1517 |
-
'type' => 'select-text',
|
1518 |
-
'option' => $option_name,
|
1519 |
-
'field' => $field,
|
1520 |
-
'sub-field' => 'pos',
|
1521 |
-
'txt-field' => 'msg',
|
1522 |
-
'value' => $options[ $field ]['pos'],
|
1523 |
-
'list' => array(
|
1524 |
-
0 => __( 'None', 'ip-geo-block' ),
|
1525 |
-
1 => __( 'Top', 'ip-geo-block' ),
|
1526 |
-
2 => __( 'Bottom', 'ip-geo-block' ),
|
1527 |
-
),
|
1528 |
-
'text' => $options[ $field ]['msg'], // escaped by esc_attr() at 'text'
|
1529 |
-
)
|
1530 |
-
);
|
1531 |
-
|
1532 |
/*----------------------------------------*
|
1533 |
* Plugin settings
|
1534 |
*----------------------------------------*/
|
1535 |
add_settings_section(
|
1536 |
$section = $plugin_slug . '-others',
|
1537 |
-
__( 'Plugin settings', 'ip-geo-block' ),
|
1538 |
NULL,
|
1539 |
$option_slug
|
1540 |
);
|
@@ -1544,9 +1476,8 @@ if ( IP_GEO_BLOCK_NETWORK ):
|
|
1544 |
add_action( 'network_admin_edit_' . IP_Geo_Block::PLUGIN_NAME, array( $context, 'validate_network_settings' ) );
|
1545 |
|
1546 |
// Network wide configuration
|
1547 |
-
$field = 'network_wide';
|
1548 |
add_settings_field(
|
1549 |
-
$option_name.'
|
1550 |
__( '<dfn title="Synchronize all settings over the network wide.">Network wide settings</dfn>', 'ip-geo-block' ),
|
1551 |
array( $context, 'callback_field' ),
|
1552 |
$option_slug,
|
@@ -1554,37 +1485,49 @@ if ( IP_GEO_BLOCK_NETWORK ):
|
|
1554 |
array(
|
1555 |
'type' => 'checkbox',
|
1556 |
'option' => $option_name,
|
1557 |
-
'field' =>
|
1558 |
-
'value' => $options[
|
1559 |
'disabled' => ! current_user_can( 'manage_network_options' ),
|
1560 |
)
|
1561 |
);
|
1562 |
}
|
1563 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1564 |
// Google Maps API key
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
$
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
'value' => $options[ $field ][ $key ],
|
1580 |
-
)
|
1581 |
-
);
|
1582 |
-
}
|
1583 |
|
1584 |
// Export / Import settings
|
1585 |
-
$field = 'export-import';
|
1586 |
add_settings_field(
|
1587 |
-
$option_name.'
|
1588 |
sprintf( '<dfn title="%s">' . __( 'Export / Import settings', 'ip-geo-block' ) . '</dfn>', $desc[4] ),
|
1589 |
array( $context, 'callback_field' ),
|
1590 |
$option_slug,
|
@@ -1592,16 +1535,15 @@ endif;
|
|
1592 |
array(
|
1593 |
'type' => 'none',
|
1594 |
'before' =>
|
1595 |
-
'<a class="button
|
1596 |
-
'<a class="button
|
1597 |
'after' => '<div id="ip-geo-block-export-import"></div>',
|
1598 |
)
|
1599 |
);
|
1600 |
|
1601 |
// Pre-defined settings
|
1602 |
-
$field = 'pre-defined';
|
1603 |
add_settings_field(
|
1604 |
-
$option_name.'
|
1605 |
sprintf( '<dfn title="%s">' . __( 'Import pre-defined settings', 'ip-geo-block' ) . '</dfn>', $desc[4] ),
|
1606 |
array( $context, 'callback_field' ),
|
1607 |
$option_slug,
|
@@ -1609,59 +1551,41 @@ endif;
|
|
1609 |
array(
|
1610 |
'type' => 'none',
|
1611 |
'before' =>
|
1612 |
-
'<a class="button
|
1613 |
-
'<a class="button
|
1614 |
'after' => '<div id="ip-geo-block-pre-defined"></div>',
|
1615 |
)
|
1616 |
);
|
1617 |
|
1618 |
if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
1619 |
-
//
|
1620 |
-
$field = 'delete_table';
|
1621 |
-
add_settings_field(
|
1622 |
-
$option_name.'_'.$field,
|
1623 |
-
__( 'Delete DB tables for this plugin', 'ip-geo-block' ),
|
1624 |
-
array( $context, 'callback_field' ),
|
1625 |
-
$option_slug,
|
1626 |
-
$section,
|
1627 |
-
array(
|
1628 |
-
'type' => 'button',
|
1629 |
-
'option' => $option_name,
|
1630 |
-
'field' => $field,
|
1631 |
-
'value' => __( 'Delete now', 'ip-geo-block' ),
|
1632 |
-
'after' => '<div id="ip-geo-block-delete-table"></div>',
|
1633 |
-
)
|
1634 |
-
);
|
1635 |
-
|
1636 |
-
$field = 'create_table';
|
1637 |
add_settings_field(
|
1638 |
-
$option_name.'
|
1639 |
-
__( '
|
1640 |
array( $context, 'callback_field' ),
|
1641 |
$option_slug,
|
1642 |
$section,
|
1643 |
array(
|
1644 |
'type' => 'button',
|
1645 |
'option' => $option_name,
|
1646 |
-
'field' =>
|
1647 |
-
'value' => __( '
|
1648 |
-
'after' => '<div id="ip-geo-block-
|
1649 |
)
|
1650 |
);
|
1651 |
endif;
|
1652 |
|
1653 |
// Diagnostic information
|
1654 |
-
$field = 'show-info';
|
1655 |
add_settings_field(
|
1656 |
-
$option_name.'
|
1657 |
-
__( '<dfn title="When you have some unexpected blocking experiences, please press the button to find the blocked requests at the end of dumped information which may help you to solve the issues.">Diagnostic information</dfn><br />[ <a rel="noreferrer" href="https://wordpress.org/support/plugin/ip-geo-block" title="
|
1658 |
array( $context, 'callback_field' ),
|
1659 |
$option_slug,
|
1660 |
$section,
|
1661 |
array(
|
1662 |
'type' => 'none',
|
1663 |
'before' =>
|
1664 |
-
'<a class="button
|
1665 |
'after' => '<div id="ip-geo-block-wp-info"></div>',
|
1666 |
)
|
1667 |
);
|
@@ -1671,15 +1595,8 @@ endif;
|
|
1671 |
/**
|
1672 |
* Subsidiary note for the sections
|
1673 |
*
|
1674 |
-
* @param array $section settings of section added to admin pages
|
1675 |
-
* @param bool $stat TRUE:open ('o') or FALSE:close ('x')
|
1676 |
*/
|
1677 |
public static function note_target() {
|
1678 |
-
echo
|
1679 |
-
'<ul class="ip-geo-block-note">', "\n",
|
1680 |
-
'<li>', __( 'To enhance the protection ability, please refer to “<a rel="noreferrer" href="http://www.ipgeoblock.com/codex/the-best-practice-for-target-settings.html" title="The best practice for target settings | IP Geo Block">The best practice for target settings</a>”.', 'ip-geo-block' ), '</li>', "\n",
|
1681 |
-
'<li>', __( 'If you have any troubles with these, please check FAQ at <a rel="noreferrer" href="https://wordpress.org/plugins/ip-geo-block/faq/" title="IP Geo Block — WordPress Plugins">WordPress.org</a> and <a rel="noreferrer" href="http://www.ipgeoblock.com/codex/#faq" title="Codex | IP Geo Block">Codex</a>.', 'ip-geo-block' ), '</li>', "\n",
|
1682 |
-
'</ul>', "\n";
|
1683 |
}
|
1684 |
|
1685 |
public static function note_services() {
|
@@ -1701,18 +1618,9 @@ endif;
|
|
1701 |
}
|
1702 |
|
1703 |
public static function note_public() {
|
1704 |
-
echo
|
1705 |
-
'<ul class="ip-geo-block-note">', "\n",
|
1706 |
-
'<li>', __( 'Please refer to the document “<a rel="noreferrer" href="http://www.ipgeoblock.com/codex/#blocking-on-front-end" title="Codex | IP Geo Block">Blocking on front-end</a>” for details, including restrictions on cache plugin.', 'ip-geo-block' ), '</li>', "\n",
|
1707 |
-
'<li>', __( 'If you find any issues or have something to suggest, please feel free to open an issue at <a rel="noreferrer" href="https://wordpress.org/support/plugin/ip-geo-block" title="WordPress › Support » IP Geo Block">support forum</a>.', 'ip-geo-block' ), '</li>', "\n",
|
1708 |
-
'</ul>', "\n";
|
1709 |
}
|
1710 |
|
1711 |
public static function note_privacy() {
|
1712 |
-
echo
|
1713 |
-
'<ul class="ip-geo-block-note">', "\n",
|
1714 |
-
'<li>', __( 'Please refer to the document “<a rel="noreferrer" href="http://www.ipgeoblock.com/codex/record-settings-and-logs.html" title="Codex | IP Geo Block">Record settings and logs</a>” for details.', 'ip-geo-block' ), '</li>', "\n",
|
1715 |
-
'</ul>', "\n";
|
1716 |
}
|
1717 |
|
1718 |
}
|
1 |
<?php
|
|
|
2 |
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-opts.php';
|
3 |
require_once IP_GEO_BLOCK_PATH . 'admin/includes/class-admin-rewrite.php';
|
4 |
|
8 |
$options = IP_Geo_Block::get_option();
|
9 |
$plugin_slug = IP_Geo_Block::PLUGIN_NAME; // 'ip-geo-block'
|
10 |
|
11 |
+
// common descriptions
|
12 |
+
$common = array(
|
13 |
+
'<span class="ip-geo-block-sup">' . __( '(comma separated)', 'ip-geo-block' ) . '</span>',
|
14 |
+
'<span class="ip-geo-block-sup">' . __( '(comma or RET separated)', 'ip-geo-block' ) . '</span>',
|
15 |
+
'<span title="' . __( 'Toggle selection', 'ip-geo-block' ) . '"></span>',
|
16 |
+
'<span title="' . __( 'Find blocked requests in “Logs“', 'ip-geo-block' ) . '"></span>',
|
17 |
+
__( 'Help', 'ip-geo-block' ),
|
18 |
+
__( 'Before adding as “Exception”, please click on “<a class="ip-geo-block-icon ip-geo-block-icon-alert" title="This button is just a sample."><span></span></a>” button (if exists) attached to the following list to confirm that the blocked request is not malicious.', 'ip-geo-block' ),
|
19 |
+
__( 'Open CIDR calculator for IPv4 / IPv6.', 'ip-geo-block' ),
|
20 |
+
);
|
21 |
+
|
22 |
/**
|
23 |
* Register a setting and its sanitization callback.
|
24 |
+
* @link https://codex.wordpress.org/Function_Reference/register_setting
|
25 |
*
|
26 |
* register_setting( $option_group, $option_name, $sanitize_callback );
|
27 |
* @param string $option_group A settings group name.
|
37 |
|
38 |
/**
|
39 |
* Add new section to a new page inside the existing page.
|
40 |
+
* @link https://codex.wordpress.org/Function_Reference/add_settings_section
|
41 |
*
|
42 |
* add_settings_section( $id, $title, $callback, $page );
|
43 |
* @param string $id String for use in the 'id' attribute of tags.
|
51 |
*----------------------------------------*/
|
52 |
add_settings_section(
|
53 |
$section = $plugin_slug . '-validation-rule',
|
54 |
+
array( __( 'Validation rule settings', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/validation-rule-settings.html" title="Validation rule settings | IP Geo Block">' . $common[4] . '</a>' ),
|
55 |
NULL,
|
56 |
$option_slug
|
57 |
);
|
58 |
|
59 |
/**
|
60 |
* Register a settings field to the settings page and section.
|
61 |
+
* @link https://codex.wordpress.org/Function_Reference/add_settings_field
|
62 |
*
|
63 |
* add_settings_field( $id, $title, $callback, $page, $section, $args );
|
64 |
* @param string $id String for use in the 'id' attribute of tags.
|
71 |
// Get the country code of client
|
72 |
$key = IP_Geo_Block::get_geolocation( $val = IP_Geo_Block::get_ip_address( $options ) );
|
73 |
|
|
|
74 |
add_settings_field(
|
75 |
+
$option_name.'_ip_client',
|
76 |
__( '<dfn title="You can confirm the appropriate Geolocation APIs and country code by referring “Scan country code”.">Your IP address / Country</dfn>', 'ip-geo-block' ),
|
77 |
array( $context, 'callback_field' ),
|
78 |
$option_slug,
|
80 |
array(
|
81 |
'type' => 'html',
|
82 |
'option' => $option_name,
|
83 |
+
'field' => 'ip_client',
|
84 |
+
'value' => '<span class="ip-geo-block-ip-addr">' . esc_html( $key['ip'] . ' / ' . ( $key['code'] && isset( $key['provider'] ) ? $key['code'] . ' (' . $key['provider'] . ')' : __( 'n/a', 'ip-geo-block' ) ) ) . '</span>',
|
85 |
+
'after' => ' <a class="button-secondary" id="ip-geo-block-scan-ip_client" title="' . __( 'Scan all the APIs you selected at Geolocation API settings', 'ip-geo-block' ) . '" href="#!">' . __( 'Scan country code', 'ip-geo-block' ) . '</a><div id="ip-geo-block-scanning-ip_client"></div>',
|
86 |
)
|
87 |
);
|
88 |
|
90 |
// Get the country code of server
|
91 |
$key = IP_Geo_Block::get_geolocation( $_SERVER['SERVER_ADDR'] );
|
92 |
|
|
|
93 |
add_settings_field(
|
94 |
+
$option_name.'_ip_server',
|
95 |
__( '<dfn title="You can confirm the appropriate Geolocation APIs and country code by referring “Scan country code”.">Server IP address / Country</dfn>', 'ip-geo-block' ),
|
96 |
array( $context, 'callback_field' ),
|
97 |
$option_slug,
|
99 |
array(
|
100 |
'type' => 'html',
|
101 |
'option' => $option_name,
|
102 |
+
'field' => 'ip_server',
|
103 |
+
'value' => '<span class="ip-geo-block-ip-addr">' . esc_html( $key['ip'] . ' / ' . ( $key['code'] && isset( $key['provider'] ) ? $key['code'] . ' (' . $key['provider'] . ')' : __( 'n/a', 'ip-geo-block' ) ) ) . '</span>',
|
104 |
+
'after' => ' <a class="button-secondary" id="ip-geo-block-scan-ip_server" title="' . __( 'Scan all the APIs you selected at Geolocation API settings', 'ip-geo-block' ) . '" href="#!">' . __( 'Scan country code', 'ip-geo-block' ) . '</a><div id="ip-geo-block-scanning-ip_server"></div>',
|
105 |
)
|
106 |
);
|
107 |
endif;
|
115 |
|
116 |
$rule_desc = array(
|
117 |
__( 'Please select either “Whitelist” or “Blacklist”.', 'ip-geo-block' ),
|
118 |
+
__( '<dfn title="“Block by country” will be bypassed in case of empty. The special code “XX” is assigned as private IP address including localhost. And “ZZ” is for unknown IP address (i.e. not in the geolocation databases). Please use “YY” if you need the code that does not correspond to any of the countries.">Whitelist of country code</dfn>', 'ip-geo-block' ) . '<br />(<a rel="noreferrer" href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements" title="ISO 3166-1 alpha-2 - Wikipedia, the free encyclopedia">ISO 3166-1 alpha-2</a>)',
|
119 |
+
__( '<dfn title="“Block by country” will be bypassed in case of empty. The special code “XX” is assigned as private IP address including localhost. And “ZZ” is for unknown IP address (i.e. not in the geolocation databases). Please use “YY” if you need the code that does not correspond to any of the countries.">Blacklist of country code</dfn>', 'ip-geo-block' ) . '<br />(<a rel="noreferrer" href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements" title="ISO 3166-1 alpha-2 - Wikipedia, the free encyclopedia">ISO 3166-1 alpha-2</a>)',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
);
|
121 |
|
122 |
// Matching rule
|
|
|
123 |
add_settings_field(
|
124 |
+
$option_name.'_matching_rule',
|
125 |
'<dfn title="' . $rule_desc[0] . '">' . __( 'Matching rule', 'ip-geo-block' ) . '</dfn>',
|
126 |
array( $context, 'callback_field' ),
|
127 |
$option_slug,
|
129 |
array(
|
130 |
'type' => 'select',
|
131 |
'option' => $option_name,
|
132 |
+
'field' => 'matching_rule',
|
133 |
+
'value' => $options['matching_rule'],
|
134 |
'list' => $rule,
|
135 |
'desc' => array(
|
136 |
-1 => $rule_desc[0],
|
142 |
);
|
143 |
|
144 |
// Country code for matching rule (ISO 3166-1 alpha-2)
|
|
|
145 |
add_settings_field(
|
146 |
+
$option_name.'_white_list',
|
147 |
$rule_desc[1],
|
148 |
array( $context, 'callback_field' ),
|
149 |
$option_slug,
|
151 |
array(
|
152 |
'type' => 'text',
|
153 |
'option' => $option_name,
|
154 |
+
'field' => 'white_list',
|
155 |
+
'value' => $options['white_list'],
|
156 |
+
'after' => $common[0],
|
157 |
'class' => $options['matching_rule'] == 0 ? '' : 'ip-geo-block-hide',
|
158 |
)
|
159 |
);
|
160 |
|
|
|
161 |
add_settings_field(
|
162 |
+
$option_name.'_black_list',
|
163 |
$rule_desc[2],
|
164 |
array( $context, 'callback_field' ),
|
165 |
$option_slug,
|
167 |
array(
|
168 |
'type' => 'text',
|
169 |
'option' => $option_name,
|
170 |
+
'field' => 'black_list',
|
171 |
+
'value' => $options['black_list'],
|
172 |
+
'after' => $common[0],
|
173 |
'class' => $options['matching_rule'] == 1 ? '' : 'ip-geo-block-hide',
|
174 |
)
|
175 |
);
|
176 |
|
177 |
// Use AS number
|
|
|
|
|
178 |
add_settings_field(
|
179 |
+
$option_name.'_Maxmind_use_asn',
|
180 |
__( '<dfn title="It enables utilizing “AS number” in the “Whitelist/Blacklist of extra IP addresses” to specify a group of IP networks.">Use Autonomous System Number</dfn>', 'ip-geo-block' ) .
|
181 |
' (<a rel="noreferrer" href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" title="Autonomous system (Internet) - Wikipedia">ASN</a>)',
|
182 |
array( $context, 'callback_field' ),
|
185 |
array(
|
186 |
'type' => 'checkbox',
|
187 |
'option' => $option_name,
|
188 |
+
'field' => 'Maxmind',
|
189 |
+
'sub-field' => 'use_asn',
|
190 |
+
'value' => 1 === (int)$options['Maxmind']['use_asn'],
|
191 |
+
'after' => '<p class="ip-geo-block-desc">' . sprintf( __( 'Some useful tools to find ASN are introduced in “%s”.', 'ip-geo-block' ), '<a rel="noreferrer" href="https://www.ipgeoblock.com/codex/utilizing-asnumber.html" title="Utilizing AS number | IP Geo Block">Utilizing AS number</a>' ) . '</p>',
|
192 |
)
|
193 |
);
|
194 |
|
195 |
// White list of extra IP addresses prior to country code (CIDR, ASN)
|
|
|
|
|
196 |
add_settings_field(
|
197 |
+
$option_name.'_extra_ips_white_list',
|
198 |
__( '<dfn title="e.g. “192.0.64.0/18” for Jetpack server, “69.46.36.0/27” for WordFence server or “AS32934” for Facebook.">Whitelist of extra IP addresses prior to country code</dfn>', 'ip-geo-block' ) .
|
199 |
' (<a rel="noreferrer" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" title="Classless Inter-Domain Routing - Wikipedia">CIDR</a>' .
|
200 |
', <a rel="noreferrer" href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" title="Autonomous system (Internet) - Wikipedia">ASN</a>)' .
|
201 |
+
'<a class="ip-geo-block-icon ip-geo-block-icon-cidr" title="' . $common[6] . '"><span class="ip-geo-block-icon-calc"></span></a>',
|
202 |
array( $context, 'callback_field' ),
|
203 |
$option_slug,
|
204 |
$section,
|
205 |
array(
|
206 |
'type' => 'textarea',
|
207 |
'option' => $option_name,
|
208 |
+
'field' => 'extra_ips',
|
209 |
+
'sub-field' => 'white_list',
|
210 |
+
'value' => $options['extra_ips']['white_list'],
|
211 |
'placeholder' => '192.168.0.0/16,2001:db8::/96,AS1234',
|
212 |
+
'after' => $common[1],
|
213 |
)
|
214 |
);
|
215 |
|
216 |
// Black list of extra IP addresses prior to country code (CIDR, ASN)
|
|
|
217 |
add_settings_field(
|
218 |
+
$option_name.'_extra_ips_black_list',
|
219 |
__( '<dfn title="Server level access control is recommended (e.g. .htaccess).">Blacklist of extra IP addresses prior to country code</dfn>', 'ip-geo-block' ) .
|
220 |
' (<a rel="noreferrer" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" title="Classless Inter-Domain Routing - Wikipedia">CIDR</a>' .
|
221 |
', <a rel="noreferrer" href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" title="Autonomous system (Internet) - Wikipedia">ASN</a>)' .
|
222 |
+
'<a class="ip-geo-block-icon ip-geo-block-icon-cidr" title="' . $common[6] . '"><span class="ip-geo-block-icon ip-geo-block-icon-calc"></span></a>',
|
223 |
array( $context, 'callback_field' ),
|
224 |
$option_slug,
|
225 |
$section,
|
226 |
array(
|
227 |
'type' => 'textarea',
|
228 |
'option' => $option_name,
|
229 |
+
'field' => 'extra_ips',
|
230 |
+
'sub-field' => 'black_list',
|
231 |
+
'value' => $options['extra_ips']['black_list'],
|
232 |
'placeholder' => '192.168.0.0/16,2001:db8::/96,AS1234',
|
233 |
+
'after' => $common[1],
|
234 |
)
|
235 |
);
|
236 |
|
237 |
// $_SERVER keys to retrieve extra IP addresses
|
|
|
|
|
238 |
add_settings_field(
|
239 |
+
$option_name.'_validation_proxy',
|
240 |
__( '<dfn title="If your server is placed behind the proxy server or the load balancing server, you need to put the appropriate key such as “HTTP_X_FORWARDED_FOR”, “HTTP_X_REAL_IP” or something like that to retrieve the client IP address.">$_SERVER keys to retrieve extra IP addresses</dfn>', 'ip-geo-block' ),
|
241 |
array( $context, 'callback_field' ),
|
242 |
$option_slug,
|
244 |
array(
|
245 |
'type' => 'text',
|
246 |
'option' => $option_name,
|
247 |
+
'field' => 'validation',
|
248 |
+
'sub-field' => 'proxy',
|
249 |
+
'value' => $options['validation']['proxy'],
|
250 |
'placeholder' => IP_Geo_Block_Util::get_proxy_var(),
|
251 |
+
'after' => $common[0],
|
252 |
)
|
253 |
);
|
254 |
|
255 |
// Bad signatures
|
|
|
256 |
add_settings_field(
|
257 |
+
$option_name.'_signature',
|
258 |
__( '<dfn title="It validates malicious signatures independently of “Block by country” and “Prevent Zero-day Exploit” for the target “Admin area”, “Admin ajax/post”, “Plugins area” and “Themes area”.">Bad signatures in query</dfn> <nobr>(<a class="ip-geo-block-icon ip-geo-block-icon-cycle" id="ip-geo-block-decode" title="When you find ugly character string in the text area, please click to restore."><span></span></a>)</nobr>', 'ip-geo-block' ),
|
259 |
array( $context, 'callback_field' ),
|
260 |
$option_slug,
|
262 |
array(
|
263 |
'type' => 'textarea',
|
264 |
'option' => $option_name,
|
265 |
+
'field' => 'signature',
|
266 |
+
'value' => $options['signature'],
|
267 |
+
'after' => $common[1],
|
268 |
)
|
269 |
);
|
270 |
|
271 |
// Prevent malicious upload - white list of file extention and MIME type
|
272 |
+
$list = '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Select allowed MIME type.">Whitelist of allowed MIME type</dfn>', 'ip-geo-block' ) . "<a class=\"ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide\">" . $common[2] . "</a>\n<li class=\"ip-geo-block-hide\"><ul class=\"ip-geo-block-float\">\n";
|
273 |
|
274 |
// get_allowed_mime_types() in wp-includes/functions.php @since 2.8.6
|
275 |
foreach ( IP_Geo_Block_Util::get_allowed_mime_types() as $key => $val ) {
|
285 |
|
286 |
// Verify capability
|
287 |
$list .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the capabilities to be verified. Depending on the particular type of uploader, certain capability may be required. Default is “upload_files” for Administrator, Editor and Author. This verification will be skipped if empty.">Capabilities to be verified</dfn>', 'ip-geo-block' ) . ' <span class="ip-geo-block-desc">' . __( '( See “<a rel="noreferrer" href="https://codex.wordpress.org/Roles_and_Capabilities" title="Roles and Capabilities « WordPress Codex">Roles and Capabilities</a>” )', 'ip-geo-block' ) . '</span>' . "\n";
|
288 |
+
$list .= '<li class="ip-geo-block-hide"><ul><li><input type="text" id="ip_geo_block_settings_mimetype_capability" name="ip_geo_block_settings[mimetype][capability]" class="regular-text code" placeholder="upload_files" value="' . esc_attr( implode( ',', $options['mimetype']['capability'] ) ) . '" />' . $common[0] . '</li></ul></li></ul>';
|
289 |
|
290 |
// Prevent malicious file uploading
|
|
|
|
|
291 |
add_settings_field(
|
292 |
+
$option_name.'_validation_mimetype',
|
293 |
__( '<dfn title="It restricts the file types on upload in order to block malware and backdoor via both back-end and front-end. Please consider to select “mu-plugins” (ip-geo-block-mu.php) at “Validation timing” so that other staff would not fetch the uploaded files before this validation.">Prevent malicious file uploading</dfn>', 'ip-geo-block' ),
|
294 |
array( $context, 'callback_field' ),
|
295 |
$option_slug,
|
297 |
array(
|
298 |
'type' => 'select',
|
299 |
'option' => $option_name,
|
300 |
+
'field' => 'validation',
|
301 |
+
'sub-field' => 'mimetype',
|
302 |
+
'value' => $options['validation']['mimetype'],
|
303 |
'list' => array(
|
304 |
0 => __( 'Disable', 'ip-geo-block' ),
|
305 |
1 => __( 'Verify file extension and MIME type', 'ip-geo-block' ),
|
309 |
)
|
310 |
);
|
311 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
// Response code (RFC 2616)
|
|
|
313 |
add_settings_field(
|
314 |
+
$option_name.'_response_code',
|
315 |
+
sprintf( __( '<dfn title="You can put your original 403.php and so on into your theme directory.">Response code</dfn> %s', 'ip-geo-block' ), '(<a rel="noreferrer" href="https://tools.ietf.org/html/rfc2616#section-10" title="RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1">RFC 2616</a>)' ),
|
316 |
array( $context, 'callback_field' ),
|
317 |
$option_slug,
|
318 |
$section,
|
319 |
array(
|
320 |
'type' => 'select',
|
321 |
'option' => $option_name,
|
322 |
+
'field' => 'response_code',
|
323 |
+
'value' => $options['response_code'],
|
324 |
'list' => array(
|
325 |
200 => '200 OK',
|
326 |
301 => '301 Moved Permanently',
|
339 |
);
|
340 |
|
341 |
// Redirect URI
|
|
|
342 |
add_settings_field(
|
343 |
+
$option_name.'_redirect_uri',
|
344 |
__( '<dfn title="Specify the URL for response code 2xx and 3xx. If it is pointed to a public facing page, visitors would not be blocked on the page to prevent loop of redirection even when you enable [Block by country] in [Front-end target settings] section. Empty URL is altered to your home.">Redirect URL</dfn>', 'ip-geo-block' ),
|
345 |
array( $context, 'callback_field' ),
|
346 |
$option_slug,
|
348 |
array(
|
349 |
'type' => 'text',
|
350 |
'option' => $option_name,
|
351 |
+
'field' => 'redirect_uri',
|
352 |
+
'value' => $options['redirect_uri'],
|
353 |
'class' => $options['response_code'] < 400 ? '' : 'ip-geo-block-hide',
|
354 |
'placeholder' => '/about/',
|
355 |
)
|
356 |
);
|
357 |
|
358 |
// Response message
|
|
|
359 |
add_settings_field(
|
360 |
+
$option_name.'_response_msg',
|
361 |
__( '<dfn title="Specify the message for response code 4xx and 5xx.">Response message</dfn>', 'ip-geo-block' ),
|
362 |
array( $context, 'callback_field' ),
|
363 |
$option_slug,
|
365 |
array(
|
366 |
'type' => 'text',
|
367 |
'option' => $option_name,
|
368 |
+
'field' => 'response_msg',
|
369 |
+
'value' => $options['response_msg'],
|
370 |
'class' => $options['response_code'] >= 400 ? '' : 'ip-geo-block-hide',
|
371 |
)
|
372 |
);
|
373 |
|
374 |
// Validation timing
|
375 |
+
$options['validation']['timing'] = IP_Geo_Block_Opts::get_validation_timing();
|
|
|
|
|
376 |
|
377 |
add_settings_field(
|
378 |
+
$option_name.'_validation_timing',
|
379 |
'<dfn title="' . __( 'Select when to run the validation.', 'ip-geo-block' ) . '">' . __( 'Validation timing', 'ip-geo-block' ) . '</dfn>',
|
380 |
array( $context, 'callback_field' ),
|
381 |
$option_slug,
|
383 |
array(
|
384 |
'type' => 'select',
|
385 |
'option' => $option_name,
|
386 |
+
'field' => 'validation',
|
387 |
+
'sub-field' => 'timing',
|
388 |
+
'value' => $options['validation']['timing'],
|
389 |
'list' => array(
|
390 |
0 => __( '“init” action hook', 'ip-geo-block' ),
|
391 |
1 => __( '“mu-plugins” (ip-geo-block-mu.php)', 'ip-geo-block' ),
|
392 |
),
|
393 |
'desc' => array(
|
394 |
0 => __( 'Validate at “init” action hook in the same manner as typical plugins.', 'ip-geo-block' ),
|
395 |
+
1 => __( 'Validate at an earlier phase than other typical plugins. It can reduce load on server but has <a rel=\'noreferrer\' href=\'https://www.ipgeoblock.com/codex/validation-timing.html\' title=\'Validation timing | IP Geo Block\'>some restrictions</a>.', 'ip-geo-block' ),
|
396 |
),
|
397 |
)
|
398 |
);
|
402 |
*----------------------------------------*/
|
403 |
add_settings_section(
|
404 |
$section = $plugin_slug . '-validation-target',
|
405 |
+
array( __( 'Back-end target settings', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/back-end-target-settings.html" title="Back-end target settings | IP Geo Block">' . $common[4] . '</a>' ),
|
406 |
array( __CLASS__, 'note_target' ),
|
407 |
$option_slug
|
408 |
);
|
419 |
);
|
420 |
|
421 |
// Comment post
|
|
|
|
|
422 |
add_settings_field(
|
423 |
+
$option_name.'_validation_comment',
|
424 |
+
$target['comment'],
|
425 |
array( $context, 'callback_field' ),
|
426 |
$option_slug,
|
427 |
$section,
|
428 |
array(
|
429 |
'type' => 'checkbox',
|
430 |
'option' => $option_name,
|
431 |
+
'field' => 'validation',
|
432 |
+
'sub-field' => 'comment',
|
433 |
+
'value' => $options['validation']['comment'],
|
434 |
'text' => __( 'Block by country', 'ip-geo-block' ),
|
435 |
)
|
436 |
);
|
437 |
|
438 |
+
$val = $GLOBALS['allowedtags'];
|
439 |
+
unset( $val['blockquote'] );
|
440 |
+
|
441 |
+
// Message on comment form
|
442 |
+
add_settings_field(
|
443 |
+
$option_name.'_comment',
|
444 |
+
'<div class="ip-geo-block-subitem"><dfn title="' . __( 'The whole will be wrapped by <p> tag. Allowed tags: ', 'ip-geo-block' ) . implode( ', ', array_keys( $val ) ) . '">' . __( 'Message on comment form', 'ip-geo-block' ) . '</dfn></div>',
|
445 |
+
array( $context, 'callback_field' ),
|
446 |
+
$option_slug,
|
447 |
+
$section,
|
448 |
+
array(
|
449 |
+
'type' => 'select-text',
|
450 |
+
'option' => $option_name,
|
451 |
+
'field' => 'comment',
|
452 |
+
'sub-field' => 'pos',
|
453 |
+
'txt-field' => 'msg',
|
454 |
+
'value' => $options['comment']['pos'],
|
455 |
+
'class' => 'ip-geo-block-subitem-parent',
|
456 |
+
'list' => array(
|
457 |
+
0 => __( 'None', 'ip-geo-block' ),
|
458 |
+
1 => __( 'Top', 'ip-geo-block' ),
|
459 |
+
2 => __( 'Bottom', 'ip-geo-block' ),
|
460 |
+
),
|
461 |
+
'text' => $options['comment']['msg'], // escaped by esc_attr() at 'text'
|
462 |
+
)
|
463 |
+
);
|
464 |
+
|
465 |
// XML-RPC
|
|
|
466 |
add_settings_field(
|
467 |
+
$option_name.'_validation_xmlrpc',
|
468 |
+
$target['xmlrpc'],
|
469 |
array( $context, 'callback_field' ),
|
470 |
$option_slug,
|
471 |
$section,
|
472 |
array(
|
473 |
'type' => 'select',
|
474 |
'option' => $option_name,
|
475 |
+
'field' => 'validation',
|
476 |
+
'sub-field' => 'xmlrpc',
|
477 |
+
'value' => $options['validation']['xmlrpc'],
|
478 |
'list' => array(
|
479 |
0 => __( 'Disable', 'ip-geo-block' ),
|
480 |
1 => __( 'Block by country', 'ip-geo-block' ),
|
497 |
}
|
498 |
|
499 |
// Login form
|
|
|
500 |
add_settings_field(
|
501 |
+
$option_name.'_validation_login',
|
502 |
+
$target['login'],
|
503 |
array( $context, 'callback_field' ),
|
504 |
$option_slug,
|
505 |
$section,
|
506 |
array(
|
507 |
'type' => 'checkbox',
|
508 |
'option' => $option_name,
|
509 |
+
'field' => 'validation',
|
510 |
+
'sub-field' => 'login',
|
511 |
+
'value' => $options['validation']['login'],
|
512 |
'text' => __( 'Block by country', 'ip-geo-block' ),
|
513 |
+
'after' => '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual action as a blocking target.">Target actions</dfn>', 'ip-geo-block' ) . '<a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide">' . $common[2] . '</a>' . "\n<li class=\"ip-geo-block-hide\"><ul>\n" . $list . "</ul></li></ul>\n",
|
514 |
)
|
515 |
);
|
516 |
|
524 |
2 => __( 'Regardless of the country code, it will block a malicious request related to the services only for the dashboard.', 'ip-geo-block' ),
|
525 |
);
|
526 |
|
527 |
+
// Max failed login attempts per IP address
|
528 |
+
add_settings_field(
|
529 |
+
$option_name.'_login_fails',
|
530 |
+
'<div class="ip-geo-block-subitem"><dfn title="' . __( 'This is applied to “XML-RPC” and “Login form” when “IP address cache” in “Privacy and record settings” section is enabled. Lockout period is the same as expiration time of the cache.', 'ip-geo-block' ) . '">' . __( 'Max failed login attempts per IP address', 'ip-geo-block' ) . '</dfn></div>',
|
531 |
+
array( $context, 'callback_field' ),
|
532 |
+
$option_slug,
|
533 |
+
$section,
|
534 |
+
array(
|
535 |
+
'type' => 'select',
|
536 |
+
'option' => $option_name,
|
537 |
+
'field' => 'login_fails',
|
538 |
+
'value' => $options['login_fails'],
|
539 |
+
'class' => 'ip-geo-block-subitem-parent',
|
540 |
+
'list' => array(
|
541 |
+
-1 => 'Disable',
|
542 |
+
0 => 0,
|
543 |
+
1 => 1,
|
544 |
+
3 => 3,
|
545 |
+
5 => 5,
|
546 |
+
7 => 7,
|
547 |
+
10 => 10,
|
548 |
+
),
|
549 |
+
)
|
550 |
+
);
|
551 |
+
|
552 |
// Admin area
|
|
|
553 |
add_settings_field(
|
554 |
+
$option_name.'_validation_admin',
|
555 |
+
$target['admin'],
|
556 |
array( $context, 'callback_field' ),
|
557 |
$option_slug,
|
558 |
$section,
|
559 |
array(
|
560 |
'type' => 'checkboxes',
|
561 |
'option' => $option_name,
|
562 |
+
'field' => 'validation',
|
563 |
+
'sub-field' => 'admin',
|
564 |
+
'value' => $options['validation']['admin'],
|
565 |
'list' => $list,
|
566 |
'desc' => $desc,
|
567 |
)
|
586 |
. '</li>' . "\n";
|
587 |
}
|
588 |
|
|
|
|
|
589 |
// Admin ajax/post
|
590 |
+
$path = IP_Geo_Block::get_wp_path();
|
591 |
+
$val = esc_html( substr( $path['admin'], 1 ) );
|
592 |
add_settings_field(
|
593 |
+
$option_name.'_validation_ajax',
|
594 |
sprintf( $dfn, $val.'admin-(ajax|post).php', __( 'Admin ajax/post', 'ip-geo-block' ) ),
|
595 |
array( $context, 'callback_field' ),
|
596 |
$option_slug,
|
598 |
array(
|
599 |
'type' => 'checkboxes',
|
600 |
'option' => $option_name,
|
601 |
+
'field' => 'validation',
|
602 |
+
'sub-field' => 'ajax',
|
603 |
+
'value' => $options['validation']['ajax'],
|
604 |
'list' => $list,
|
605 |
'desc' => $desc,
|
606 |
'after' =>
|
607 |
'<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . "\n" .
|
608 |
' <dfn title="' . __( 'Specify the action name (“action=…”) or the page name (“page=…”) to prevent unintended blocking caused by “Block by country” (for non logged-in user) and “Prevent Zero-day Exploit” (for logged-in user).', 'ip-geo-block' ) . '">' . __( 'Exceptions', 'ip-geo-block' ) . "</dfn>\n" .
|
609 |
+
' <a class="ip-geo-block-hide ip-geo-block-icon ip-geo-block-icon-unlock"><span title="' . __( 'Toggle with non logged-in user', 'ip-geo-block' ) . '"></span></a><a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide" data-target="admin">' . $common[2] . '</a><a class="ip-geo-block-icon ip-geo-block-icon-find ip-geo-block-hide" data-target="admin">' . $common[3] . "</a>\n" .
|
610 |
' <li class="ip-geo-block-hide">' . "\n" .
|
611 |
+
' <input class="regular-text code" id="ip_geo_block_settings_exception_admin" name="ip_geo_block_settings[exception][admin]" type="text" value="' . esc_attr( implode( ',', $options['exception']['admin'] ) ) . '">' . $common[0] . "\n" .
|
612 |
' <h4>' . __( 'Candidate actions/pages', 'ip-geo-block' ) . "</h4>\n" .
|
613 |
+
' <p class="ip-geo-block-find-desc">' . $common[5] . '<span id="ip-geo-block-find-admin"></span></p>' . "\n" .
|
614 |
' </li>' . "\n" .
|
615 |
' <li class="ip-geo-block-hide">' . "\n" .
|
616 |
' <ul class="ip-geo-block-list-exceptions" id="ip-geo-block-list-admin">' . "\n" .
|
627 |
__( 'Select the item which causes unintended blocking in order to exclude from the validation target. Grayed item indicates “INACTIVE”.', 'ip-geo-block' ),
|
628 |
__( 'It configures “%s” to validate a direct request to the PHP file which does not load WordPress core. Make sure to deny direct access to the hidden files beginning with a dot by the server\'s configuration.', 'ip-geo-block' ),
|
629 |
__( 'Sorry, but your server type is not supported.', 'ip-geo-block' ),
|
630 |
+
__( 'You need to click “Save Changes” button for imported settings to take effect.', 'ip-geo-block' ),
|
631 |
);
|
632 |
|
633 |
// Set rewrite condition
|
655 |
}
|
656 |
|
657 |
// Plugins area
|
658 |
+
$val = esc_html( $path['plugins'] );
|
659 |
+
$tmp = '<input type="checkbox" id="ip_geo_block_settings_rewrite_plugins'
|
660 |
+
. '" name="ip_geo_block_settings[rewrite][plugins]" '
|
661 |
+
. ' value="1"' . checked( $options['rewrite']['plugins'], TRUE, FALSE )
|
662 |
+
. disabled( $options['rewrite']['plugins'], -1, FALSE ) . ' />'
|
663 |
+
. '<label for="ip_geo_block_settings_rewrite_plugins"><dfn title="'
|
|
|
664 |
. ( $config ? sprintf( $desc[2], $val . $config ) : $desc[3] )
|
665 |
. '">' . __( 'Force to load WP core', 'ip-geo-block' )
|
666 |
. '</dfn></label><br />';
|
667 |
|
668 |
add_settings_field(
|
669 |
+
$option_name.'_validation_plugins',
|
670 |
sprintf( $dfn, $val.'…/*.php', __( 'Plugins area', 'ip-geo-block' ) ),
|
671 |
array( $context, 'callback_field' ),
|
672 |
$option_slug,
|
674 |
array(
|
675 |
'type' => 'select',
|
676 |
'option' => $option_name,
|
677 |
+
'field' => 'validation',
|
678 |
+
'sub-field' => 'plugins',
|
679 |
+
'value' => $options['validation']['plugins'],
|
680 |
'list' => $list,
|
681 |
'desc' => array(
|
682 |
2 => sprintf( $desc[0], $val ),
|
684 |
'after' => $tmp .
|
685 |
'<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . "\n" .
|
686 |
' <dfn title="' . $desc[1] . '">' . __( 'Exceptions', 'ip-geo-block' ) . "</dfn>\n" .
|
687 |
+
' <a class="ip-geo-block-hide ip-geo-block-icon ip-geo-block-icon-cycle">' . $common[2] . '</a><a class="ip-geo-block-icon ip-geo-block-icon-find ip-geo-block-hide" data-target="plugins">' . $common[3] . "</a>\n" .
|
688 |
' <li class="ip-geo-block-hide">' . "\n" .
|
689 |
+
' <p class="ip-geo-block-find-desc">' . $common[5] . '<span id="ip-geo-block-find-plugins"></span></p>' . "\n" .
|
690 |
' </li>' . "\n" .
|
691 |
' <li class="ip-geo-block-hide">' . "\n" .
|
692 |
' <ul class="ip-geo-block-list-exceptions" id="ip-geo-block-list-plugins">' . "\n" .
|
715 |
}
|
716 |
|
717 |
// Themes area
|
718 |
+
$val = esc_html( $path['themes'] );
|
719 |
+
$tmp = '<input type="checkbox" id="ip_geo_block_settings_rewrite_themes'
|
720 |
+
. '" name="ip_geo_block_settings[rewrite][themes]" '
|
721 |
+
. ' value="1"' . checked( $options['rewrite']['themes'], TRUE, FALSE )
|
722 |
+
. disabled( $options['rewrite']['themes'], -1, FALSE ) . ' />'
|
723 |
+
. '<label for="ip_geo_block_settings_rewrite_themes"><dfn title="'
|
|
|
724 |
. ( $config ? sprintf( $desc[2], $val . $config ) : $desc[3] )
|
725 |
. '">' . __( 'Force to load WP core', 'ip-geo-block' )
|
726 |
. '</dfn></label><br />';
|
727 |
|
728 |
add_settings_field(
|
729 |
+
$option_name.'_validation_themes',
|
730 |
sprintf( $dfn, $val.'…/*.php', __( 'Themes area', 'ip-geo-block' ) ),
|
731 |
array( $context, 'callback_field' ),
|
732 |
$option_slug,
|
734 |
array(
|
735 |
'type' => 'select',
|
736 |
'option' => $option_name,
|
737 |
+
'field' => 'validation',
|
738 |
+
'sub-field' => 'themes',
|
739 |
+
'value' => $options['validation']['themes'],
|
740 |
'list' => $list,
|
741 |
'desc' => array(
|
742 |
2 => sprintf( $desc[0], $val ),
|
744 |
'after' => $tmp .
|
745 |
'<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . "\n" .
|
746 |
' <dfn title="' . $desc[1] . '">' . __( 'Exceptions', 'ip-geo-block' ) . "</dfn>\n" .
|
747 |
+
' <a class="ip-geo-block-hide ip-geo-block-icon ip-geo-block-icon-cycle">' . $common[2] . '</a><a class="ip-geo-block-icon ip-geo-block-icon-find ip-geo-block-hide" data-target="themes">' . $common[3] . "</a>\n" .
|
748 |
' <li class="ip-geo-block-hide">' . "\n" .
|
749 |
+
' <p class="ip-geo-block-find-desc">' . $common[5] . '<span id="ip-geo-block-find-themes"></span></p>' . "\n" .
|
750 |
' </li>' . "\n" .
|
751 |
' <li class="ip-geo-block-hide">' . "\n" .
|
752 |
' <ul class="ip-geo-block-list-exceptions" id="ip-geo-block-list-themes">' . "\n" .
|
762 |
*----------------------------------------*/
|
763 |
add_settings_section(
|
764 |
$section = $plugin_slug . '-public',
|
765 |
+
array( __( 'Front-end target settings', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/front-end-target-settings.html" title="Front-end target settings | IP Geo Block">' . $common[4] . '</a>' ),
|
766 |
array( __CLASS__, 'note_public' ),
|
767 |
$option_slug
|
768 |
);
|
769 |
|
770 |
// Public facing pages
|
|
|
771 |
add_settings_field(
|
772 |
+
$option_name.'_validation_public',
|
773 |
+
$target['public'],
|
774 |
array( $context, 'callback_field' ),
|
775 |
$option_slug,
|
776 |
$section,
|
777 |
array(
|
778 |
'type' => 'checkbox',
|
779 |
'option' => $option_name,
|
780 |
+
'field' => 'validation',
|
781 |
+
'sub-field' => 'public',
|
782 |
+
'value' => $options['validation']['public'],
|
783 |
'text' => __( 'Block by country', 'ip-geo-block' ),
|
784 |
)
|
785 |
);
|
786 |
|
787 |
// Matching rule
|
|
|
|
|
788 |
add_settings_field(
|
789 |
+
$option_name.'_public_matching_rule',
|
790 |
'<dfn title="' . $rule_desc[0] . '">' . __( 'Matching rule', 'ip-geo-block' ) . '</dfn>',
|
791 |
array( $context, 'callback_field' ),
|
792 |
$option_slug,
|
794 |
array(
|
795 |
'type' => 'select',
|
796 |
'option' => $option_name,
|
797 |
+
'field' => 'public',
|
798 |
+
'sub-field' => 'matching_rule',
|
799 |
+
'value' => $options['public']['matching_rule'],
|
800 |
'list' => array( -1 => __( 'Follow “Validation rule settings”', 'ip-geo-block' ) ) + $rule,
|
801 |
)
|
802 |
);
|
803 |
|
804 |
// Country code for matching rule (ISO 3166-1 alpha-2)
|
|
|
805 |
add_settings_field(
|
806 |
+
$option_name.'_public_white_list',
|
807 |
$rule_desc[1],
|
808 |
array( $context, 'callback_field' ),
|
809 |
$option_slug,
|
811 |
array(
|
812 |
'type' => 'text',
|
813 |
'option' => $option_name,
|
814 |
+
'field' => 'public',
|
815 |
+
'sub-field' => 'white_list',
|
816 |
+
'value' => $options['public']['white_list'],
|
817 |
+
'after' => $common[0],
|
818 |
+
'class' => $options['public']['matching_rule'] == 0 ? '' : 'ip-geo-block-hide',
|
819 |
)
|
820 |
);
|
821 |
|
|
|
822 |
add_settings_field(
|
823 |
+
$option_name.'_public_black_list',
|
824 |
$rule_desc[2],
|
825 |
array( $context, 'callback_field' ),
|
826 |
$option_slug,
|
828 |
array(
|
829 |
'type' => 'text',
|
830 |
'option' => $option_name,
|
831 |
+
'field' => 'public',
|
832 |
+
'sub-field' => 'black_list',
|
833 |
+
'value' => $options['public']['black_list'],
|
834 |
+
'after' => $common[0],
|
835 |
+
'class' => $options['public']['matching_rule'] == 1 ? '' : 'ip-geo-block-hide',
|
836 |
)
|
837 |
);
|
838 |
|
839 |
// Response code (RFC 2616)
|
|
|
840 |
add_settings_field(
|
841 |
+
$option_name.'_public_response_code',
|
842 |
+
sprintf( __( '<dfn title="You can configure a different response code from the Back-end. This is useful to prevent violation against your affiliate program.">Response code</dfn> %s', 'ip-geo-block' ), '(<a rel="noreferrer" href="https://tools.ietf.org/html/rfc2616#section-10" title="RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1">RFC 2616</a>)' ),
|
843 |
array( $context, 'callback_field' ),
|
844 |
$option_slug,
|
845 |
$section,
|
846 |
array(
|
847 |
'type' => 'select',
|
848 |
'option' => $option_name,
|
849 |
+
'field' => 'public',
|
850 |
+
'sub-field' => 'response_code',
|
851 |
+
'value' => $options['public']['response_code'],
|
852 |
'list' => array(
|
853 |
200 => '200 OK',
|
854 |
301 => '301 Moved Permanently',
|
863 |
500 => '500 Internal Server Error',
|
864 |
503 => '503 Service Unavailable',
|
865 |
),
|
866 |
+
'class' => $options['public']['matching_rule'] == -1 ? 'ip-geo-block-hide' :'',
|
867 |
)
|
868 |
);
|
869 |
|
870 |
// Redirect URI
|
|
|
871 |
add_settings_field(
|
872 |
+
$option_name.'_public_redirect_uri',
|
873 |
__( '<dfn title="Specify the URL for response code 2xx and 3xx. If it is pointed to a public facing page, visitors would not be blocked on the page to prevent loop of redirection even when you enable [Block by country] in [Front-end target settings] section. Empty URL is altered to your home.">Redirect URL</dfn>', 'ip-geo-block' ),
|
874 |
array( $context, 'callback_field' ),
|
875 |
$option_slug,
|
877 |
array(
|
878 |
'type' => 'text',
|
879 |
'option' => $option_name,
|
880 |
+
'field' => 'public',
|
881 |
+
'sub-field' => 'redirect_uri',
|
882 |
+
'value' => $options['public']['redirect_uri' ],
|
883 |
+
'class' => $options['public']['matching_rule'] != -1 && $options['public']['response_code'] < 400 ? '' : 'ip-geo-block-hide',
|
884 |
'placeholder' => '/about/',
|
885 |
)
|
886 |
);
|
887 |
|
888 |
// Response message
|
|
|
889 |
add_settings_field(
|
890 |
+
$option_name.'_public_response_msg',
|
891 |
__( '<dfn title="Specify the message for response code 4xx and 5xx.">Response message</dfn>', 'ip-geo-block' ),
|
892 |
array( $context, 'callback_field' ),
|
893 |
$option_slug,
|
895 |
array(
|
896 |
'type' => 'text',
|
897 |
'option' => $option_name,
|
898 |
+
'field' => 'public',
|
899 |
+
'sub-field' => 'response_msg',
|
900 |
+
'value' => $options['public']['response_msg' ],
|
901 |
+
'class' => $options['public']['matching_rule'] != -1 && $options['public']['response_code'] >= 400 ? '' : 'ip-geo-block-hide',
|
902 |
)
|
903 |
);
|
904 |
|
905 |
// List of page
|
906 |
+
$exception = '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual page as a blocking target.">Page</dfn>', 'ip-geo-block' ) . '<a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide">' . $common[2] . '</a>' . "\n<li class=\"ip-geo-block-hide\"><ul>\n";
|
907 |
$tmp = get_pages();
|
908 |
if ( ! empty( $tmp ) ) {
|
909 |
foreach ( $tmp as $key ) {
|
910 |
$val = esc_attr( $key->post_name );
|
911 |
+
$exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_pages_' . $val . '" name="ip_geo_block_settings[public][target_pages][' . $val . ']" value="1"' . checked( isset( $options['public']['target_pages'][ $val ] ), TRUE, FALSE ) . ' />';
|
912 |
$exception .= '<label for="ip_geo_block_settings_public_target_pages_' . $val . '">' . esc_html( $key->post_title ) . '</label></li>' . "\n";
|
913 |
}
|
914 |
}
|
915 |
$exception .= '</ul></li></ul>' . "\n";
|
916 |
|
917 |
// List of post type
|
918 |
+
$exception .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual post type on a single page as a blocking target.">Post type</dfn>', 'ip-geo-block' ) . '<a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide">' . $common[2] . '</a>' . "\n<li class=\"ip-geo-block-hide\"><ul>\n";
|
919 |
$tmp = get_post_types( array( 'public' => TRUE ) );
|
920 |
if ( ! empty( $tmp ) ) {
|
921 |
foreach ( $tmp as $key ) {
|
922 |
$val = esc_attr( $key );
|
923 |
+
$exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_posts_' . $val . '" name="ip_geo_block_settings[public][target_posts][' . $val . ']" value="1"' . checked( isset( $options['public']['target_posts'][ $val ] ), TRUE, FALSE ) . ' />';
|
924 |
$exception .= '<label for="ip_geo_block_settings_public_target_posts_' . $val . '">' . esc_html( $key ) . '</label></li>' . "\n";
|
925 |
}
|
926 |
}
|
927 |
$exception .= '</ul></li></ul>' . "\n";
|
928 |
|
929 |
// List of category
|
930 |
+
$exception .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual category on a single page or archive page as a blocking target.">Category</dfn>', 'ip-geo-block' ) . '<a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide">' . $common[2] . '</a>' . "\n<li class=\"ip-geo-block-hide\"><ul>\n";
|
931 |
$tmp = get_categories( array( 'hide_empty' => FALSE ) );
|
932 |
if ( ! empty( $tmp ) ) {
|
933 |
foreach ( $tmp as $key ) {
|
934 |
$val = esc_attr( $key->slug );
|
935 |
+
$exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_cates_' . $val . '" name="ip_geo_block_settings[public][target_cates][' . $val . ']" value="1"' . checked( isset( $options['public']['target_cates'][ $val ] ), TRUE, FALSE ) . ' />';
|
936 |
$exception .= '<label for="ip_geo_block_settings_public_target_cates_' . $val . '">' . esc_html( $key->name ) . '</label></li>' . "\n";
|
937 |
}
|
938 |
}
|
939 |
$exception .= '</ul></li></ul>' . "\n";
|
940 |
|
941 |
// List of tag
|
942 |
+
$exception .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual tag on a single page or archive page as a blocking target.">Tag</dfn>', 'ip-geo-block' ) . '<a class="ip-geo-block-icon ip-geo-block-icon-cycle ip-geo-block-hide">' . $common[2] . '</a>' . "\n<li class=\"ip-geo-block-hide\"><ul>\n";
|
943 |
$tmp = get_tags( array( 'hide_empty' => FALSE ) );
|
944 |
if ( ! empty( $tmp ) ) {
|
945 |
foreach ( $tmp as $key ) {
|
946 |
$val = esc_attr( $key->slug );
|
947 |
+
$exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_tags_' . $val . '" name="ip_geo_block_settings[public][target_tags][' . $val . ']" value="1"' . checked( isset( $options['public']['target_tags'][ $val ] ), TRUE, FALSE ) . ' />';
|
948 |
$exception .= '<label for="ip_geo_block_settings_public_target_tags_' . $val . '">' . esc_html( $key->name ) . '</label></li>' . "\n";
|
949 |
}
|
950 |
}
|
951 |
$exception .= '</ul></li></ul>' . "\n";
|
952 |
|
953 |
// Validation target
|
|
|
954 |
add_settings_field(
|
955 |
+
$option_name.'_public_target_rule',
|
956 |
'<dfn title="' . __( 'Specify the validation target on front-end.', 'ip-geo-block' ) . '">' . __( 'Validation target', 'ip-geo-block' ) . '</dfn>',
|
957 |
array( $context, 'callback_field' ),
|
958 |
$option_slug,
|
960 |
array(
|
961 |
'type' => 'select',
|
962 |
'option' => $option_name,
|
963 |
+
'field' => 'public',
|
964 |
+
'sub-field' => 'target_rule',
|
965 |
+
'value' => $options['public']['target_rule'],
|
966 |
'list' => array(
|
967 |
0 => __( 'All requests', 'ip-geo-block' ),
|
968 |
1 => __( 'Specify the targets', 'ip-geo-block' ),
|
974 |
)
|
975 |
);
|
976 |
|
977 |
+
if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
978 |
+
// Excluded action
|
979 |
+
add_settings_field(
|
980 |
+
$option_name.'_exception_public',
|
981 |
+
'<dfn title="' . __( 'Specify the name of actions as exception that is invariably blocked.', 'ip-geo-block' ) . '">' . __( 'Excluded actions', 'ip-geo-block' ) . '</dfn>',
|
982 |
+
array( $context, 'callback_field' ),
|
983 |
+
$option_slug,
|
984 |
+
$section,
|
985 |
+
array(
|
986 |
+
'type' => 'text',
|
987 |
+
'option' => $option_name,
|
988 |
+
'field' => 'exception',
|
989 |
+
'sub-field' => 'public',
|
990 |
+
'value' => implode( ',', $options['exception']['public'] ),
|
991 |
+
'after' => $common[0],
|
992 |
+
)
|
993 |
+
);
|
994 |
+
endif;
|
995 |
+
|
996 |
// Badly-behaved bots and crawlers
|
997 |
$exception = '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the frequency of request for certain period of time.">Blocking condition</dfn>', 'ip-geo-block' ) . "\n<li class=\"ip-geo-block-hide\"><ul>\n<li>";
|
998 |
$exception .= sprintf(
|
999 |
__( 'More than %1$s page view (PV) in %2$s seconds', 'ip-geo-block' ),
|
1000 |
+
'<input type="number" id="ip_geo_block_settings_behavior_view" name="ip_geo_block_settings[behavior][view]" class="regular-text code" value="' . (int)$options['behavior']['view'] . '" placeholder="7" min="1" max="99" maxlength="3" />',
|
1001 |
+
'<input type="number" id="ip_geo_block_settings_behavior_time" name="ip_geo_block_settings[behavior][time]" class="regular-text code" value="' . (int)$options['behavior']['time'] . '" placeholder="5" min="1" max="99" maxlength="3" /> '
|
1002 |
);
|
1003 |
$exception .= "</li>\n</ul></li></ul>\n";
|
1004 |
|
|
|
1005 |
add_settings_field(
|
1006 |
+
$option_name.'_public_behavior',
|
1007 |
__( '<dfn title="It will validate the frequency of request.">Block badly-behaved bots and crawlers</dfn>', 'ip-geo-block' ),
|
1008 |
array( $context, 'callback_field' ),
|
1009 |
$option_slug,
|
1011 |
array(
|
1012 |
'type' => 'checkbox',
|
1013 |
'option' => $option_name,
|
1014 |
+
'field' => 'public',
|
1015 |
+
'sub-field' => 'behavior',
|
1016 |
+
'value' => $options['public']['behavior'],
|
1017 |
'after' => $exception,
|
1018 |
)
|
1019 |
);
|
1020 |
|
1021 |
// UA string and qualification
|
|
|
1022 |
add_settings_field(
|
1023 |
+
$option_name.'_public_ua_list',
|
1024 |
'<dfn title="' . __( 'A part of user agent string and a qualification connected with a separator that indicates an applicable rule and can be “:” (pass) or “#” (block). A “qualification” can be “DNS”, “FEED”, country code or IP address with CIDR. A negative operator “!” can be placed just before a “qualification”.', 'ip-geo-block' ) . '">' . __( 'UA string and qualification', 'ip-geo-block' ) . '</dfn>',
|
1025 |
array( $context, 'callback_field' ),
|
1026 |
$option_slug,
|
1028 |
array(
|
1029 |
'type' => 'textarea',
|
1030 |
'option' => $option_name,
|
1031 |
+
'field' => 'public',
|
1032 |
+
'sub-field' => 'ua_list',
|
1033 |
+
'value' => $options['public']['ua_list'],
|
1034 |
+
'after' => $common[1],
|
1035 |
)
|
1036 |
);
|
1037 |
|
1038 |
+
// Reverse DNS lookup
|
|
|
|
|
1039 |
add_settings_field(
|
1040 |
+
$option_name.'_public_dnslkup',
|
1041 |
+
'<div class="ip-geo-block-subitem"><dfn title="' . __( 'It enables to verify the host by reverse DNS lookup which would spend some server resources. If it is disabled, “HOST” and “HOST=…”in “UA string and qualification” will always return “true”.', 'ip-geo-block' ) . '">' . __( 'Reverse DNS lookup', 'ip-geo-block' ) . '</dfn></div>',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1042 |
array( $context, 'callback_field' ),
|
1043 |
$option_slug,
|
1044 |
$section,
|
1045 |
array(
|
1046 |
'type' => 'checkbox',
|
1047 |
'option' => $option_name,
|
1048 |
+
'field' => 'public',
|
1049 |
+
'sub-field' => 'dnslkup',
|
1050 |
+
'value' => $options['public']['dnslkup'],
|
1051 |
+
'class' => 'ip-geo-block-subitem-parent',
|
1052 |
)
|
1053 |
);
|
1054 |
|
1055 |
// Simulation mode
|
|
|
1056 |
add_settings_field(
|
1057 |
+
$option_name.'_public_simulate',
|
1058 |
'<dfn title="' . __( 'It enables to simulate validation without deployment. The results can be found as “public” in Logs.', 'ip-geo-block' ) . '">' . __( 'Simulation mode', 'ip-geo-block' ) . '</dfn>',
|
1059 |
array( $context, 'callback_field' ),
|
1060 |
$option_slug,
|
1062 |
array(
|
1063 |
'type' => 'checkbox',
|
1064 |
'option' => $option_name,
|
1065 |
+
'field' => 'public',
|
1066 |
+
'sub-field' => 'simulate',
|
1067 |
+
'value' => $options['public']['simulate'],
|
1068 |
)
|
1069 |
);
|
1070 |
|
1073 |
*----------------------------------------*/
|
1074 |
add_settings_section(
|
1075 |
$section = $plugin_slug . '-recording',
|
1076 |
+
array( __( 'Privacy and record settings', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/privacy-and-record-settings.html" title="Privacy and record settings | IP Geo Block">' . $common[4] . '</a>' ),
|
1077 |
array( __CLASS__, 'note_privacy' ),
|
1078 |
$option_slug
|
1079 |
);
|
1080 |
|
1081 |
// Anonymize IP address
|
|
|
1082 |
add_settings_field(
|
1083 |
+
$option_name.'_anonymize',
|
1084 |
__( '<dfn title="IP address is always encrypted on recording in Cache and Logs. Moreover, this option replaces the end of IP address with “***” to make it anonymous.">Anonymize IP address</dfn>', 'ip-geo-block' ),
|
1085 |
array( $context, 'callback_field' ),
|
1086 |
$option_slug,
|
1088 |
array(
|
1089 |
'type' => 'checkbox',
|
1090 |
'option' => $option_name,
|
1091 |
+
'field' => 'anonymize',
|
1092 |
+
'value' => ! empty( $options['anonymize'] ),
|
1093 |
)
|
1094 |
);
|
1095 |
|
1096 |
// Do not send IP address to external APIs
|
|
|
1097 |
add_settings_field(
|
1098 |
+
$option_name.'_restrict_api',
|
1099 |
__( '<dfn title="This option restricts not to send IP address to the external Geolocation APIs.">Do not send IP address to external APIs</dfn>', 'ip-geo-block' ),
|
1100 |
array( $context, 'callback_field' ),
|
1101 |
$option_slug,
|
1103 |
array(
|
1104 |
'type' => 'checkbox',
|
1105 |
'option' => $option_name,
|
1106 |
+
'field' => 'restrict_api',
|
1107 |
+
'value' => ! empty( $options['restrict_api'] ),
|
1108 |
)
|
1109 |
);
|
1110 |
|
1111 |
+
// Record Statistics of validation
|
|
|
1112 |
add_settings_field(
|
1113 |
+
$option_name.'_save_statistics',
|
1114 |
+
__( '<dfn title="This option enables to record the number blocked countries and the number of blocked requests per day.">Record “Statistics of validation”</dfn>', 'ip-geo-block' ),
|
1115 |
array( $context, 'callback_field' ),
|
1116 |
$option_slug,
|
1117 |
$section,
|
1118 |
array(
|
1119 |
'type' => 'checkbox',
|
1120 |
'option' => $option_name,
|
1121 |
+
'field' => 'save_statistics',
|
1122 |
+
'value' => $options['save_statistics'],
|
1123 |
)
|
1124 |
);
|
1125 |
|
1126 |
if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
|
|
|
|
1127 |
add_settings_field(
|
1128 |
+
$option_name.'_validation_recdays',
|
1129 |
'<div class="ip-geo-block-subitem">' . __( 'Maximum period for “Statistics” [days]', 'ip-geo-block' ) . '</div>',
|
1130 |
array( $context, 'callback_field' ),
|
1131 |
$option_slug,
|
1133 |
array(
|
1134 |
'type' => 'text',
|
1135 |
'option' => $option_name,
|
1136 |
+
'field' => 'validation',
|
1137 |
+
'sub-field' => 'recdays',
|
1138 |
+
'value' => $options['validation']['recdays'],
|
1139 |
+
'class' => 'ip-geo-block-subitem-parent',
|
1140 |
)
|
1141 |
);
|
1142 |
endif;
|
1143 |
|
1144 |
+
// Record IP address cache
|
|
|
1145 |
add_settings_field(
|
1146 |
+
$option_name.'_cache_hold',
|
1147 |
+
__( '<dfn title="This option enables to record the IP address, country code and failure counter of login attempts into the cache on database to minimize the impact on site speed.">Record “IP address cache”</dfn>', 'ip-geo-block' ),
|
1148 |
array( $context, 'callback_field' ),
|
1149 |
$option_slug,
|
1150 |
$section,
|
1151 |
array(
|
1152 |
'type' => 'checkbox',
|
1153 |
'option' => $option_name,
|
1154 |
+
'field' => 'cache_hold',
|
1155 |
+
'value' => $options['cache_hold'],
|
1156 |
)
|
1157 |
);
|
1158 |
|
1159 |
// Expiration time [sec] for each entry
|
|
|
1160 |
add_settings_field(
|
1161 |
+
$option_name.'_cache_time',
|
1162 |
'<div class="ip-geo-block-subitem">' . __( '<dfn title="If user authentication fails consecutively beyond “Max number of failed login attempts per IP address”, subsequent login will also be prohibited for this period.">Expiration time [sec] for each entry</dfn>', 'ip-geo-block' ) . '</div>',
|
1163 |
array( $context, 'callback_field' ),
|
1164 |
$option_slug,
|
1166 |
array(
|
1167 |
'type' => 'text',
|
1168 |
'option' => $option_name,
|
1169 |
+
'field' => 'cache_time',
|
1170 |
+
'value' => $options['cache_time'],
|
1171 |
+
'class' => 'ip-geo-block-subitem-parent',
|
1172 |
)
|
1173 |
);
|
1174 |
|
1175 |
+
// Record Validation logs
|
|
|
1176 |
add_settings_field(
|
1177 |
+
$option_name.'_validation_reclogs',
|
1178 |
+
__( '<dfn title="This option enables to record the validation logs including IP addresses.">Record “Validation logs”</dfn>', 'ip-geo-block' ),
|
1179 |
array( $context, 'callback_field' ),
|
1180 |
$option_slug,
|
1181 |
$section,
|
1182 |
array(
|
1183 |
'type' => 'select',
|
1184 |
'option' => $option_name,
|
1185 |
+
'field' => 'validation',
|
1186 |
'sub-field' => 'reclogs',
|
1187 |
+
'value' => $options['validation']['reclogs'],
|
1188 |
'list' => array(
|
1189 |
0 => __( 'Disable', 'ip-geo-block' ),
|
1190 |
1 => __( 'When blocked', 'ip-geo-block' ),
|
1198 |
);
|
1199 |
|
1200 |
// Expiration time [days] for each entry
|
|
|
1201 |
add_settings_field(
|
1202 |
+
$option_name.'_validation_explogs',
|
1203 |
+
'<div class="ip-geo-block-subitem">' . sprintf( __( '<dfn title="The maximum number of entries in the logs is also limited to %d.">Expiration time [days] for each entry</dfn>', 'ip-geo-block' ), $options['validation']['maxlogs'] ) . '</div>',
|
1204 |
array( $context, 'callback_field' ),
|
1205 |
$option_slug,
|
1206 |
$section,
|
1207 |
array(
|
1208 |
'type' => 'text',
|
1209 |
'option' => $option_name,
|
1210 |
+
'field' => 'validation',
|
1211 |
+
'sub-field' => 'explogs',
|
1212 |
+
'value' => $options['validation']['explogs'],
|
1213 |
+
'class' => 'ip-geo-block-subitem-parent',
|
1214 |
)
|
1215 |
);
|
1216 |
|
1217 |
// $_POST key to record with value
|
1218 |
add_settings_field(
|
1219 |
+
$option_name.'_validation_postkey',
|
1220 |
'<div class="ip-geo-block-subitem">' . __( '<dfn title="e.g. action, comment, log, pwd, FILES">$_POST key to record with value</dfn>', 'ip-geo-block' ) . '</div>',
|
1221 |
array( $context, 'callback_field' ),
|
1222 |
$option_slug,
|
1224 |
array(
|
1225 |
'type' => 'text',
|
1226 |
'option' => $option_name,
|
1227 |
+
'field' => 'validation',
|
1228 |
'sub-field' => 'postkey',
|
1229 |
+
'value' => $options['validation']['postkey'],
|
1230 |
+
'after' => $common[0],
|
1231 |
+
'class' => 'ip-geo-block-subitem-parent',
|
1232 |
)
|
1233 |
);
|
1234 |
|
1235 |
if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
1236 |
+
// Maximum entries in Logs
|
|
|
1237 |
add_settings_field(
|
1238 |
+
$option_name.'_validation_maxlogs',
|
1239 |
+
'<div class="ip-geo-block-subitem">' . __( 'Maximum entries in “Logs”', 'ip-geo-block' ) . '</div>',
|
1240 |
array( $context, 'callback_field' ),
|
1241 |
$option_slug,
|
1242 |
$section,
|
1243 |
array(
|
1244 |
'type' => 'text',
|
1245 |
'option' => $option_name,
|
1246 |
+
'field' => 'validation',
|
1247 |
+
'sub-field' => 'maxlogs',
|
1248 |
+
'value' => $options['validation']['maxlogs'],
|
1249 |
+
'class' => 'ip-geo-block-subitem-parent',
|
1250 |
)
|
1251 |
);
|
1252 |
|
1253 |
// Live update
|
|
|
1254 |
add_settings_field(
|
1255 |
+
$option_name.'_live_update',
|
1256 |
'<div class="ip-geo-block-subitem">' . __( '<dfn title="Select SQLite database source.">Database source of SQLite for “Live update”</dfn>', 'ip-geo-block' ) . '</div>',
|
1257 |
array( $context, 'callback_field' ),
|
1258 |
$option_slug,
|
1260 |
array(
|
1261 |
'type' => 'select',
|
1262 |
'option' => $option_name,
|
1263 |
+
'field' => 'live_update',
|
1264 |
'sub-field' => 'in_memory',
|
1265 |
+
'value' => extension_loaded( 'pdo_sqlite' ) ? $options['live_update']['in_memory'] : -1,
|
1266 |
+
'class' => 'ip-geo-block-subitem-parent',
|
1267 |
'list' => array(
|
1268 |
-1 => NULL,
|
1269 |
0 => __( 'Ordinary file', 'ip-geo-block' ),
|
1278 |
);
|
1279 |
|
1280 |
// Reset data source of live log
|
|
|
1281 |
add_settings_field(
|
1282 |
+
$option_name.'_reset_live',
|
1283 |
'<div class="ip-geo-block-subitem">' . __( 'Reset database source of “Live update”', 'ip-geo-block' ) . '</div>',
|
1284 |
array( $context, 'callback_field' ),
|
1285 |
$option_slug,
|
1287 |
array(
|
1288 |
'type' => 'button',
|
1289 |
'option' => $option_name,
|
1290 |
+
'field' => 'reset_live',
|
1291 |
'value' => __( 'Reset now', 'ip-geo-block' ),
|
1292 |
'after' => '<div id="ip-geo-block-reset-live"></div>',
|
1293 |
+
'class' => 'ip-geo-block-subitem-parent',
|
1294 |
)
|
1295 |
);
|
1296 |
endif;
|
1300 |
$tmp = $tmp ? IP_Geo_Block_Util::localdate( $tmp ) : '<span class="ip-geo-block-warn">' . __( 'Task could not be found in WP-Cron. Please try to deactivate this plugin once and activate again.', 'ip-geo-block' ). '</span>';
|
1301 |
|
1302 |
// Interval [sec] to cleanup expired entries of IP address
|
|
|
1303 |
add_settings_field(
|
1304 |
+
$option_name.'_cache_time_gc',
|
1305 |
+
__( '<dfn title="This option enables to schedule the WP-Cron event to remove the expired entries in “IP address cache” and “Logs”.">Interval [sec] to cleanup expired entries of IP address</dfn>', 'ip-geo-block' ),
|
1306 |
array( $context, 'callback_field' ),
|
1307 |
$option_slug,
|
1308 |
$section,
|
1309 |
array(
|
1310 |
'type' => 'text',
|
1311 |
'option' => $option_name,
|
1312 |
+
'field' => 'cache_time_gc',
|
1313 |
+
'value' => $options['cache_time_gc'],
|
1314 |
'after' => '<p class="ip-geo-block-desc">' . sprintf( __( 'Next schedule: %s', 'ip-geo-block'), $tmp ) . '</p>',
|
1315 |
)
|
1316 |
);
|
1317 |
|
1318 |
// Remove all settings and records at uninstallation
|
|
|
1319 |
add_settings_field(
|
1320 |
+
$option_name.'_clean_uninstall',
|
1321 |
__( 'Remove all settings and records at uninstallation', 'ip-geo-block' ),
|
1322 |
array( $context, 'callback_field' ),
|
1323 |
$option_slug,
|
1325 |
array(
|
1326 |
'type' => 'checkbox',
|
1327 |
'option' => $option_name,
|
1328 |
+
'field' => 'clean_uninstall',
|
1329 |
+
'value' => $options['clean_uninstall'],
|
1330 |
)
|
1331 |
);
|
1332 |
|
1335 |
*----------------------------------------*/
|
1336 |
add_settings_section(
|
1337 |
$section = $plugin_slug . '-provider',
|
1338 |
+
array( __( 'Geolocation API settings', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/geolocation-api-settings.html" title="Geolocation API settings | IP Geo Block">' . $common[4] . '</a>' ),
|
1339 |
array( __CLASS__, 'note_services' ),
|
1340 |
$option_slug
|
1341 |
);
|
1342 |
|
1343 |
// Local DBs and APIs
|
1344 |
$provider = IP_Geo_Block_Provider::get_providers( 'key' ); // all available providers
|
1345 |
+
$providers = IP_Geo_Block_Provider::get_addons( $options['providers'], TRUE ); // only local
|
1346 |
|
1347 |
// Disable 3rd parties API
|
1348 |
if ( ! empty( $options['restrict_api'] ) ) {
|
1353 |
}
|
1354 |
|
1355 |
// API selection and key settings
|
|
|
1356 |
add_settings_field(
|
1357 |
+
$option_name.'_providers',
|
1358 |
+
__( '<dfn title="IP address cache and local databases are scanned at the top priority.">API selection and key settings</dfn>', 'ip-geo-block' ),
|
1359 |
array( $context, 'callback_field' ),
|
1360 |
$option_slug,
|
1361 |
$section,
|
1362 |
array(
|
1363 |
'type' => 'check-provider',
|
1364 |
'option' => $option_name,
|
1365 |
+
'field' => 'providers',
|
1366 |
+
'value' => $options['providers'],
|
1367 |
'local' => $providers,
|
1368 |
'providers' => $provider,
|
1369 |
'titles' => IP_Geo_Block_Provider::get_providers( 'type' ),
|
1372 |
|
1373 |
if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
1374 |
// Timeout for network API
|
|
|
1375 |
add_settings_field(
|
1376 |
+
$option_name.'_timeout',
|
1377 |
__( 'Timeout for network API [sec]', 'ip-geo-block' ),
|
1378 |
array( $context, 'callback_field' ),
|
1379 |
$option_slug,
|
1381 |
array(
|
1382 |
'type' => 'text',
|
1383 |
'option' => $option_name,
|
1384 |
+
'field' => 'timeout',
|
1385 |
+
'value' => $options['timeout'],
|
1386 |
)
|
1387 |
);
|
1388 |
endif;
|
1390 |
/*----------------------------------------*
|
1391 |
* Local database settings
|
1392 |
*----------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1393 |
add_settings_section(
|
1394 |
$section = $plugin_slug . '-database',
|
1395 |
+
array( __( 'Local database settings', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/geolocation-api-library.html" title="Geolocation API library | IP Geo Block">' . $common[4] . '</a>' ),
|
1396 |
array( __CLASS__, 'note_database' ),
|
1397 |
$option_slug
|
1398 |
);
|
1427 |
$tmp = $tmp ? IP_Geo_Block_Util::localdate( $tmp ) : '<span class="ip-geo-block-warn">' . __( 'Task could not be found in WP-Cron. Please try to deactivate this plugin once and activate again.', 'ip-geo-block' ). '</span>';
|
1428 |
|
1429 |
// Auto updating (once a month)
|
|
|
1430 |
add_settings_field(
|
1431 |
+
$option_name.'_update_auto',
|
1432 |
__( 'Auto updating (once a month)', 'ip-geo-block' ),
|
1433 |
array( $context, 'callback_field' ),
|
1434 |
$option_slug,
|
1436 |
array(
|
1437 |
'type' => 'checkbox',
|
1438 |
'option' => $option_name,
|
1439 |
+
'field' => 'update',
|
1440 |
'sub-field' => 'auto',
|
1441 |
+
'value' => $options['update']['auto'],
|
1442 |
'disabled' => empty( $providers ),
|
1443 |
+
'after' => $options['update']['auto'] ? '<p class="ip-geo-block-desc">' . sprintf( __( 'Next schedule: %s', 'ip-geo-block'), $tmp ) . '</p>' : '',
|
1444 |
)
|
1445 |
);
|
1446 |
|
1447 |
// Download database
|
1448 |
add_settings_field(
|
1449 |
+
$option_name.'_update_download',
|
1450 |
__( 'Download database', 'ip-geo-block' ),
|
1451 |
array( $context, 'callback_field' ),
|
1452 |
$option_slug,
|
1454 |
array(
|
1455 |
'type' => 'button',
|
1456 |
'option' => $option_name,
|
1457 |
+
'field' => 'update',
|
1458 |
'value' => __( 'Download now', 'ip-geo-block' ),
|
1459 |
'disabled' => empty( $providers ),
|
1460 |
'after' => '<div id="ip-geo-block-download"></div>',
|
1461 |
)
|
1462 |
);
|
1463 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1464 |
/*----------------------------------------*
|
1465 |
* Plugin settings
|
1466 |
*----------------------------------------*/
|
1467 |
add_settings_section(
|
1468 |
$section = $plugin_slug . '-others',
|
1469 |
+
array( __( 'Plugin settings', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/plugin-settings.html" title="Plugin settings | IP Geo Block">' . $common[4] . '</a>' ),
|
1470 |
NULL,
|
1471 |
$option_slug
|
1472 |
);
|
1476 |
add_action( 'network_admin_edit_' . IP_Geo_Block::PLUGIN_NAME, array( $context, 'validate_network_settings' ) );
|
1477 |
|
1478 |
// Network wide configuration
|
|
|
1479 |
add_settings_field(
|
1480 |
+
$option_name.'_network_wide',
|
1481 |
__( '<dfn title="Synchronize all settings over the network wide.">Network wide settings</dfn>', 'ip-geo-block' ),
|
1482 |
array( $context, 'callback_field' ),
|
1483 |
$option_slug,
|
1485 |
array(
|
1486 |
'type' => 'checkbox',
|
1487 |
'option' => $option_name,
|
1488 |
+
'field' => 'network_wide',
|
1489 |
+
'value' => $options['network_wide'],
|
1490 |
'disabled' => ! current_user_can( 'manage_network_options' ),
|
1491 |
)
|
1492 |
);
|
1493 |
}
|
1494 |
endif;
|
1495 |
+
// Emergency login link
|
1496 |
+
$key = IP_Geo_Block_Util::get_link();
|
1497 |
+
add_settings_field(
|
1498 |
+
$option_name.'_login_link',
|
1499 |
+
__( '<dfn title="You can access to the login form with a specific key at emergency. Please add the generated link to favorites / bookmarks in your browser as this plugin does not keep the key itself.">Emergency login link</dfn>', 'ip-geo-block' ),
|
1500 |
+
array( $context, 'callback_field' ),
|
1501 |
+
$option_slug,
|
1502 |
+
$section,
|
1503 |
+
array(
|
1504 |
+
'type' => 'none',
|
1505 |
+
'before' => empty( $key ) ?
|
1506 |
+
'<a class="button-secondary ip-geo-block-primary" id="ip-geo-block-login-link" href="#!">'. __( 'Generate new link', 'ip-geo-block' ) . '</a> ' :
|
1507 |
+
'<a class="button-secondary' .'" id="ip-geo-block-login-link" href="#!">'. __( 'Delete current link', 'ip-geo-block' ) . '</a> ',
|
1508 |
+
'after' => '<div id="ip-geo-block-login-loading"></div>',
|
1509 |
+
)
|
1510 |
+
);
|
1511 |
+
|
1512 |
// Google Maps API key
|
1513 |
+
add_settings_field(
|
1514 |
+
$option_name.'_api_key',
|
1515 |
+
__( '<dfn title="Valid key for Google Maps JavaScript API. A free tier has limit even if it\'s “default”. Maps Embed API without key can be available in case of empty.">Google Maps API key</dfn>', 'ip-geo-block' ),
|
1516 |
+
array( $context, 'callback_field' ),
|
1517 |
+
$option_slug,
|
1518 |
+
$section,
|
1519 |
+
array(
|
1520 |
+
'type' => 'text',
|
1521 |
+
'option' => $option_name,
|
1522 |
+
'field' => 'api_key',
|
1523 |
+
'sub-field' => 'GoogleMap',
|
1524 |
+
'value' => $options['api_key']['GoogleMap'],
|
1525 |
+
)
|
1526 |
+
);
|
|
|
|
|
|
|
|
|
1527 |
|
1528 |
// Export / Import settings
|
|
|
1529 |
add_settings_field(
|
1530 |
+
$option_name.'_export-import',
|
1531 |
sprintf( '<dfn title="%s">' . __( 'Export / Import settings', 'ip-geo-block' ) . '</dfn>', $desc[4] ),
|
1532 |
array( $context, 'callback_field' ),
|
1533 |
$option_slug,
|
1535 |
array(
|
1536 |
'type' => 'none',
|
1537 |
'before' =>
|
1538 |
+
'<a class="button-secondary" id="ip-geo-block-export" title="' . __( 'Export to the local file', 'ip-geo-block' ) . '" href="#!">'. __( 'Export settings', 'ip-geo-block' ) . '</a> ' .
|
1539 |
+
'<a class="button-secondary" id="ip-geo-block-import" title="' . __( 'Import from the local file', 'ip-geo-block' ) . '" href="#!">'. __( 'Import settings', 'ip-geo-block' ) . '</a>',
|
1540 |
'after' => '<div id="ip-geo-block-export-import"></div>',
|
1541 |
)
|
1542 |
);
|
1543 |
|
1544 |
// Pre-defined settings
|
|
|
1545 |
add_settings_field(
|
1546 |
+
$option_name.'_pre-defined',
|
1547 |
sprintf( '<dfn title="%s">' . __( 'Import pre-defined settings', 'ip-geo-block' ) . '</dfn>', $desc[4] ),
|
1548 |
array( $context, 'callback_field' ),
|
1549 |
$option_slug,
|
1551 |
array(
|
1552 |
'type' => 'none',
|
1553 |
'before' =>
|
1554 |
+
'<a class="button-secondary"' .' id="ip-geo-block-default" title="' . __( 'Import the default settings to revert to the “Right after installing” state', 'ip-geo-block' ) . '" href="#!">' . __( 'Default settings', 'ip-geo-block' ) . '</a> ' .
|
1555 |
+
'<a class="button-secondary ip-geo-block-primary" id="ip-geo-block-preferred" title="' . __( 'Import the preferred settings mainly by enabling Zero-day Exploit Prevention for the “Back-end target settings”', 'ip-geo-block' ) . '" href="#!">' . __( 'Best for Back-end', 'ip-geo-block' ) . '</a>',
|
1556 |
'after' => '<div id="ip-geo-block-pre-defined"></div>',
|
1557 |
)
|
1558 |
);
|
1559 |
|
1560 |
if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
|
1561 |
+
// DB tables for this plugin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1562 |
add_settings_field(
|
1563 |
+
$option_name.'_init_table',
|
1564 |
+
__( 'DB tables for this plugin', 'ip-geo-block' ),
|
1565 |
array( $context, 'callback_field' ),
|
1566 |
$option_slug,
|
1567 |
$section,
|
1568 |
array(
|
1569 |
'type' => 'button',
|
1570 |
'option' => $option_name,
|
1571 |
+
'field' => 'init_table',
|
1572 |
+
'value' => __( 'Initialize now', 'ip-geo-block' ),
|
1573 |
+
'after' => '<div id="ip-geo-block-init-table"></div>',
|
1574 |
)
|
1575 |
);
|
1576 |
endif;
|
1577 |
|
1578 |
// Diagnostic information
|
|
|
1579 |
add_settings_field(
|
1580 |
+
$option_name.'_show-info',
|
1581 |
+
__( '<dfn title="When you have some unexpected blocking experiences, please press the button to find the blocked requests at the end of dumped information which may help you to solve the issues.">Diagnostic information</dfn><br />[ <a rel="noreferrer" href="https://wordpress.org/support/plugin/ip-geo-block" title="[IP Geo Block] Support | WordPress.org">support forum</a> ]', 'ip-geo-block' ),
|
1582 |
array( $context, 'callback_field' ),
|
1583 |
$option_slug,
|
1584 |
$section,
|
1585 |
array(
|
1586 |
'type' => 'none',
|
1587 |
'before' =>
|
1588 |
+
'<a class="button-secondary" id="ip-geo-block-show-info" title="' . __( 'Please copy & paste when submitting your issue to support forum', 'ip-geo-block' ) . '" href="#!">' . __( 'Show information', 'ip-geo-block' ) . '</a> ',
|
1589 |
'after' => '<div id="ip-geo-block-wp-info"></div>',
|
1590 |
)
|
1591 |
);
|
1595 |
/**
|
1596 |
* Subsidiary note for the sections
|
1597 |
*
|
|
|
|
|
1598 |
*/
|
1599 |
public static function note_target() {
|
|
|
|
|
|
|
|
|
|
|
1600 |
}
|
1601 |
|
1602 |
public static function note_services() {
|
1618 |
}
|
1619 |
|
1620 |
public static function note_public() {
|
|
|
|
|
|
|
|
|
|
|
1621 |
}
|
1622 |
|
1623 |
public static function note_privacy() {
|
|
|
|
|
|
|
|
|
1624 |
}
|
1625 |
|
1626 |
}
|
admin/includes/tab-statistics.php
CHANGED
@@ -27,9 +27,8 @@ class IP_Geo_Block_Admin_Tab {
|
|
27 |
if ( $options['save_statistics'] ) :
|
28 |
|
29 |
// Number of blocked access
|
30 |
-
$field = 'blocked';
|
31 |
add_settings_field(
|
32 |
-
$option_name.'
|
33 |
__( 'Blocked', 'ip-geo-block' ),
|
34 |
array( $context, 'callback_field' ),
|
35 |
$option_slug,
|
@@ -37,8 +36,8 @@ if ( $options['save_statistics'] ) :
|
|
37 |
array(
|
38 |
'type' => 'html',
|
39 |
'option' => $option_name,
|
40 |
-
'field' =>
|
41 |
-
'value' => (int)$statistics[
|
42 |
)
|
43 |
);
|
44 |
|
@@ -52,9 +51,8 @@ if ( $options['save_statistics'] ) :
|
|
52 |
|
53 |
$html = '<div id="' . $plugin_slug . '-chart-countries" data-' . $plugin_slug . '-chart-countries=\'' . json_encode( $count ) . '\'></div>';
|
54 |
|
55 |
-
$field = 'countries';
|
56 |
add_settings_field(
|
57 |
-
$option_name.'
|
58 |
__( 'Blocked by countries', 'ip-geo-block' ),
|
59 |
array( $context, 'callback_field' ),
|
60 |
$option_slug,
|
@@ -62,7 +60,7 @@ if ( $options['save_statistics'] ) :
|
|
62 |
array(
|
63 |
'type' => 'html',
|
64 |
'option' => $option_name,
|
65 |
-
'field' =>
|
66 |
'value' => $html,
|
67 |
)
|
68 |
);
|
@@ -93,9 +91,8 @@ if ( $options['save_statistics'] ) :
|
|
93 |
// embed array into data attribute as json
|
94 |
$html = '<div id="' . $plugin_slug . '-chart-daily" data-' . $plugin_slug . '-chart-daily=\'' . json_encode( $count ) . '\'></div>';
|
95 |
|
96 |
-
$field = 'daily';
|
97 |
add_settings_field(
|
98 |
-
$option_name.'
|
99 |
__( 'Blocked per day', 'ip-geo-block' ),
|
100 |
array( $context, 'callback_field' ),
|
101 |
$option_slug,
|
@@ -103,15 +100,14 @@ if ( $options['save_statistics'] ) :
|
|
103 |
array(
|
104 |
'type' => 'html',
|
105 |
'option' => $option_name,
|
106 |
-
'field' =>
|
107 |
'value' => $html,
|
108 |
)
|
109 |
);
|
110 |
|
111 |
// Blocked by type of IP address
|
112 |
-
$field = 'type';
|
113 |
add_settings_field(
|
114 |
-
$option_name.'
|
115 |
__( 'Blocked by type of IP address', 'ip-geo-block' ),
|
116 |
array( $context, 'callback_field' ),
|
117 |
$option_slug,
|
@@ -119,7 +115,7 @@ if ( $options['save_statistics'] ) :
|
|
119 |
array(
|
120 |
'type' => 'html',
|
121 |
'option' => $option_name,
|
122 |
-
'field' =>
|
123 |
'value' => '<table class="'.$option_slug.'-statistics-table">' .
|
124 |
'<thead><tr><th>IPv4</th><th>IPv6</th></tr></thead><tbody><tr>' .
|
125 |
'<td>' . esc_html( $statistics['IPv4'] ) . '</td>' .
|
@@ -128,7 +124,6 @@ if ( $options['save_statistics'] ) :
|
|
128 |
)
|
129 |
);
|
130 |
|
131 |
-
$field = 'service';
|
132 |
$html = '<table class="'.$option_slug.'-statistics-table"><thead><tr>';
|
133 |
$html .= '<th>' . __( 'Name of API', 'ip-geo-block' ) . '</th>';
|
134 |
$html .= '<th>' . __( 'Call', 'ip-geo-block' ) . '</th>';
|
@@ -145,7 +140,7 @@ if ( $options['save_statistics'] ) :
|
|
145 |
|
146 |
// Average response time of each API
|
147 |
add_settings_field(
|
148 |
-
$option_name.'
|
149 |
__( 'Average response time of each API', 'ip-geo-block' ),
|
150 |
array( $context, 'callback_field' ),
|
151 |
$option_slug,
|
@@ -153,15 +148,14 @@ if ( $options['save_statistics'] ) :
|
|
153 |
array(
|
154 |
'type' => 'html',
|
155 |
'option' => $option_name,
|
156 |
-
'field' =>
|
157 |
'value' => $html,
|
158 |
)
|
159 |
);
|
160 |
|
161 |
// Clear statistics
|
162 |
-
$field = 'clear_statistics';
|
163 |
add_settings_field(
|
164 |
-
$option_name.'
|
165 |
__( 'Clear statistics', 'ip-geo-block' ),
|
166 |
array( $context, 'callback_field' ),
|
167 |
$option_slug,
|
@@ -169,7 +163,7 @@ if ( $options['save_statistics'] ) :
|
|
169 |
array(
|
170 |
'type' => 'button',
|
171 |
'option' => $option_name,
|
172 |
-
'field' =>
|
173 |
'value' => __( 'Clear all', 'ip-geo-block' ),
|
174 |
'after' => '<div id="'.$plugin_slug.'-statistics"></div>',
|
175 |
)
|
@@ -178,11 +172,11 @@ if ( $options['save_statistics'] ) :
|
|
178 |
endif;
|
179 |
|
180 |
/*----------------------------------------*
|
181 |
-
* Statistics in logs
|
182 |
*----------------------------------------*/
|
183 |
add_settings_section(
|
184 |
$section = $plugin_slug . '-stat-logs',
|
185 |
-
__( 'Statistics in
|
186 |
( $options['validation']['reclogs'] ?
|
187 |
array( __CLASS__, 'statistics_logs' ) :
|
188 |
array( __CLASS__, 'warn_validation' )
|
@@ -192,9 +186,8 @@ endif;
|
|
192 |
|
193 |
if ( $options['validation']['reclogs'] ) :
|
194 |
|
195 |
-
$field = 'clear_logs';
|
196 |
add_settings_field(
|
197 |
-
$option_name.'
|
198 |
__( 'Clear logs', 'ip-geo-block' ),
|
199 |
array( $context, 'callback_field' ),
|
200 |
$option_slug,
|
@@ -202,7 +195,7 @@ if ( $options['validation']['reclogs'] ) :
|
|
202 |
array(
|
203 |
'type' => 'button',
|
204 |
'option' => $option_name,
|
205 |
-
'field' =>
|
206 |
'value' => __( 'Clear all', 'ip-geo-block' ),
|
207 |
)
|
208 |
);
|
@@ -210,11 +203,11 @@ if ( $options['validation']['reclogs'] ) :
|
|
210 |
endif;
|
211 |
|
212 |
/*----------------------------------------*
|
213 |
-
* Statistics in IP address
|
214 |
*----------------------------------------*/
|
215 |
add_settings_section(
|
216 |
$section = $plugin_slug . '-cache',
|
217 |
-
__( 'Statistics in IP address
|
218 |
( $options['cache_hold'] ?
|
219 |
array( __CLASS__, 'statistics_cache' ) :
|
220 |
array( __CLASS__, 'warn_ipadr_cache' )
|
@@ -224,9 +217,8 @@ endif;
|
|
224 |
|
225 |
if ( $options['cache_hold'] ) :
|
226 |
|
227 |
-
$field = 'search_filter';
|
228 |
add_settings_field(
|
229 |
-
$option_name.'
|
230 |
__( 'Search in cache', 'ip-geo-block' ),
|
231 |
array( $context, 'callback_field' ),
|
232 |
$option_slug,
|
@@ -234,16 +226,15 @@ if ( $options['cache_hold'] ) :
|
|
234 |
array(
|
235 |
'type' => 'text',
|
236 |
'option' => $option_name,
|
237 |
-
'field' =>
|
238 |
'value' => '',
|
239 |
'after' => '<a class="button button-secondary" id="ip-geo-block-reset-filter" title="'
|
240 |
. __( 'Reset', 'ip-geo-block' ) . '" href="#!">'. __( 'Reset', 'ip-geo-block' ) . '</a>',
|
241 |
)
|
242 |
);
|
243 |
|
244 |
-
$field = 'bulk_action';
|
245 |
add_settings_field(
|
246 |
-
$option_name.'
|
247 |
__( 'Bulk action', 'ip-geo-block' ),
|
248 |
array( $context, 'callback_field' ),
|
249 |
$option_slug,
|
@@ -251,7 +242,7 @@ if ( $options['cache_hold'] ) :
|
|
251 |
array(
|
252 |
'type' => 'select',
|
253 |
'option' => $option_name,
|
254 |
-
'field' =>
|
255 |
'value' => 0,
|
256 |
'list' => array(
|
257 |
0 => NULL,
|
@@ -265,9 +256,8 @@ if ( $options['cache_hold'] ) :
|
|
265 |
)
|
266 |
);
|
267 |
|
268 |
-
$field = 'clear_all';
|
269 |
add_settings_field(
|
270 |
-
$option_name.'
|
271 |
__( 'Clear cache', 'ip-geo-block' ),
|
272 |
array( $context, 'callback_field' ),
|
273 |
$option_slug,
|
@@ -275,16 +265,15 @@ if ( $options['cache_hold'] ) :
|
|
275 |
array(
|
276 |
'type' => 'button',
|
277 |
'option' => $option_name,
|
278 |
-
'field' =>
|
279 |
'value' => __( 'Clear all', 'ip-geo-block' ),
|
280 |
'after' => '<div id="'.$plugin_slug.'-cache"></div>',
|
281 |
)
|
282 |
);
|
283 |
|
284 |
// Export cache
|
285 |
-
$field = 'export_cache';
|
286 |
add_settings_field(
|
287 |
-
$option_name.'
|
288 |
__( 'Export cache', 'ip-geo-block' ),
|
289 |
array( $context, 'callback_field' ),
|
290 |
$option_slug,
|
@@ -400,7 +389,7 @@ endif;
|
|
400 |
}
|
401 |
|
402 |
/**
|
403 |
-
* Render IP address
|
404 |
*
|
405 |
*/
|
406 |
public static function statistics_cache() {
|
@@ -414,21 +403,21 @@ endif;
|
|
414 |
public static function warn_statistics() {
|
415 |
$context = IP_Geo_Block_Admin::get_instance();
|
416 |
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
|
417 |
-
echo '<p>', sprintf( __( '[ %sRecord “Statistics”%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
|
418 |
echo '<p>', __( 'Please set the proper condition to record and analyze the validation statistics.', 'ip-geo-block' ), '</p>', "\n";
|
419 |
}
|
420 |
|
421 |
public static function warn_validation() {
|
422 |
$context = IP_Geo_Block_Admin::get_instance();
|
423 |
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
|
424 |
-
echo '<p>', sprintf( __( '[ %sRecord “
|
425 |
echo '<p>', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
|
426 |
}
|
427 |
|
428 |
public static function warn_ipadr_cache() {
|
429 |
$context = IP_Geo_Block_Admin::get_instance();
|
430 |
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
|
431 |
-
echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord “IP address
|
432 |
echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record IP address in cache.', 'ip-geo-block' ), '</p>', "\n";
|
433 |
}
|
434 |
|
27 |
if ( $options['save_statistics'] ) :
|
28 |
|
29 |
// Number of blocked access
|
|
|
30 |
add_settings_field(
|
31 |
+
$option_name.'_blocked',
|
32 |
__( 'Blocked', 'ip-geo-block' ),
|
33 |
array( $context, 'callback_field' ),
|
34 |
$option_slug,
|
36 |
array(
|
37 |
'type' => 'html',
|
38 |
'option' => $option_name,
|
39 |
+
'field' => 'blocked',
|
40 |
+
'value' => (int)$statistics['blocked'],
|
41 |
)
|
42 |
);
|
43 |
|
51 |
|
52 |
$html = '<div id="' . $plugin_slug . '-chart-countries" data-' . $plugin_slug . '-chart-countries=\'' . json_encode( $count ) . '\'></div>';
|
53 |
|
|
|
54 |
add_settings_field(
|
55 |
+
$option_name.'_countries',
|
56 |
__( 'Blocked by countries', 'ip-geo-block' ),
|
57 |
array( $context, 'callback_field' ),
|
58 |
$option_slug,
|
60 |
array(
|
61 |
'type' => 'html',
|
62 |
'option' => $option_name,
|
63 |
+
'field' => 'countries',
|
64 |
'value' => $html,
|
65 |
)
|
66 |
);
|
91 |
// embed array into data attribute as json
|
92 |
$html = '<div id="' . $plugin_slug . '-chart-daily" data-' . $plugin_slug . '-chart-daily=\'' . json_encode( $count ) . '\'></div>';
|
93 |
|
|
|
94 |
add_settings_field(
|
95 |
+
$option_name.'_daily',
|
96 |
__( 'Blocked per day', 'ip-geo-block' ),
|
97 |
array( $context, 'callback_field' ),
|
98 |
$option_slug,
|
100 |
array(
|
101 |
'type' => 'html',
|
102 |
'option' => $option_name,
|
103 |
+
'field' => 'daily',
|
104 |
'value' => $html,
|
105 |
)
|
106 |
);
|
107 |
|
108 |
// Blocked by type of IP address
|
|
|
109 |
add_settings_field(
|
110 |
+
$option_name.'_type',
|
111 |
__( 'Blocked by type of IP address', 'ip-geo-block' ),
|
112 |
array( $context, 'callback_field' ),
|
113 |
$option_slug,
|
115 |
array(
|
116 |
'type' => 'html',
|
117 |
'option' => $option_name,
|
118 |
+
'field' => 'type',
|
119 |
'value' => '<table class="'.$option_slug.'-statistics-table">' .
|
120 |
'<thead><tr><th>IPv4</th><th>IPv6</th></tr></thead><tbody><tr>' .
|
121 |
'<td>' . esc_html( $statistics['IPv4'] ) . '</td>' .
|
124 |
)
|
125 |
);
|
126 |
|
|
|
127 |
$html = '<table class="'.$option_slug.'-statistics-table"><thead><tr>';
|
128 |
$html .= '<th>' . __( 'Name of API', 'ip-geo-block' ) . '</th>';
|
129 |
$html .= '<th>' . __( 'Call', 'ip-geo-block' ) . '</th>';
|
140 |
|
141 |
// Average response time of each API
|
142 |
add_settings_field(
|
143 |
+
$option_name.'_service',
|
144 |
__( 'Average response time of each API', 'ip-geo-block' ),
|
145 |
array( $context, 'callback_field' ),
|
146 |
$option_slug,
|
148 |
array(
|
149 |
'type' => 'html',
|
150 |
'option' => $option_name,
|
151 |
+
'field' => 'service',
|
152 |
'value' => $html,
|
153 |
)
|
154 |
);
|
155 |
|
156 |
// Clear statistics
|
|
|
157 |
add_settings_field(
|
158 |
+
$option_name.'_clear_statistics',
|
159 |
__( 'Clear statistics', 'ip-geo-block' ),
|
160 |
array( $context, 'callback_field' ),
|
161 |
$option_slug,
|
163 |
array(
|
164 |
'type' => 'button',
|
165 |
'option' => $option_name,
|
166 |
+
'field' => 'clear_statistics',
|
167 |
'value' => __( 'Clear all', 'ip-geo-block' ),
|
168 |
'after' => '<div id="'.$plugin_slug.'-statistics"></div>',
|
169 |
)
|
172 |
endif;
|
173 |
|
174 |
/*----------------------------------------*
|
175 |
+
* Statistics in Validation logs
|
176 |
*----------------------------------------*/
|
177 |
add_settings_section(
|
178 |
$section = $plugin_slug . '-stat-logs',
|
179 |
+
__( 'Statistics in validation logs', 'ip-geo-block' ),
|
180 |
( $options['validation']['reclogs'] ?
|
181 |
array( __CLASS__, 'statistics_logs' ) :
|
182 |
array( __CLASS__, 'warn_validation' )
|
186 |
|
187 |
if ( $options['validation']['reclogs'] ) :
|
188 |
|
|
|
189 |
add_settings_field(
|
190 |
+
$option_name.'_clear_logs',
|
191 |
__( 'Clear logs', 'ip-geo-block' ),
|
192 |
array( $context, 'callback_field' ),
|
193 |
$option_slug,
|
195 |
array(
|
196 |
'type' => 'button',
|
197 |
'option' => $option_name,
|
198 |
+
'field' => 'clear_logs',
|
199 |
'value' => __( 'Clear all', 'ip-geo-block' ),
|
200 |
)
|
201 |
);
|
203 |
endif;
|
204 |
|
205 |
/*----------------------------------------*
|
206 |
+
* Statistics in IP address cache
|
207 |
*----------------------------------------*/
|
208 |
add_settings_section(
|
209 |
$section = $plugin_slug . '-cache',
|
210 |
+
__( 'Statistics in IP address cache', 'ip-geo-block' ),
|
211 |
( $options['cache_hold'] ?
|
212 |
array( __CLASS__, 'statistics_cache' ) :
|
213 |
array( __CLASS__, 'warn_ipadr_cache' )
|
217 |
|
218 |
if ( $options['cache_hold'] ) :
|
219 |
|
|
|
220 |
add_settings_field(
|
221 |
+
$option_name.'_search_filter',
|
222 |
__( 'Search in cache', 'ip-geo-block' ),
|
223 |
array( $context, 'callback_field' ),
|
224 |
$option_slug,
|
226 |
array(
|
227 |
'type' => 'text',
|
228 |
'option' => $option_name,
|
229 |
+
'field' => 'search_filter',
|
230 |
'value' => '',
|
231 |
'after' => '<a class="button button-secondary" id="ip-geo-block-reset-filter" title="'
|
232 |
. __( 'Reset', 'ip-geo-block' ) . '" href="#!">'. __( 'Reset', 'ip-geo-block' ) . '</a>',
|
233 |
)
|
234 |
);
|
235 |
|
|
|
236 |
add_settings_field(
|
237 |
+
$option_name.'_bulk_action',
|
238 |
__( 'Bulk action', 'ip-geo-block' ),
|
239 |
array( $context, 'callback_field' ),
|
240 |
$option_slug,
|
242 |
array(
|
243 |
'type' => 'select',
|
244 |
'option' => $option_name,
|
245 |
+
'field' => 'bulk_action',
|
246 |
'value' => 0,
|
247 |
'list' => array(
|
248 |
0 => NULL,
|
256 |
)
|
257 |
);
|
258 |
|
|
|
259 |
add_settings_field(
|
260 |
+
$option_name.'_clear_all',
|
261 |
__( 'Clear cache', 'ip-geo-block' ),
|
262 |
array( $context, 'callback_field' ),
|
263 |
$option_slug,
|
265 |
array(
|
266 |
'type' => 'button',
|
267 |
'option' => $option_name,
|
268 |
+
'field' => 'clear_all',
|
269 |
'value' => __( 'Clear all', 'ip-geo-block' ),
|
270 |
'after' => '<div id="'.$plugin_slug.'-cache"></div>',
|
271 |
)
|
272 |
);
|
273 |
|
274 |
// Export cache
|
|
|
275 |
add_settings_field(
|
276 |
+
$option_name.'_export_cache',
|
277 |
__( 'Export cache', 'ip-geo-block' ),
|
278 |
array( $context, 'callback_field' ),
|
279 |
$option_slug,
|
389 |
}
|
390 |
|
391 |
/**
|
392 |
+
* Render IP address cache
|
393 |
*
|
394 |
*/
|
395 |
public static function statistics_cache() {
|
403 |
public static function warn_statistics() {
|
404 |
$context = IP_Geo_Block_Admin::get_instance();
|
405 |
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
|
406 |
+
echo '<p>', sprintf( __( '[ %sRecord “Statistics of validation”%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
|
407 |
echo '<p>', __( 'Please set the proper condition to record and analyze the validation statistics.', 'ip-geo-block' ), '</p>', "\n";
|
408 |
}
|
409 |
|
410 |
public static function warn_validation() {
|
411 |
$context = IP_Geo_Block_Admin::get_instance();
|
412 |
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
|
413 |
+
echo '<p>', sprintf( __( '[ %sRecord “Validation logs”%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
|
414 |
echo '<p>', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
|
415 |
}
|
416 |
|
417 |
public static function warn_ipadr_cache() {
|
418 |
$context = IP_Geo_Block_Admin::get_instance();
|
419 |
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
|
420 |
+
echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord “IP address cache”%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
|
421 |
echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record IP address in cache.', 'ip-geo-block' ), '</p>', "\n";
|
422 |
}
|
423 |
|
admin/js/admin.js
CHANGED
@@ -6,8 +6,6 @@
|
|
6 |
* This software is released under the MIT License.
|
7 |
*/
|
8 |
(function ($, window, document) {
|
9 |
-
'use strict';
|
10 |
-
|
11 |
// External variables
|
12 |
var skip_error = false,
|
13 |
timer_stack = [],
|
@@ -28,7 +26,7 @@
|
|
28 |
}
|
29 |
|
30 |
function escapeHTML(str) {
|
31 |
-
return str.toString().replace(/[&<>"']/g, function (match) {
|
32 |
return {
|
33 |
'&': '&',
|
34 |
'<': '<',
|
@@ -79,11 +77,11 @@
|
|
79 |
}
|
80 |
|
81 |
function warning(status, msg, cmd) {
|
82 |
-
window.alert(stripTag(msg || ip_geo_block.msg[
|
83 |
}
|
84 |
|
85 |
function notice_html5() {
|
86 |
-
warning(null, stripTag(ip_geo_block.msg[
|
87 |
}
|
88 |
|
89 |
function redirect(page, tab) {
|
@@ -175,8 +173,9 @@
|
|
175 |
|
176 |
// Show/Hide descendant elements
|
177 |
function show_descendants($this, $elem, mask) {
|
178 |
-
var
|
179 |
-
|
|
|
180 |
|
181 |
// checkbox
|
182 |
$this.siblings('input[name^="' + ID('%', 'settings') + '"]:checkbox').prop('disabled', !stat);
|
@@ -365,7 +364,7 @@
|
|
365 |
|
366 |
for(i = 0; i < n; ++i) {
|
367 |
j = i * size;
|
368 |
-
r.push(arr.slice(j, j + size));
|
369 |
}
|
370 |
|
371 |
return r;
|
@@ -596,7 +595,7 @@
|
|
596 |
if (5 === tabNo) {
|
597 |
packages.push('bar');
|
598 |
}
|
599 |
-
window.google.load('
|
600 |
packages: packages,
|
601 |
callback: function () {
|
602 |
drawChart(tabNo);
|
@@ -614,7 +613,7 @@
|
|
614 |
|
615 |
for (i in cookie) {
|
616 |
if(cookie.hasOwnProperty(i)) {
|
617 |
-
cookie[i] = cookie[i].replace(/[^ox\d]/
|
618 |
}
|
619 |
}
|
620 |
|
@@ -634,9 +633,9 @@
|
|
634 |
if ('undefined' !== typeof obj) {
|
635 |
n = obj.length;
|
636 |
if (n) {
|
637 |
-
c[i] = (obj[0] || 'o');
|
638 |
for (j = 1; j < n; ++j) {
|
639 |
-
c[i] += (obj[j] || 'o');
|
640 |
}
|
641 |
}
|
642 |
}
|
@@ -676,11 +675,7 @@
|
|
676 |
var cookie = loadCookie(tabNo);
|
677 |
|
678 |
// Click event handler to show/hide form-table
|
679 |
-
$(
|
680 |
-
window.open(this.href, null);
|
681 |
-
return false;
|
682 |
-
})
|
683 |
-
.on('click', 'h2,h3', function (/*event*/) {
|
684 |
toggleSection($(this), tabNo, cookie);
|
685 |
return false;
|
686 |
});
|
@@ -747,23 +742,20 @@
|
|
747 |
/*--------------------------------------------------
|
748 |
* DataTables for tab 1 (Statistics) and 4 (Logs)
|
749 |
*--------------------------------------------------*/
|
750 |
-
function initTable(tabNo, control, options) {
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
|
755 |
-
|
756 |
-
|
|
|
757 |
|
758 |
// Client behavior
|
|
|
759 |
autoWidth: false,
|
760 |
processing: true,
|
761 |
deferRender: true,
|
762 |
-
deferLoading: 10,
|
763 |
-
|
764 |
-
// Interface
|
765 |
-
info: false,
|
766 |
-
lengthChange: false,
|
767 |
|
768 |
// Language
|
769 |
language: {
|
@@ -771,6 +763,7 @@
|
|
771 |
loadingRecords: ip_geo_block.i18n[0],
|
772 |
processing: ip_geo_block.i18n[0],
|
773 |
zeroRecords: ip_geo_block.i18n[2],
|
|
|
774 |
paginate: {
|
775 |
first: '«',
|
776 |
last: '»',
|
@@ -798,9 +791,10 @@
|
|
798 |
}
|
799 |
],
|
800 |
|
801 |
-
// Pagenation
|
802 |
pagingType: 'full_numbers', // or 'simple_numbers'
|
803 |
-
|
|
|
804 |
|
805 |
// scroller
|
806 |
scroller: true,
|
@@ -878,12 +872,12 @@
|
|
878 |
texp = /(<([^>]+)>)/ig, // regular expression to strip tag
|
879 |
hexp = /data-hash=[\W]([\w]+)[\W]/i, // regular expression to extract hash
|
880 |
data = { IP: [], AS: [] }, // IP address and AS number
|
881 |
-
hash, cell, cells =
|
882 |
|
883 |
if (!cmd) {
|
884 |
return false;
|
885 |
} else if (!cells.length) {
|
886 |
-
warning(null, ip_geo_block.msg[
|
887 |
return false;
|
888 |
}
|
889 |
|
@@ -935,7 +929,7 @@
|
|
935 |
|
936 |
// Clear all
|
937 |
$(ID('@', 'clear_all')).off('click').on('click', function (/*event*/) {
|
938 |
-
confirm(ip_geo_block.msg[
|
939 |
ajax_clear(tabNo === 1 ? 'cache' : 'logs', null);
|
940 |
});
|
941 |
return false;
|
@@ -967,6 +961,12 @@
|
|
967 |
return false;
|
968 |
});
|
969 |
|
|
|
|
|
|
|
|
|
|
|
|
|
970 |
return table;
|
971 |
}
|
972 |
|
@@ -1031,7 +1031,7 @@
|
|
1031 |
parent.show('slow');
|
1032 |
});
|
1033 |
|
1034 |
-
return false;
|
1035 |
});
|
1036 |
|
1037 |
// Matching rule
|
@@ -1064,7 +1064,7 @@
|
|
1064 |
// Show/Hide folding list at prevent malicious upload
|
1065 |
$(ID('@', 'validation_mimetype')).on('change', function (event) {
|
1066 |
var $this = $(this),
|
1067 |
-
stat =
|
1068 |
$this.nextAll(ID('.', 'settings-folding')).each(function (i, obj) {
|
1069 |
fold_elements($(obj), (stat === i + 1) || (stat && 2 === i));
|
1070 |
});
|
@@ -1079,7 +1079,7 @@
|
|
1079 |
|
1080 |
// only for Front-end target settings
|
1081 |
if (0 <= $this.attr('name').indexOf('public')) {
|
1082 |
-
if (-1 ===
|
1083 |
elm.each(function (index) {
|
1084 |
if (1 >= index) {
|
1085 |
$(this).hide();
|
@@ -1153,10 +1153,10 @@
|
|
1153 |
j.appendChild(i);
|
1154 |
|
1155 |
if (1 & data[key]) {
|
1156 |
-
j.appendChild(add_icon(dfn, span, ip_geo_block.msg[
|
1157 |
}
|
1158 |
if (2 & data[key]) {
|
1159 |
-
j.appendChild(add_icon(dfn, span, ip_geo_block.msg[
|
1160 |
}
|
1161 |
|
1162 |
$this.append(j);
|
@@ -1213,7 +1213,7 @@
|
|
1213 |
$(ID('.', 'icon-find')).on('click', function (/*event*/) {
|
1214 |
var $this = $(this),
|
1215 |
list = [], n = 0, key, ext, id, s,
|
1216 |
-
title = stripTag(ip_geo_block.msg[
|
1217 |
target = stripTag($this.data('target')); // `admin`, `plugins`, `themes`
|
1218 |
|
1219 |
// show description
|
@@ -1266,7 +1266,7 @@
|
|
1266 |
// update status of checkbox
|
1267 |
$(ID('@', 'exception_' + target)).trigger('change');
|
1268 |
$(ID('#', 'find-' + target)).append(
|
1269 |
-
' ' + '<span class="ip-geo-block-warn">' + stripTag(ip_geo_block.msg[
|
1270 |
);
|
1271 |
});
|
1272 |
|
@@ -1455,17 +1455,39 @@
|
|
1455 |
return false;
|
1456 |
});
|
1457 |
|
1458 |
-
//
|
1459 |
-
$(ID('
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1463 |
return false;
|
1464 |
});
|
1465 |
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
|
|
1469 |
});
|
1470 |
return false;
|
1471 |
});
|
@@ -1571,7 +1593,7 @@
|
|
1571 |
});
|
1572 |
} else {
|
1573 |
$li.sort(function (a, b) {
|
1574 |
-
return
|
1575 |
});
|
1576 |
}
|
1577 |
|
@@ -1581,7 +1603,7 @@
|
|
1581 |
|
1582 |
// Statistics of validation
|
1583 |
$(ID('@', 'clear_statistics')).on('click', function (/*event*/) {
|
1584 |
-
confirm(ip_geo_block.msg[
|
1585 |
ajax_clear('statistics', null);
|
1586 |
});
|
1587 |
return false;
|
@@ -1589,7 +1611,7 @@
|
|
1589 |
|
1590 |
// Statistics in logs
|
1591 |
$(ID('@', 'clear_logs')).on('click', function (/*event*/) {
|
1592 |
-
confirm(ip_geo_block.msg[
|
1593 |
ajax_clear('logs', null);
|
1594 |
});
|
1595 |
return false;
|
@@ -1625,7 +1647,7 @@
|
|
1625 |
{ responsivePriority: 5, targets: 7 }, // Elapsed[sec]
|
1626 |
{ className: "all", targets: [0, 1, 2, 5] } // always visible
|
1627 |
]
|
1628 |
-
});
|
1629 |
|
1630 |
// Export cache
|
1631 |
add_hidden_form('export-cache');
|
@@ -1809,10 +1831,18 @@
|
|
1809 |
|
1810 |
// Re-initialize DataTables
|
1811 |
$(ID('#', 'live-log-stop')).trigger('click');
|
1812 |
-
table = initTable(tabNo, control, options);
|
1813 |
return false;
|
1814 |
}).trigger('change');
|
1815 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1816 |
// Export logs
|
1817 |
add_hidden_form('export-logs');
|
1818 |
|
@@ -1850,24 +1880,50 @@
|
|
1850 |
}
|
1851 |
|
1852 |
// Set selected provider to cookie
|
|
|
1853 |
$('select[id^="' + ID('!', 'service') + '"]').on('change', function (/*event*/) {
|
1854 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1855 |
saveCookie(cookie);
|
1856 |
}).change();
|
1857 |
|
1858 |
// Search Geolocation
|
1859 |
$(ID('@', 'get_location')).on('click', function (/*event*/) {
|
1860 |
-
var whois = $(ID('#', 'whois')),
|
|
|
|
|
1861 |
ip = $.trim($(ID('@', 'ip_address')).val());
|
1862 |
|
1863 |
-
if (ip) {
|
1864 |
// Anonymize IP address
|
1865 |
if ($(ID('@', 'anonymize')).prop('checked')) {
|
1866 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1867 |
$(ID('@', 'ip_address')).val(ip);
|
1868 |
}
|
1869 |
|
1870 |
whois.hide().empty();
|
|
|
1871 |
|
1872 |
// Get whois data
|
1873 |
obj = $.whois(ip, function (data) {
|
@@ -1887,64 +1943,88 @@
|
|
1887 |
'</fieldset>'
|
1888 |
).fadeIn('slow');
|
1889 |
|
1890 |
-
|
1891 |
-
|
1892 |
-
$
|
1893 |
-
|
1894 |
-
return false;
|
1895 |
-
});
|
1896 |
});
|
1897 |
|
1898 |
// Show map
|
1899 |
ajax_post('loading', {
|
1900 |
cmd: 'search',
|
1901 |
ip: ip,
|
1902 |
-
which:
|
1903 |
}, function (data) {
|
1904 |
-
var key,
|
1905 |
-
|
1906 |
-
longitude = stripTag(data.longitude || '0'),
|
1907 |
-
zoom = (data.latitude || data.longitude) ? 8 : 2;
|
1908 |
|
1909 |
for (key in data) {
|
1910 |
if (data.hasOwnProperty(key)) {
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
'<span class="' + ID('title' ) + '">' + key + ' : </span>' +
|
1915 |
-
'<span class="' + ID('result') + '">' + stripTag(data[key]) + '</span>' +
|
1916 |
-
'</li>';
|
1917 |
}
|
1918 |
}
|
1919 |
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1948 |
}, [obj]);
|
1949 |
}
|
1950 |
|
6 |
* This software is released under the MIT License.
|
7 |
*/
|
8 |
(function ($, window, document) {
|
|
|
|
|
9 |
// External variables
|
10 |
var skip_error = false,
|
11 |
timer_stack = [],
|
26 |
}
|
27 |
|
28 |
function escapeHTML(str) {
|
29 |
+
return str.toString().replace(/[&<>"']/g, function (match) { //'"
|
30 |
return {
|
31 |
'&': '&',
|
32 |
'<': '<',
|
77 |
}
|
78 |
|
79 |
function warning(status, msg, cmd) {
|
80 |
+
window.alert(stripTag(msg || ip_geo_block.msg[11].replace('%s', cmd) + ' (' + status + ')'));
|
81 |
}
|
82 |
|
83 |
function notice_html5() {
|
84 |
+
warning(null, stripTag(ip_geo_block.msg[9]));
|
85 |
}
|
86 |
|
87 |
function redirect(page, tab) {
|
173 |
|
174 |
// Show/Hide descendant elements
|
175 |
function show_descendants($this, $elem, mask) {
|
176 |
+
var prop = $this.prop('type') || '',
|
177 |
+
stat = (0 === prop.indexOf('checkbox') && $this.is(':checked')) ||
|
178 |
+
(0 === prop.indexOf('select' ) && '0' !== $this.val());
|
179 |
|
180 |
// checkbox
|
181 |
$this.siblings('input[name^="' + ID('%', 'settings') + '"]:checkbox').prop('disabled', !stat);
|
364 |
|
365 |
for(i = 0; i < n; ++i) {
|
366 |
j = i * size;
|
367 |
+
r.push(arr.slice(j, j + size)); // IE >= 9
|
368 |
}
|
369 |
|
370 |
return r;
|
595 |
if (5 === tabNo) {
|
596 |
packages.push('bar');
|
597 |
}
|
598 |
+
window.google.charts.load('current', {
|
599 |
packages: packages,
|
600 |
callback: function () {
|
601 |
drawChart(tabNo);
|
613 |
|
614 |
for (i in cookie) {
|
615 |
if(cookie.hasOwnProperty(i)) {
|
616 |
+
cookie[i] = cookie[i].replace(/[^ox\d]/ig, '').split(''); // string (ooo...) to array (n)
|
617 |
}
|
618 |
}
|
619 |
|
633 |
if ('undefined' !== typeof obj) {
|
634 |
n = obj.length;
|
635 |
if (n) {
|
636 |
+
c[i] = (obj[0] || 'o').toString();
|
637 |
for (j = 1; j < n; ++j) {
|
638 |
+
c[i] += (obj[j] || 'o').toString();
|
639 |
}
|
640 |
}
|
641 |
}
|
675 |
var cookie = loadCookie(tabNo);
|
676 |
|
677 |
// Click event handler to show/hide form-table
|
678 |
+
$(document).on('click', 'form>h2,h3', function (/*event*/) {
|
|
|
|
|
|
|
|
|
679 |
toggleSection($(this), tabNo, cookie);
|
680 |
return false;
|
681 |
});
|
742 |
/*--------------------------------------------------
|
743 |
* DataTables for tab 1 (Statistics) and 4 (Logs)
|
744 |
*--------------------------------------------------*/
|
745 |
+
function initTable(tabNo, control, options, cookie) {
|
746 |
+
// get page length from cookie
|
747 |
+
var length = (Number(cookie[tabNo][1 === tabNo ? 3 : 2]) || 0);
|
748 |
+
length = [10, 25, 50, 100][length];
|
749 |
|
750 |
+
$.extend(true, $.fn.dataTable.defaults, options, {
|
751 |
+
// DOM position (t:table, l:length menu, p:pagenate)
|
752 |
+
dom: 'tlp',
|
753 |
|
754 |
// Client behavior
|
755 |
+
serverSide: false,
|
756 |
autoWidth: false,
|
757 |
processing: true,
|
758 |
deferRender: true,
|
|
|
|
|
|
|
|
|
|
|
759 |
|
760 |
// Language
|
761 |
language: {
|
763 |
loadingRecords: ip_geo_block.i18n[0],
|
764 |
processing: ip_geo_block.i18n[0],
|
765 |
zeroRecords: ip_geo_block.i18n[2],
|
766 |
+
lengthMenu: '_MENU_',
|
767 |
paginate: {
|
768 |
first: '«',
|
769 |
last: '»',
|
791 |
}
|
792 |
],
|
793 |
|
794 |
+
// Pagenation, Page length (initial)
|
795 |
pagingType: 'full_numbers', // or 'simple_numbers'
|
796 |
+
lengthMenu: [10, 25, 50, 100],
|
797 |
+
pageLength: length,
|
798 |
|
799 |
// scroller
|
800 |
scroller: true,
|
872 |
texp = /(<([^>]+)>)/ig, // regular expression to strip tag
|
873 |
hexp = /data-hash=[\W]([\w]+)[\W]/i, // regular expression to extract hash
|
874 |
data = { IP: [], AS: [] }, // IP address and AS number
|
875 |
+
hash, cell, cells = table.$('input:checked'); // checked entry in table
|
876 |
|
877 |
if (!cmd) {
|
878 |
return false;
|
879 |
} else if (!cells.length) {
|
880 |
+
warning(null, ip_geo_block.msg[10]);
|
881 |
return false;
|
882 |
}
|
883 |
|
929 |
|
930 |
// Clear all
|
931 |
$(ID('@', 'clear_all')).off('click').on('click', function (/*event*/) {
|
932 |
+
confirm(ip_geo_block.msg[0], function () {
|
933 |
ajax_clear(tabNo === 1 ? 'cache' : 'logs', null);
|
934 |
});
|
935 |
return false;
|
961 |
return false;
|
962 |
});
|
963 |
|
964 |
+
// save cookie when length menu is changed
|
965 |
+
$(ID('#', control.tableID)).on('length.dt', function (e, settings, len) {
|
966 |
+
cookie[tabNo][1 === tabNo ? 3 : 2] = ({10:0, 25:1, 50:2, 100:3}[len] || 0);
|
967 |
+
saveCookie(cookie);
|
968 |
+
});
|
969 |
+
|
970 |
return table;
|
971 |
}
|
972 |
|
1031 |
parent.show('slow');
|
1032 |
});
|
1033 |
|
1034 |
+
return false; //
|
1035 |
});
|
1036 |
|
1037 |
// Matching rule
|
1064 |
// Show/Hide folding list at prevent malicious upload
|
1065 |
$(ID('@', 'validation_mimetype')).on('change', function (event) {
|
1066 |
var $this = $(this),
|
1067 |
+
stat = Number($this.val());
|
1068 |
$this.nextAll(ID('.', 'settings-folding')).each(function (i, obj) {
|
1069 |
fold_elements($(obj), (stat === i + 1) || (stat && 2 === i));
|
1070 |
});
|
1079 |
|
1080 |
// only for Front-end target settings
|
1081 |
if (0 <= $this.attr('name').indexOf('public')) {
|
1082 |
+
if (-1 === Number($(ID('@', 'public_matching_rule')).val())) {
|
1083 |
elm.each(function (index) {
|
1084 |
if (1 >= index) {
|
1085 |
$(this).hide();
|
1153 |
j.appendChild(i);
|
1154 |
|
1155 |
if (1 & data[key]) {
|
1156 |
+
j.appendChild(add_icon(dfn, span, ip_geo_block.msg[5], 'lock'));
|
1157 |
}
|
1158 |
if (2 & data[key]) {
|
1159 |
+
j.appendChild(add_icon(dfn, span, ip_geo_block.msg[6], 'unlock'));
|
1160 |
}
|
1161 |
|
1162 |
$this.append(j);
|
1213 |
$(ID('.', 'icon-find')).on('click', function (/*event*/) {
|
1214 |
var $this = $(this),
|
1215 |
list = [], n = 0, key, ext, id, s,
|
1216 |
+
title = stripTag(ip_geo_block.msg[8]),
|
1217 |
target = stripTag($this.data('target')); // `admin`, `plugins`, `themes`
|
1218 |
|
1219 |
// show description
|
1266 |
// update status of checkbox
|
1267 |
$(ID('@', 'exception_' + target)).trigger('change');
|
1268 |
$(ID('#', 'find-' + target)).append(
|
1269 |
+
' ' + '<span class="ip-geo-block-warn">' + stripTag(ip_geo_block.msg[7].replace('%d', n)) + '</span>'
|
1270 |
);
|
1271 |
});
|
1272 |
|
1455 |
return false;
|
1456 |
});
|
1457 |
|
1458 |
+
// Emergency login link
|
1459 |
+
$(ID('#', 'login-link')).on('click', function (/*event*/) {
|
1460 |
+
var $this = $(this), type = ID('$', 'primary');
|
1461 |
+
if ($this.hasClass(type)) {
|
1462 |
+
ajax_post('login-loading', {
|
1463 |
+
cmd: 'generate-link'
|
1464 |
+
}, function (data) {
|
1465 |
+
$this.text(ip_geo_block.msg[3]);
|
1466 |
+
$this.removeClass(type).nextAll(ID('.', 'desc')).remove();
|
1467 |
+
$('<p class="ip-geo-block-desc"></p>')
|
1468 |
+
.appendTo($this.parent())
|
1469 |
+
.append(
|
1470 |
+
ip_geo_block.msg[4],
|
1471 |
+
'<a href="' + data.link + '" title="' + ip_geo_block.msg[1] + '" target=_blank>' + data.link + '</a></p>'
|
1472 |
+
);
|
1473 |
+
});
|
1474 |
+
} else {
|
1475 |
+
confirm(ip_geo_block.msg[0], function () {
|
1476 |
+
ajax_post('login-loading', {
|
1477 |
+
cmd: 'delete-link'
|
1478 |
+
}, function (data) {
|
1479 |
+
$this.text(ip_geo_block.msg[2]);
|
1480 |
+
$this.addClass(type).nextAll(ID('.', 'desc')).remove();
|
1481 |
+
});
|
1482 |
+
});
|
1483 |
+
}
|
1484 |
return false;
|
1485 |
});
|
1486 |
|
1487 |
+
// Manipulate DB table for validation logs
|
1488 |
+
$(ID('@', 'init_table')).on('click', function (/*event*/) {
|
1489 |
+
confirm(ip_geo_block.msg[0], function () {
|
1490 |
+
ajax_table('init-table');
|
1491 |
});
|
1492 |
return false;
|
1493 |
});
|
1593 |
});
|
1594 |
} else {
|
1595 |
$li.sort(function (a, b) {
|
1596 |
+
return Number($(a).text().replace(/^.*\((\d+)\)$/, '$1')) <= Number($(b).text().replace(/^.*\((\d+)\)$/, '$1'));
|
1597 |
});
|
1598 |
}
|
1599 |
|
1603 |
|
1604 |
// Statistics of validation
|
1605 |
$(ID('@', 'clear_statistics')).on('click', function (/*event*/) {
|
1606 |
+
confirm(ip_geo_block.msg[0], function () {
|
1607 |
ajax_clear('statistics', null);
|
1608 |
});
|
1609 |
return false;
|
1611 |
|
1612 |
// Statistics in logs
|
1613 |
$(ID('@', 'clear_logs')).on('click', function (/*event*/) {
|
1614 |
+
confirm(ip_geo_block.msg[0], function () {
|
1615 |
ajax_clear('logs', null);
|
1616 |
});
|
1617 |
return false;
|
1647 |
{ responsivePriority: 5, targets: 7 }, // Elapsed[sec]
|
1648 |
{ className: "all", targets: [0, 1, 2, 5] } // always visible
|
1649 |
]
|
1650 |
+
}, cookie);
|
1651 |
|
1652 |
// Export cache
|
1653 |
add_hidden_form('export-cache');
|
1831 |
|
1832 |
// Re-initialize DataTables
|
1833 |
$(ID('#', 'live-log-stop')).trigger('click');
|
1834 |
+
table = initTable(tabNo, control, options, cookie);
|
1835 |
return false;
|
1836 |
}).trigger('change');
|
1837 |
|
1838 |
+
// Preset filters
|
1839 |
+
$(ID('#', 'logs-preset')).on('click', 'a', function (/*event*/) {
|
1840 |
+
var value = $(this).data('value');
|
1841 |
+
$(ID('@', 'search_filter')).val(value);
|
1842 |
+
table.search(value, false, true, !/[A-Z]/.test(value)).draw();
|
1843 |
+
return false;
|
1844 |
+
});
|
1845 |
+
|
1846 |
// Export logs
|
1847 |
add_hidden_form('export-logs');
|
1848 |
|
1880 |
}
|
1881 |
|
1882 |
// Set selected provider to cookie
|
1883 |
+
var options = [];
|
1884 |
$('select[id^="' + ID('!', 'service') + '"]').on('change', function (/*event*/) {
|
1885 |
+
// make selected options in cookie
|
1886 |
+
$(this).children('option').each(function (i, elm) {
|
1887 |
+
options[$(elm).text()] = i;
|
1888 |
+
cookie[tabNo][3 + i] = $(elm).prop('selected') ? 'o' : 'x';
|
1889 |
+
});
|
1890 |
+
|
1891 |
+
// if selected options does not include the focused index, update it
|
1892 |
+
if ('o' !== cookie[tabNo][3 + (Number(cookie[tabNo][2]) || 0)]) {
|
1893 |
+
cookie[tabNo][2] = $(this).prop('selectedIndex');
|
1894 |
+
}
|
1895 |
+
|
1896 |
saveCookie(cookie);
|
1897 |
}).change();
|
1898 |
|
1899 |
// Search Geolocation
|
1900 |
$(ID('@', 'get_location')).on('click', function (/*event*/) {
|
1901 |
+
var whois = $(ID('#', 'whois' )),
|
1902 |
+
apis = $(ID('#', 'apis' )),
|
1903 |
+
list = $(ID('@', 'service')).val(), obj,
|
1904 |
ip = $.trim($(ID('@', 'ip_address')).val());
|
1905 |
|
1906 |
+
if (ip && list) {
|
1907 |
// Anonymize IP address
|
1908 |
if ($(ID('@', 'anonymize')).prop('checked')) {
|
1909 |
+
if (/[^0-9a-f\.:]/.test(ip)) {
|
1910 |
+
warning(null, 'illegal format.');
|
1911 |
+
return false;
|
1912 |
+
} else if (ip.indexOf('.') !== -1) { // in case of IPv4
|
1913 |
+
ip = ip.replace(/\.\w+$/, '.0');
|
1914 |
+
} else { // in case of IPv6
|
1915 |
+
ip = ip.split(':'); // 2001:db80:abcd:0012:0000:0000:0000:0000
|
1916 |
+
ip = ip.splice(0, 4).join(':');
|
1917 |
+
if (-1 === ip.indexOf('::')) {
|
1918 |
+
ip += '::'; // mask the interface ID
|
1919 |
+
}
|
1920 |
+
ip = ip.replace(/:{3,}/, '::');
|
1921 |
+
}
|
1922 |
$(ID('@', 'ip_address')).val(ip);
|
1923 |
}
|
1924 |
|
1925 |
whois.hide().empty();
|
1926 |
+
apis.hide().empty();
|
1927 |
|
1928 |
// Get whois data
|
1929 |
obj = $.whois(ip, function (data) {
|
1943 |
'</fieldset>'
|
1944 |
).fadeIn('slow');
|
1945 |
|
1946 |
+
// keep closing
|
1947 |
+
if ('x' === cookie[tabNo][1]) {
|
1948 |
+
$(ID('#', 'whois-title')).trigger('click');
|
1949 |
+
}
|
|
|
|
|
1950 |
});
|
1951 |
|
1952 |
// Show map
|
1953 |
ajax_post('loading', {
|
1954 |
cmd: 'search',
|
1955 |
ip: ip,
|
1956 |
+
which: list
|
1957 |
}, function (data) {
|
1958 |
+
var key, tabs = '',
|
1959 |
+
c = Number(cookie[tabNo][2]) || 0;
|
|
|
|
|
1960 |
|
1961 |
for (key in data) {
|
1962 |
if (data.hasOwnProperty(key)) {
|
1963 |
+
tabs += '<a href="#!" class="nav-tab' + (options[key] === c ? ' nav-tab-active' : '')
|
1964 |
+
+ '" data-index="' + options[key] + '" data-api=\'' + stripTag(JSON.stringify(data[key]))
|
1965 |
+
+ '\'>' + key + '</a>';
|
|
|
|
|
|
|
1966 |
}
|
1967 |
}
|
1968 |
|
1969 |
+
apis.html(
|
1970 |
+
'<div class="nav-tab-wrapper">' + tabs + '</div>' +
|
1971 |
+
'<div id="ip-geo-block-geoinfo"></div>'
|
1972 |
+
).fadeIn('slow')
|
1973 |
+
|
1974 |
+
// change APIs tab
|
1975 |
+
.on('click', 'a', function () {
|
1976 |
+
var $this = $(this),
|
1977 |
+
key, json = $(this).data('api'), info = '',
|
1978 |
+
latitude = stripTag(json.latitude || '0'),
|
1979 |
+
longitude = stripTag(json.longitude || '0'),
|
1980 |
+
zoom = (json.latitude || json.longitude) ? 7 : 2;
|
1981 |
+
|
1982 |
+
$this.parent().children('a').removeClass('nav-tab-active');
|
1983 |
+
$this.addClass('nav-tab-active');
|
1984 |
+
|
1985 |
+
// last focused index
|
1986 |
+
cookie[tabNo][2] = $this.data('index');
|
1987 |
+
saveCookie(cookie);
|
1988 |
+
|
1989 |
+
for (key in json) {
|
1990 |
+
if (json.hasOwnProperty(key)) {
|
1991 |
+
key = stripTag(key);
|
1992 |
+
info +=
|
1993 |
+
'<li>' +
|
1994 |
+
'<span class="' + ID('title' ) + '">' + key + ' : </span>' +
|
1995 |
+
'<span class="' + ID('result') + '">' + stripTag(json[key]) + '</span>' +
|
1996 |
+
'</li>';
|
1997 |
+
}
|
1998 |
+
}
|
1999 |
+
|
2000 |
+
if ('object' === typeof window.google) {
|
2001 |
+
map.GmapRS('deleteMarkers').GmapRS('addMarker', {
|
2002 |
+
latitude: latitude,
|
2003 |
+
longitude: longitude,
|
2004 |
+
title: ip,
|
2005 |
+
content: '<ul>' + info + '</ul>',
|
2006 |
+
show: true,
|
2007 |
+
zoom: zoom
|
2008 |
+
});
|
2009 |
+
} else {
|
2010 |
+
map.empty().html(
|
2011 |
+
'<iframe src="' + ip_geo_block.altgmap + '?q=' + latitude + ',' + longitude + '&z=' + zoom + '&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>'
|
2012 |
+
);
|
2013 |
+
$(ID('#', 'geoinfo')).html(
|
2014 |
+
'<ul>' +
|
2015 |
+
//'<li>' +
|
2016 |
+
// '<span class="' + ID('title' ) + '">' + 'IP address' + ' : </span>' +
|
2017 |
+
// '<span class="' + ID('result') + '">' + stripTag(ip) + '</span>' +
|
2018 |
+
//'</li>' +
|
2019 |
+
//'<li>' +
|
2020 |
+
// '<span class="' + ID('title' ) + '">' + 'show map' + ' : </span>' +
|
2021 |
+
// '<span class="' + ID('result') + '">' + '<a href="//maps.google.com/maps?q=' + latitude + ',' + longitude + '">Click here</a>' + '</span>' +
|
2022 |
+
//'</li>' +
|
2023 |
+
info +
|
2024 |
+
'</ul>'
|
2025 |
+
);
|
2026 |
+
}
|
2027 |
+
}).find('.nav-tab-active').trigger('click');
|
2028 |
}, [obj]);
|
2029 |
}
|
2030 |
|
admin/js/admin.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
|
2 |
-
Project: WordPress IP Geo Block
|
3 |
-
Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
|
4 |
-
This software is released under the MIT License.
|
5 |
-
*/
|
6 |
-
!function(e,t,n){"use strict";function i(e,t){var n={".":".ip-geo-block-","#":"#ip-geo-block-","@":"#ip_geo_block_settings_",$:"ip-geo-block-","%":"ip_geo_block_","!":"ip_geo_block_settings_"};return"undefined"!=typeof t?n[e]+t:n.$+e}function a(e){return e.toString().replace(/[&<>"']/g,function(e){return{"&":"&","<":"<",">":">",'"':""","'":"'"}[e]}).replace(/&(#\d{2,4}|\w{4,7});/g,"&$1;")}function o(e){return-1===e.indexOf("pass")}function r(e){return e?a(e.toString().replace(/(<([^>]+)>)/gi,"")):""}function l(n,i){var a=e(t).width();a!==q&&(q=a,"undefined"==typeof B[n]&&(B[n]={id:!1,callback:i}),e(t).off("resize").on("resize",function(){return!1!==B[n].id&&t.clearTimeout(B[n].id),B[n].time=t.setTimeout(B[n].callback,200),!1}))}function c(t,n){n?e(i("#",t)).addClass(i("loading")):e(i("#",t)).removeClass(i("loading"))}function s(e,n){t.confirm(r(e))&&n()}function d(e,n,i){t.alert(r(n||H.msg[12].replace("%s",i)+" ("+e+")"))}function u(){d(null,r(H.msg[10]))}function p(e,n){-1!==t.location.href.indexOf(e)&&(t.location=r(e)+(n?"&"+r(n):"")+"&ip-geo-block-auth-nonce="+V.nonce)}function f(t,n,i,a){t&&c(t,!0),n.action=H.action,n.nonce=H.nonce,e.post(H.url,n).done(function(e){i&&i(e)}).fail(function(e){J||d(e.status,e.responseText,n.action)}).always(function(){t&&("object"==typeof a?e.when.apply(e,a).then(function(){c(t,!1)}):c(t,!1))})}function h(e,t){f(e,{cmd:"clear-"+e,which:t},function(e){p(e.page,e.tab)})}function g(e){f(e,{cmd:e},function(e){p(e.page,e.tab)})}function m(e){return e.stopImmediatePropagation(),!1}function v(t){var n,a=i(".","desc");t.next(a).empty(),n=t.children("option:selected").data("desc"),n&&t.next(a).html(e.parseHTML(n))}function b(e,t){t?e.removeClass("folding-disable"):(e.children(i(".","hide")).hide(),e.addClass("folding-disable"),e.removeClass(i("dropdown")).addClass(i("dropup")))}function w(t,n,a){var o=0===t.prop("type").indexOf("checkbox")&&t.is(":checked")||0===t.prop("type").indexOf("select")&&"0"!==t.val();t.siblings('input[name^="'+i("%","settings")+'"]:checkbox').prop("disabled",!o),e.isArray(n)?e.each(n,function(t,n){e(n).nextAll(i(".","settings-folding")).each(function(n,i){b(e(i),o&&a[t])})}):n.nextAll(i(".","settings-folding")).each(function(t,n){b(e(n),o&&a)})}function k(t){var n=i("@","validation_ajax_");b(t.closest("ul").next(),e(n+"1").is(":checked")||e(n+"2").is(":checked"))}function y(e){return t.btoa(e)}function x(e){return t.atob(e)}function _(e){return String(e).replace(/[a-z]/gi,function(e){return String.fromCharCode(e.charCodeAt(0)+(e.toLowerCase()<"n"?13:-13))})}function C(e){return y(_(e))}function P(e){return _(x(e))}function S(e,n){var i=new t.FileReader;i.onload=function(e){n&&n(e.target.result)},i.onerror=function(e){d("Error",e.target.error.code)},i.readAsText(e)}function A(t){var n=t.is(":checked"),a=e(i("@","public_target_rule")),o=e(i("@","public_behavior")),r=t.closest("tr").nextAll("tr");r.find('[name^="'+i("%","settings")+'"]').prop("disabled",!n),r.find(i(".","desc")).css("opacity",n?1:.5),w(t,[a,o],["1"===a.val(),o.val()]),n&&o.change()}function I(t,n){t&&("string"==typeof t&&(t=JSON.parse(t)),n&&(e('input[type="checkbox"]').prop("checked",!1).change(),e("input[name*=providers]").prop("disabled",!1).change()),e(i("#","import")).closest("form").deserialize(t),e(i("@","exception_admin")+","+i("@","validation_mimetype")).change(),e('select[name*="'+i("%","settings")+'"]').change(),e(i("@","validation_login")).change(),A(e(i("@","validation_public"))),k(e(i("@","validation_ajax_1"))),n&&(n=i("%","settings[providers][IPInfoDB]"),e(i("@","providers_IPInfoDB")).prop("checked",!!t[n])))}function O(e,t){var n,i=t.length;for(e=e.replace("…",""),n=0;i>n;++n)if(t.hasOwnProperty(n)&&0===t[n].label.indexOf(e))return n;return-1}function D(e,t){var n,i,a=Math.ceil(e.length/t),o=[];for(n=0;a>n;++n)i=n*t,o.push(e.slice(i,i+t));return o}function N(n){"object"==typeof t.google&&(1===n?e(i("#","chart-countries")).length&&(G.drawPie(i("chart-countries")),G.drawLine(i("chart-daily"),"date")):5===n&&e(i(".","network")).each(function(t,n){G.drawStacked(e(n).attr("id"))}))}function j(e){if("object"==typeof t.google){var n=["corechart"];5===e&&n.push("bar"),t.google.load("visualization","1",{packages:n,callback:function(){N(e)}}),l("draw-chart."+e,function(){N(e)})}}function T(e){var t,n="undefined"!=typeof wpCookies&&wpCookies.getHash("ip-geo-block")||[];for(t in n)n.hasOwnProperty(t)&&(n[t]=n[t].replace(/[^ox\d]/g,"").split(""));return"undefined"==typeof n[e]&&(n[e]=[]),n}function L(t){var n,i,a=[];e.each(t,function(e,t){if(a[e]="","undefined"!=typeof t&&(i=t.length))for(a[e]=t[0]||"o",n=1;i>n;++n)a[e]+=t[n]||"o"}),"undefined"!=typeof wpCookies&&wpCookies.setHash("ip-geo-block",a,new Date(Date.now()+2592e6),V.home+V.admin)}function R(e,t,n){var a,o=e.closest("fieldset").data("section"),r=e.parent().nextAll(".panel-body").toggle();e.toggleClass(i("dropup")).toggleClass(i("dropdown")),a=e.hasClass(i("dropdown")),a?r.addClass(i("border")).trigger(i("show-body")):r.removeClass(i("border")),n[t][o]=a?"o":"x",L(n),N(t)}function z(n){var a=T(n);return e("form").on("click","h2,h3 a",function(){return t.open(this.href,null),!1}).on("click","h2,h3",function(){return R(e(this),n,a),!1}),e(i("#","toggle-sections")).on("click",function(){var t,o=e(i(".","field")).find("h2,h3"),r=[i("dropdown"),i("dropup")],l=o.filter("."+r[0]).length;return o.each(function(o){t=e(this),t.removeClass(r.join(" ")).addClass(l?r[1]:r[0]),t=t.parent().nextAll(".panel-body").toggle(!l),l?t.removeClass(i("border")):t.addClass(i("border")).trigger("show-body"),a[n][o]=l?"x":"o"}),L(a),N(n),!1}),a}function M(t){e("body").append('<div style="display:none"><form method="POST" id="'+i("export-form")+'" action="'+H.url.replace("ajax.php","post.php")+'"><input type="hidden" name="action" value="'+H.action+'" /><input type="hidden" name="nonce" value="'+H.nonce+'" /><input type="hidden" name="cmd" value="'+t+'" /><input type="hidden" name="data" value="" id="'+i("export-data")+'"/><input type="submit" value="submit" /></form><input type="file" name="settings" id="'+i("file-dialog")+'" /></div>')}function E(e,t,n,i){var a,o;return a=e.cloneNode(!1),a.setAttribute("title",r(n)),o=t.cloneNode(!1),o.setAttribute("class","dashicons dashicons-"+i),a.appendChild(o),a}function $(n,a,o){e.extend(!0,e.fn.dataTable.defaults,o,{dom:"tp",serverSide:!1,autoWidth:!1,processing:!0,deferRender:!0,deferLoading:10,info:!1,lengthChange:!1,language:{emptyTable:H.i18n[1],loadingRecords:H.i18n[0],processing:H.i18n[0],zeroRecords:H.i18n[2],paginate:{first:"«",last:"»",next:"›",previous:"‹"}},responsive:{details:{type:"column",target:"td:nth-child(n+2)"}},columnDefs:[{width:"1.25em",targets:0},{orderable:!1,targets:0},{searchable:!1,targets:0},{targets:[0],data:null,defaultContent:'<input type="checkbox">'}],pagingType:"full_numbers",pageLength:10,scroller:!0,scrollY:1e4,scrollCollapse:!0,drawCallback:function(t){var n=e(i("#",a.tableID)).find("td.dataTables_empty"),o="restore-logs"===a.ajaxCMD?3:2;o>t.iDraw?n.html(H.i18n[0]):o===t.iDraw&&(n.html(H.i18n[1]),n=e(i("@","search_filter")),n.val()&&n.trigger("keyup"))}});var r=e(i("#",a.tableID)).DataTable({ajax:{url:H.url,type:"POST",data:{cmd:a.ajaxCMD,action:H.action,nonce:H.nonce}},mark:!0}),c=function(){r.columns.adjust().responsive.recalc().draw(!1)};return l("draw-table."+n,c),e(i("#",a.sectionID)).find(".panel-body").off(i("show-body")).on(i("show-body"),function(){return c(),!1}).off("change").on("change",'th>input[type="checkbox"]',function(){var t=e(this).prop("checked");return e(i("#",a.tableID)).find('td>input[type="checkbox"]').prop("checked",t),!1}),e(i("#","select-target")).off("change").on("change",function(){var t=e(this).find('input[name="'+i("target")+'"]:checked').val();return r.columns(a.targetColumn).search("all"!==t?t:"").draw(),!1}).trigger("change"),e(i("#","bulk-action")).off("click").on("click",function(){var t,o,l=e(this).prev().val(),c=/(<([^>]+)>)/gi,s=/data-hash=[\W]([\w]+)[\W]/i,u={IP:[],AS:[]},h=e("table"+i(".","dataTable")).find("td>input:checked");return l?h.length?(h.each(function(){o=r.cell(this.parentNode).data(),"bulk-action-remove"===l||"bulk-action-ip-erase"===l?(t=o[a.columnIP].match(s),t=t?","+t[1]:""):t="",u.IP.push(o[a.columnIP].replace(c,"")+t),u.AS.push(o[a.columnAS].replace(c,""))}),u.IP.length&&f("loading",{cmd:l,which:u},function(t){"undefined"!=typeof t.page?p(t.page,"tab="+n):t&&(r.ajax.reload(),e(i("#",a.tableID)).find('th input[type="checkbox"]').prop("checked",!1))}),!1):(d(null,H.msg[11]),!1):!1}),e(i("@","search_filter")).off("keyup").on("keyup",function(){return r.search(this.value,!1,!0,!/[A-Z]/.test(this.value)).draw(),!1}),e(i("#","reset-filter")).off("click").on("click",function(){return e(i("@","search_filter")).val(""),r.search("").draw(),!1}),e(i("@","clear_all")).off("click").on("click",function(){return s(H.msg[1===n?4:5],function(){h(1===n?"cache":"logs",null)}),!1}),e("table"+i(".","dataTable")+" tbody").on("click","a",function(){var i,a,o=t.location.search.slice(1).split("&"),r=o.length,l={};for(i=0;r>i;++i)a=o[i].split("="),l[a[0]]=a[1];l.tab=1===n?4:2,l.s=e(this).text().replace(/[^\w\.\:\*]/,""),a=[];for(i in l)l.hasOwnProperty(i)&&a.push(i+"="+l[i]);return t.open(t.location.pathname+"?"+a.join("&"),"_blank"),!1}),r}var J=!1,B=[],q=e(t).width(),H=IP_GEO_BLOCK,V=IP_GEO_BLOCK_AUTH;e.fn.deserialize=function(t){return this.each(function(){var n,i,a,o=this,r={};for(n in t)if(t.hasOwnProperty(n))try{i=decodeURIComponent(n),a=decodeURIComponent(t[n]),r.hasOwnProperty(i)||(r[i]=[]),r[i].push(a)}catch(l){}e.each(r,function(t,i){n=e('[name="'+t+'"]:input',o).val(i),"hidden"!==n.attr("type")&&n.before('<span style="color:red">*</span>')})})};var G={dataPie:[],viewPie:[],drawPie:function(i){var a,o;"undefined"==typeof G.dataPie[i]&&(a=G.dataPie[i]=new t.google.visualization.DataTable,a.addColumn("string","Country"),a.addColumn("number","Requests"),o=e.parseJSON(e("#"+i).attr("data-"+i)),G.dataPie[i].addRows(o)),"undefined"==typeof G.viewPie[i]&&(G.viewPie[i]=new t.google.visualization.PieChart(n.getElementById(i))),"undefined"!=typeof G.dataPie[i]&&"undefined"!=typeof G.viewPie[i]&&0<(a=e("#"+i).width())&&G.viewPie[i].draw(G.dataPie[i],{backgroundColor:{fill:"transparent"},chartArea:{left:0,top:"5%",width:"100%",height:"90%"},sliceVisibilityThreshold:.015})},dataLine:[],viewLine:[],drawLine:function(i,a){var o,r,l;if("undefined"==typeof G.dataLine[i]){for(o=G.dataLine[i]=new t.google.visualization.DataTable,o.addColumn(a,"Date"),o.addColumn("number","comment"),o.addColumn("number","xmlrpc"),o.addColumn("number","login"),o.addColumn("number","admin"),o.addColumn("number","public"),l=e.parseJSON(e("#"+i).attr("data-"+i)),r=l.length,o=0;r>o;++o)l[o][0]=new Date(1e3*l[o][0]);G.dataLine[i].addRows(l)}"undefined"==typeof G.viewLine[i]&&(G.viewLine[i]=new t.google.visualization.LineChart(n.getElementById(i))),"undefined"!=typeof G.dataLine[i]&&"undefined"!=typeof G.viewLine[i]&&0<(o=e("#"+i).width())&&G.viewLine[i].draw(G.dataLine[i],{legend:{position:"bottom"},backgroundColor:{fill:"transparent"},hAxis:{format:"MM/dd"+("datetime"===a?" HH:mm":"")},vAxis:{textPosition:o>320?"out":"in"},chartArea:{left:o>320?"10%":0,top:"5%",width:"100%",height:"75%"}})},dataStacked:[],viewStacked:[],drawStacked:function(a){var o,r,l,c,s=e("#"+a);"undefined"==typeof G.dataStacked[a]&&(l=e.parseJSON(s.attr("data-"+a)),l&&(l.unshift(["site","comment","xmlrpc","login","admin","poblic",{role:"link"}]),G.dataStacked[a]=t.google.visualization.arrayToDataTable(l))),"undefined"==typeof G.viewStacked[a]&&(G.viewStacked[a]=new t.google.visualization.BarChart(n.getElementById(a)),t.google.visualization.events.addListener(G.viewStacked[a],"animationfinish",function(){var t,o,r,l=[],c=G.dataStacked[a],d=c.getNumberOfRows(),u=e(i("#","open-new")).prop("checked");for(t=0;d>t;t++)l.push({label:c.getValue(t,0),link:c.getValue(t,6)});d="http://www.w3.org/1999/xlink",s.find("text").each(function(e,t){r=t.parentNode,"g"===r.tagName.toLowerCase()&&-1!==(e=O(t.textContent,l))&&(o=n.createElementNS("http://www.w3.org/2000/svg","a"),o.setAttributeNS(d,"xlink:href",l[e].link),o.setAttributeNS(d,"title",l[e].label),o.setAttribute("target",u?"_blank":"_self"),o.setAttribute("class","site"),o.appendChild(r.removeChild(t)),r.appendChild(o),l.splice(e,1))})})),0<(r=s.width())&&"undefined"!=typeof G.dataStacked[a]&&"undefined"!=typeof G.viewStacked[a]&&(o=i("range"),c=e.parseJSON(e("."+o).attr("data-"+o)),l=G.dataStacked[a],o=40*l.getNumberOfRows(),G.viewStacked[a].draw(l,{width:r,height:o+80,allowHtml:!0,isStacked:!0,legend:{position:"top"},chartArea:{top:50,left:90,width:"100%",height:o},hAxis:{minValue:0,maxValue:c[1]},backgroundColor:{fill:"transparent"},animation:{startup:!0,duration:200,easing:"out"}}))},ajaxStacked:function(t,n,a,o){t=Math.max(0,Math.min(4,t)),n=5*Math.max(1,Math.min(5,n)),f(null,{cmd:"restore-network",which:t,offset:n*a*o,length:n},function(t){var a,o,r,l,c;t=D(t,n),e(i(".","network")).each(function(i,s){if("undefined"!=typeof t[i]){for(l=e(s).attr("id"),c=G.dataStacked[l],r=Math.min(n,t[i].length),a=0;r>a;++a)for(o=1;5>=o;o++)c.setValue(a,o,t[i][a][o]);G.drawStacked(l)}})})}};e(function(){var a=Number(H.tab)||0,l=z(a);switch(e(i(".","inhibit")).on("submit",function(){return!1}),e(t).on("beforeunload",function(){J=!0}),a){case 0:var c=i("%","settings");e('[id^="'+i("scan-")+'"]').on("click",function(){var t=e(this),n=t.attr("id"),a=t.parent();return f(n.replace(/^.*(?:scan)/,"scanning"),{cmd:"scan-code",which:n.replace(i("scan-"),"")},function(e){a.children("ul").length||a.append('<ul id="'+i("code-list")+'"></ul>'),a=a.children("ul").empty();var t,n;for(t in e)e.hasOwnProperty(t)&&(t=r(t),"string"==typeof e[t]?n=r(e[t]):(n=r(e[t].code),t='<abbr title="'+r(e[t].type)+'">'+t+"</abbr>"),a.append("<li>"+t+' : <span class="'+i("notice")+'">'+n+"</span></li>"));a.show("slow")}),!1}),e(i("@","matching_rule")).on("change",function(){var t=this.value;return e(i("@","white_list")).closest("tr").toggle("0"===t),e(i("@","black_list")).closest("tr").toggle("1"===t),!1}).change(),e(i(".","icon-cidr")).on("click",function(){var n=e(i("#","admin-styles-css")).get(0).href,a=t.open("about:blank","","width=560,height=170");return n=n.slice(0,n.lastIndexOf("css/")),a.document.write('<!DOCTYPE html><html lang=en><meta charset=utf-8><title>CIDR calculator for IPv4 / IPv6</title><link href="'+n+'css/cidr.min.css?v=.1" rel=stylesheet><div class="row container"><div class=row id=i><fieldset class="col span_11"><legend>Range <input id=a type=button value=Clear tabindex=1></legend><textarea id=c name=range placeholder="192.168.0.0 - 192.168.255.255" rows=5 wrap=off tabindex=2></textarea></fieldset><ul class="col span_2" id=h><li class=row><input id=e type=button value=→ class="col span_24" tabindex=3><li class=row><input id=f type=button value=← class="col span_24" tabindex=6></ul><fieldset class="col span_11"><legend>CIDR <input id=b type=button value=Clear tabindex=4></legend><textarea id=d name=cidr placeholder=192.168.0.0/16 rows=5 wrap=off tabindex=5></textarea></fieldset></div><div class=row id=j><span class=col id=g> </span></div></div><script src="'+n+'js/cidr.min.js?v=.1"></script>'),a.document.close(),!1}),e(i("@","validation_mimetype")).on("change",function(t){var n=e(this),a=parseInt(n.val(),10);return n.nextAll(i(".","settings-folding")).each(function(t,n){b(e(n),a===t+1||a&&2===t)}),m(t)}).change(),e('select[name*="response_code"]').on("change",function(t){var n=e(this),a=parseInt(n.val()/100,10),o=n.closest("tr").nextAll("tr");return 0<=n.attr("name").indexOf("public")&&-1===parseInt(e(i("@","public_matching_rule")).val(),10)?(o.each(function(t){1>=t&&e(this).hide()}),m(t)):(3>=a?o.each(function(t){0===t?e(this).show():1===t&&e(this).hide()}):o.each(function(t){0===t?e(this).hide():1===t&&e(this).show()}),m(t))}).change(),e(i("#","decode")).on("click",function(){var t=e(i("@","signature")),n=t.val();return-1===n.search(/,/)?t.val(P(n)):t.val(C(n)),!1}),e(i("@","validation_login")).on("change",function(t){var n=e(this);return w(n,n,c,!0),m(t)}).change(),f(null,{cmd:"get-actions"},function(t){var a,o,l,c,s=e(i("#","list-admin")),d=n.createElement("li"),u=n.createElement("input"),p=n.createElement("label"),h=n.createElement("dfn"),g=n.createElement("span");for(c in t)t.hasOwnProperty(c)&&(c=r(c),s.find("#"+(l=i("!","exception_admin_"+c))).size()||(a=u.cloneNode(!1),a.setAttribute("id",l),a.setAttribute("value",c),a.setAttribute("type","checkbox"),o=d.cloneNode(!1),o.appendChild(a),a=p.cloneNode(!1),a.setAttribute("for",l),a.appendChild(n.createTextNode(c)),o.appendChild(a),1&t[c]&&o.appendChild(E(h,g,H.msg[6],"lock")),2&t[c]&&o.appendChild(E(h,g,H.msg[7],"unlock")),s.append(o)));e(i(".","icon-unlock")).on("click",function(){return e(i("#","list-admin")+">li").filter(function(){return!e(this).find(".dashicons-unlock").length}).toggle(),!1}),e(i("@","exception_admin")).on("change",function(t){var n=e.grep(e(this).val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});return e(i("#","list-admin")).find("input").each(function(){var t=e(this),i=t.val();t.prop("checked",-1!==e.inArray(i,n))}),m(t)}).change(),e(i("#","list-admin")).on("click","input",function(){var t,n=e(this),a=e(i("@","exception_admin")),o=n.val(),r=e.grep(a.val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});t=e.inArray(o,r),-1===t?r.push(o):r.splice(t,1),a.val(r.join(",")).change()}),e(i(".","icon-find")).on("click",function(){var t,n,a,o,l=e(this),c=[],s=0,d=r(H.msg[9]),u=r(l.data("target"));return e(i("#","find-"+u)).empty(),l.next().children(i(".","find-desc")).show(),l=e(i("#","list-"+u)),l.children("li").each(function(t,n){c.push(e(n).find("input").val())}),f("find-"+u,{cmd:"find-"+u},function(p){var f;for(f in p)p.hasOwnProperty(f)&&(++s,t=r(p[f]),f=r(f),n=e.inArray(f,c),a=i("!","exception_"+u+"_"+f),o="admin"===u?t+"="+f:"/"+t+"/"+f+"/",o='<a class="ip-geo-block-icon ip-geo-block-icon-alert" href="'+V.sites[0]+V.admin+"options-general.php?page=ip-geo-block&tab=4&s="+encodeURIComponent(o)+'" title="'+d.replace("%s",o)+'" target="_blank"><span></span></a>',0>n?(c.push(f),l.prepend('<li><input id="'+a+'" value="'+f+'" type="checkbox" '+("admin"===u?"/>":"name=ip_geo_block_settings[exception]["+u+"]["+f+"] />")+'<label for="'+a+'">'+f+"</lable>"+o+"</li>")):(a=l.find("#"+a).parent(),a.find("a").length||a.append(o)));e(i("@","exception_"+u)).trigger("change"),e(i("#","find-"+u)).append(' <span class="ip-geo-block-warn">'+r(H.msg[8].replace("%d",s))+"</span>")}),!1})}),e('input[id^="'+i("!","validation_ajax_")+'"]').on("change",function(){k(e(this))}).change(),e(i("@","validation_public")).on("change",function(t){return A(e(this)),m(t)}).change(),e(i("@","public_matching_rule")).on("change",function(t){var n=this.value;return e(i("@","public_white_list")).closest("tr").toggle("0"===n),e(i("@","public_black_list")).closest("tr").toggle("1"===n),e(i("@","public_response_code")).change().closest("tr").toggle("-1"!==n),m(t)}).change(),e(i("@","public_behavior")).on("change",function(t){var n=e(this);return b(n.siblings("ul"),n.prop("checked")),m(t)}).change(),e(i("@","update")).on("click",function(){return f("download",{cmd:"download"},function(t){var n,a,o;for(n in t)if(t.hasOwnProperty(n)){o=t[n];for(a in o)o.hasOwnProperty(a)&&(a=r(a),o[a].filename&&e(i("@",n+"_"+a+"_path")).val(r(o[a].filename)),o[a].message&&e(i("#",n+"-"+a)).text(r(o[a].message)))}}),!1}),e(i("@","restrict_api")).on("change",function(){e('input[class*="remote"]').prop("disabled",e(this).prop("checked"))}).trigger("change"),e(i("@","save_statistics")).on("change",function(){return e(i("@","validation_recdays")).prop("disabled",!e(this).prop("checked")),!1}).trigger("change"),e(i("@","validation_reclogs")).on("change",function(){var t=e(this);t.parent().parent().nextAll().find('input[id*="validation"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),e(i("@","cache_hold")).on("change",function(){var t=e(this).prop("checked");e('input[name*="[cache_time]"]').prop("disabled",!t),e('select[id*="login_fails"]').prop("disabled",!t)}).trigger("change"),e(i("@","comment_pos")).on("change",function(){var t=e(this);t.nextAll('input[type="text"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),M("validate"),e(i("#","export")).on("click",function(){if("undefined"==typeof JSON)return u(),!1;var t=c,n={};return e.each(e(this).closest("form").serializeArray(),function(e,i){-1!==i.name.indexOf(t)&&(n[i.name]=i.value)}),n[t+="[signature]"]=C(n[t]),e(i("#","export-data")).val(JSON.stringify(n)),e(i("#","export-form")).submit(),!1}),e(i("#","file-dialog")).on("change",function(e){if("undefined"==typeof t.FileReader)return u(),!1;var n,i=e.target.files[0];return i&&S(i,function(e){e=JSON.parse(e),n=c+"[signature]","undefined"!=typeof e[n]&&(e[n]=C(e[n])),f("export-import",{cmd:"validate",data:JSON.stringify(e)},function(e){I(e,!0)})}),!1}),e(i("#","import")).on("click",function(){return e(i("#","file-dialog")).click(),!1}),e(i("#","default")).on("click",function(){return s(H.msg[0],function(){f("pre-defined",{cmd:"import-default"},function(e){I(e,!0)})}),!1}),e(i("#","preferred")).on("click",function(){return s(H.msg[0],function(){f("pre-defined",{cmd:"import-preferred"},function(e){I(e,!1)})}),!1}),e(i("@","reset_live")).on("click",function(){return f("reset-live",{cmd:"reset-live"}),!1}),e(i("@","create_table")).on("click",function(){return s(H.msg[1],function(){g("create-table")}),!1}),e(i("@","delete_table")).on("click",function(){return s(H.msg[2],function(){g("delete-table")}),!1}),e(i("#","show-info")).on("click",function(){e(i("#","wp-info")).empty(),f("wp-info",{cmd:"show-info"},function(t){var n,a=[];for(n in t)t.hasOwnProperty(n)&&a.push("- "+n+" "+t[n]);return e(i("#","wp-info")).html('<textarea class="regular-text code" rows="'+a.length+'">'+a.join("\n")+"</textarea>").find("textarea").select(),!1})}),e('select[name^="'+c+'"]').on("change",function(){var t=e(this);return v(t),w(t,t,c,!0),!1}).change(),e(i(".","icon-cycle")).on("click",function(){var t,n=e(this).nextAll("li"),a=n.find(i("@","exception_admin")),o=n.find("input:checkbox").filter(":visible"),r=o.filter(":checked").length;return o.prop("checked",!r),a.length&&(r?a.val(""):(t=[],o.each(function(n,i){t.push(e(i).val())}),a.val(t.join(",")))),e(this).blur(),!1}),e(i(".","settings-folding>dfn")).on("click",function(){var t=i("drop"),n=e(this).parent();return n.children(i(".","hide")).toggle(),n.toggleClass(t+"up").toggleClass(t+"down"),n.hasClass(t+"up")&&n.children("div").hide(),!1}),e("#submit").on("click",function(){var t=e(i("@","signature")),n=t.val();return-1!==n.indexOf(",")&&t.val(C(n)),!0});break;case 1:j(a);var y=0;e(i("#","sort-slug")).on("click",function(){var t=e(this).closest("ol"),n=t.children("li");y=!y,y?n.sort(function(t,n){return e(t).text()>e(n).text()}):n.sort(function(t,n){return parseInt(e(t).text().replace(/^.*\((\d+)\)$/,"$1"),10)<=parseInt(e(n).text().replace(/^.*\((\d+)\)$/,"$1"),10)}),t.children("li").remove(),n.appendTo(t)}),e(i("@","clear_statistics")).on("click",function(){return s(H.msg[3],function(){h("statistics",null)}),!1}),e(i("@","clear_logs")).on("click",function(){return s(H.msg[5],function(){h("logs",null)}),!1}),$(a,{tableID:"statistics-cache",ajaxCMD:"restore-cache",sectionID:"section-2",targetColumn:4,columnIP:1,columnAS:3},{columns:[{title:'<input type="checkbox">'},{title:H.i18n[3]},{title:H.i18n[4]},{title:H.i18n[5]},{title:H.i18n[6]},{title:H.i18n[7]},{title:H.i18n[8]},{title:H.i18n[9]}],columnDefs:[{responsivePriority:0,targets:0},{responsivePriority:1,targets:1},{responsivePriority:2,targets:2},{responsivePriority:6,targets:3},{responsivePriority:7,targets:4},{responsivePriority:3,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{className:"all",targets:[0,1,2,5]}]}),M("export-cache"),e(i("#","export-cache")).on("click",function(){return e(i("#","export-form")).submit(),!1});break;case 4:var x={tableID:"validation-logs",sectionID:"section-0",targetColumn:6,columnIP:3,columnAS:5},_={columns:[{title:'<input type="checkbox">'},{title:""},{title:H.i18n[10]},{title:H.i18n[3]},{title:H.i18n[4]},{title:H.i18n[5]},{title:H.i18n[7]},{title:H.i18n[11]},{title:H.i18n[12]},{title:H.i18n[13]},{title:H.i18n[14]},{title:H.i18n[15]}],columnDefs:[{responsivePriority:11,targets:0},{responsivePriority:0,targets:1},{responsivePriority:1,targets:2},{responsivePriority:2,targets:3},{responsivePriority:3,targets:4},{responsivePriority:6,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{responsivePriority:7,targets:8},{responsivePriority:8,targets:9},{responsivePriority:9,targets:10},{responsivePriority:10,targets:11},{visible:!1,targets:1},{className:"all",targets:[0,2,3,4]},{className:"none",targets:[8,9,10,11]}]},O=null,D=null,N=e(i("#","live-loading")),T=null,R=function(){O&&(t.clearTimeout(O),O=null),D&&(N.removeClass(i("live-timer")),t.clearTimeout(D),D=null)},B=function(){R(),f("live-loading",{cmd:"live-start"},function(e){if(e.error)d(null,e.error);else if(e.data.length){var n,i=e.data.length;for(n=0;i>n;n++)T.row.add(e.data[n]);T.draw(!1)}O=t.setTimeout(B,1e3*H.interval)})},q=function(e,t){R(),f(null,{cmd:e||"live-stop",callback:t})},U=function(){q("live-pause",function(){N.addClass(i("live-timer")),D=t.setTimeout(function(){R(),e(i("#","live-log-stop")).prop("checked",!0)},1e3*H.timeout)})},W=i(""),F=function(t,n,i){o(n[7])?e(t).addClass(W+i+"blocked"):e(t).addClass(W+i+"passed")},K=e(i("#","live-log")),Y=e(i("#","live-update"));e(i("#","validation-logs")).on("animationend",function(){return e(this).find('tr[class*="'+W+'new"]').each(function(){var t=e(this);-1!==t.prop("class").indexOf("passed")?t.addClass(W+"passed").removeClass(W+"new-passed"):t.addClass(W+"blocked").removeClass(W+"new-blocked")}),!1}),K.on("change",function(){switch(e('input[name="'+i("live-log")+'"]:checked').val()){case"start":B();break;case"pause":U();break;case"stop":q()}}),Y.on("change",function(){var t=K.closest("tr"),n=Y.prop("checked");return l[a][1]=n?"o":"x",L(l),T&&T.clear().destroy(),n?(t.show().next().next().next().nextAll().hide(),x.ajaxCMD="live-stop",_.order=[1,"desc"],_.createdRow=function(e,t){F(e,t,"new-")}):(t.hide().next().next().next().nextAll().show(),x.ajaxCMD="restore-logs",_.order=[0,""],_.createdRow=function(e,t){F(e,t,"")}),e(i("#","live-log-stop")).trigger("click"),T=$(a,x,_),!1}).trigger("change"),M("export-logs"),e(i("#","export-logs")).on("click",function(){return e(i("#","export-form")).submit(),!1});break;case 2:e(t).on(i("gmap-error"),function(){f(null,{cmd:"gmap-error"},function(e){p(e.page,e.tab)})});var Q=e(i("#","map"));"object"==typeof t.google?Q.each(function(){e(this).GmapRS()}):Q.each(function(){e(this).empty().html('<iframe src="'+H.altgmap+'?output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')}),e('select[id^="'+i("!","service")+'"]').on("change",function(){l[a][3]=e(this).prop("selectedIndex"),L(l)}).change(),e(i("@","get_location")).on("click",function(){var n,a=e(i("#","whois")),o=e.trim(e(i("@","ip_address")).val());return o&&(e(i("@","anonymize")).prop("checked")&&(o=o.replace(/([\.\:])\w{1,4}$/,"$10"),e(i("@","ip_address")).val(o)),a.hide().empty(),n=e.whois(o,function(t){var n,o="";for(n=0;n<t.length;++n)o+="<tr><td>"+t[n].name+"</td><td>"+t[n].value+"</td></tr>";a.html('<fieldset id="'+i("section-1")+'" class="'+i("field")+' panel panel-default" data-section="1"><legend class="panel-heading"><h3 id="'+i("whois-title")+'" class="'+i("dropdown")+'">Whois</h3></legend><div class="panel-body '+i("border")+'"><table class="'+i("table")+'">'+o+"</table></div></fieldset>").fadeIn("slow"),e(i("#","whois-title")).on("click",function(){var t=e(this);return t.parent().nextAll().toggle(),t.toggleClass(i("dropup")).toggleClass(i("dropdown")),!1})}),f("loading",{cmd:"search",ip:o,which:e(i("@","service")).val()},function(e){var n,a="",l=r(e.latitude||"0"),c=r(e.longitude||"0"),s=e.latitude||e.longitude?8:2;for(n in e)e.hasOwnProperty(n)&&(n=r(n),a+='<li><span class="'+i("title")+'">'+n+' : </span><span class="'+i("result")+'">'+r(e[n])+"</span></li>");"object"==typeof t.google?Q.GmapRS("addMarker",{latitude:l,longitude:c,title:o,content:"<ul>"+a+"</ul>",show:!0,zoom:s}):Q.css({height:"600px",backgroundColor:"transparent"}).empty().html('<ul style="margin-top:0; margin-left:1em;"><li><span class="'+i("title")+'">IP address : </span><span class="'+i("result")+'">'+r(o)+"</span></li>"+a+'</ul><iframe src="//maps.google.com/maps?q='+l+","+c+"&z="+s+'&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')},[n])),!1}),e(i("@","ip_address")).on("keypress",function(t){return t.which&&13===t.which||t.keyCode&&13===t.keyCode?(e(i("@","get_location")).click(),!1):void 0}),e(i("@","ip_address")).val()&&e(i("@","get_location")).click();break;case 5:j(a),e("input[name="+i("duration")+"]:radio").on("click",function(){var t=e('div[class*="paginate"]').find('a[class*="current"]').text();l[a][2]=e(this).val()||0,l[a][3]=l[a][3]||2,l[a][4]=l[a][4]||1,L(l),G.ajaxStacked(l[a][2],l[a][3],l[a][4],t-1)}),e(i("#","open-new")).on("change",function(){var t=e(this).prop("checked");l[a][1]=t?"o":"x",L(l),e(i("#","section-0 svg")).find("a").each(function(){this.setAttribute("target",t?"_blank":"_self")})}),e(i("#","apply-layout")).on("click",function(){var t=e(i("#","select-layout"));l[a][3]=t.find('select[name="rows"] option:selected').val(),l[a][4]=t.find('select[name="cols"] option:selected').val(),L(l)}),e("ul.wp-submenu>li.wp-first-item").removeClass("current").next().addClass("current")}})}(jQuery,window,document);
|
1 |
+
/*!
|
2 |
+
* Project: WordPress IP Geo Block
|
3 |
+
* Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
|
4 |
+
* This software is released under the MIT License.
|
5 |
+
*/
|
6 |
+
!function(e,t,n){var i=!1,a=[],o=e(t).width(),r=IP_GEO_BLOCK,l=IP_GEO_BLOCK_AUTH;function c(e,t){var n={".":".ip-geo-block-","#":"#ip-geo-block-","@":"#ip_geo_block_settings_",$:"ip-geo-block-","%":"ip_geo_block_","!":"ip_geo_block_settings_"};return void 0!==t?n[e]+t:n.$+e}function s(e){return e?function(e){return e.toString().replace(/[&<>"']/g,function(e){return{"&":"&","<":"<",">":">",'"':""","'":"'"}[e]}).replace(/&(#\d{2,4}|\w{4,7});/g,"&$1;")}(e.toString().replace(/(<([^>]+)>)/gi,"")):""}function d(n,i){var r=e(t).width();r!==o&&(o=r,void 0===a[n]&&(a[n]={id:!1,callback:i}),e(t).off("resize").on("resize",function(){return!1!==a[n].id&&t.clearTimeout(a[n].id),a[n].time=t.setTimeout(a[n].callback,200),!1}))}function u(t,n){n?e(c("#",t)).addClass(c("loading")):e(c("#",t)).removeClass(c("loading"))}function p(e,n){t.confirm(s(e))&&n()}function h(e,n,i){t.alert(s(n||r.msg[11].replace("%s",i)+" ("+e+")"))}function f(){h(null,s(r.msg[9]))}function g(e,n){-1!==t.location.href.indexOf(e)&&(t.location=s(e)+(n?"&"+s(n):"")+"&ip-geo-block-auth-nonce="+l.nonce)}function v(t,n,a,o){t&&u(t,!0),n.action=r.action,n.nonce=r.nonce,e.post(r.url,n).done(function(e){a&&a(e)}).fail(function(e){i||h(e.status,e.responseText,n.action)}).always(function(){t&&("object"==typeof o?e.when.apply(e,o).then(function(){u(t,!1)}):u(t,!1))})}function m(e,t){v(e,{cmd:"clear-"+e,which:t},function(e){g(e.page,e.tab)})}function b(e){return e.stopImmediatePropagation(),!1}function k(e,t){t?e.removeClass("folding-disable"):(e.children(c(".","hide")).hide(),e.addClass("folding-disable"),e.removeClass(c("dropdown")).addClass(c("dropup")))}function w(t,n,i){var a=t.prop("type")||"",o=0===a.indexOf("checkbox")&&t.is(":checked")||0===a.indexOf("select")&&"0"!==t.val();t.siblings('input[name^="'+c("%","settings")+'"]:checkbox').prop("disabled",!o),e.isArray(n)?e.each(n,function(t,n){e(n).nextAll(c(".","settings-folding")).each(function(n,a){k(e(a),o&&i[t])})}):n.nextAll(c(".","settings-folding")).each(function(t,n){k(e(n),o&&i)})}function x(t){var n=c("@","validation_ajax_");k(t.closest("ul").next(),e(n+"1").is(":checked")||e(n+"2").is(":checked"))}function y(e){return String(e).replace(/[a-z]/gi,function(e){return String.fromCharCode(e.charCodeAt(0)+(e.toLowerCase()<"n"?13:-13))})}function _(e){return function(e){return t.btoa(e)}(y(e))}function C(e){return y(function(e){return t.atob(e)}(e))}function P(t){var n=t.is(":checked"),i=e(c("@","public_target_rule")),a=e(c("@","public_behavior")),o=t.closest("tr").nextAll("tr");o.find('[name^="'+c("%","settings")+'"]').prop("disabled",!n),o.find(c(".","desc")).css("opacity",n?1:.5),w(t,[i,a],["1"===i.val(),a.val()]),n&&a.change()}function S(t,n){t&&("string"==typeof t&&(t=JSON.parse(t)),n&&(e('input[type="checkbox"]').prop("checked",!1).change(),e("input[name*=providers]").prop("disabled",!1).change()),e(c("#","import")).closest("form").deserialize(t),e(c("@","exception_admin")+","+c("@","validation_mimetype")).change(),e('select[name*="'+c("%","settings")+'"]').change(),e(c("@","validation_login")).change(),P(e(c("@","validation_public"))),x(e(c("@","validation_ajax_1"))),n&&(n=c("%","settings[providers][IPInfoDB]"),e(c("@","providers_IPInfoDB")).prop("checked",!!t[n])))}e.fn.deserialize=function(t){return this.each(function(){var n,i,a,o=this,r={};for(n in t)if(t.hasOwnProperty(n))try{i=decodeURIComponent(n),a=decodeURIComponent(t[n]),r.hasOwnProperty(i)||(r[i]=[]),r[i].push(a)}catch(e){}e.each(r,function(t,i){"hidden"!==(n=e('[name="'+t+'"]:input',o).val(i)).attr("type")&&n.before('<span style="color:red">*</span>')})})};var A={dataPie:[],viewPie:[],drawPie:function(i){var a,o;void 0===A.dataPie[i]&&((a=A.dataPie[i]=new t.google.visualization.DataTable).addColumn("string","Country"),a.addColumn("number","Requests"),o=e.parseJSON(e("#"+i).attr("data-"+i)),A.dataPie[i].addRows(o)),void 0===A.viewPie[i]&&(A.viewPie[i]=new t.google.visualization.PieChart(n.getElementById(i))),void 0!==A.dataPie[i]&&void 0!==A.viewPie[i]&&0<(a=e("#"+i).width())&&A.viewPie[i].draw(A.dataPie[i],{backgroundColor:{fill:"transparent"},chartArea:{left:0,top:"5%",width:"100%",height:"90%"},sliceVisibilityThreshold:.015})},dataLine:[],viewLine:[],drawLine:function(i,a){var o,r,l;if(void 0===A.dataLine[i]){for((o=A.dataLine[i]=new t.google.visualization.DataTable).addColumn(a,"Date"),o.addColumn("number","comment"),o.addColumn("number","xmlrpc"),o.addColumn("number","login"),o.addColumn("number","admin"),o.addColumn("number","public"),r=(l=e.parseJSON(e("#"+i).attr("data-"+i))).length,o=0;o<r;++o)l[o][0]=new Date(1e3*l[o][0]);A.dataLine[i].addRows(l)}void 0===A.viewLine[i]&&(A.viewLine[i]=new t.google.visualization.LineChart(n.getElementById(i))),void 0!==A.dataLine[i]&&void 0!==A.viewLine[i]&&0<(o=e("#"+i).width())&&A.viewLine[i].draw(A.dataLine[i],{legend:{position:"bottom"},backgroundColor:{fill:"transparent"},hAxis:{format:"MM/dd"+("datetime"===a?" HH:mm":"")},vAxis:{textPosition:o>320?"out":"in"},chartArea:{left:o>320?"10%":0,top:"5%",width:"100%",height:"75%"}})},dataStacked:[],viewStacked:[],drawStacked:function(i){var a,o,r,l,s=e("#"+i);void 0===A.dataStacked[i]&&(r=e.parseJSON(s.attr("data-"+i)))&&(r.unshift(["site","comment","xmlrpc","login","admin","poblic",{role:"link"}]),A.dataStacked[i]=t.google.visualization.arrayToDataTable(r)),void 0===A.viewStacked[i]&&(A.viewStacked[i]=new t.google.visualization.BarChart(n.getElementById(i)),t.google.visualization.events.addListener(A.viewStacked[i],"animationfinish",function(){var t,a,o,r=[],l=A.dataStacked[i],d=l.getNumberOfRows(),u=e(c("#","open-new")).prop("checked");for(t=0;t<d;t++)r.push({label:l.getValue(t,0),link:l.getValue(t,6)});d="http://www.w3.org/1999/xlink",s.find("text").each(function(e,t){"g"===(o=t.parentNode).tagName.toLowerCase()&&-1!==(e=function(e,t){var n,i=t.length;for(e=e.replace("…",""),n=0;n<i;++n)if(t.hasOwnProperty(n)&&0===t[n].label.indexOf(e))return n;return-1}(t.textContent,r))&&((a=n.createElementNS("http://www.w3.org/2000/svg","a")).setAttributeNS(d,"xlink:href",r[e].link),a.setAttributeNS(d,"title",r[e].label),a.setAttribute("target",u?"_blank":"_self"),a.setAttribute("class","site"),a.appendChild(o.removeChild(t)),o.appendChild(a),r.splice(e,1))})})),0<(o=s.width())&&void 0!==A.dataStacked[i]&&void 0!==A.viewStacked[i]&&(a=c("range"),l=e.parseJSON(e("."+a).attr("data-"+a)),a=40*(r=A.dataStacked[i]).getNumberOfRows(),A.viewStacked[i].draw(r,{width:o,height:a+80,allowHtml:!0,isStacked:!0,legend:{position:"top"},chartArea:{top:50,left:90,width:"100%",height:a},hAxis:{minValue:0,maxValue:l[1]},backgroundColor:{fill:"transparent"},animation:{startup:!0,duration:200,easing:"out"}}))},ajaxStacked:function(t,n,i,a){v(null,{cmd:"restore-network",which:t=Math.max(0,Math.min(4,t)),offset:(n=5*Math.max(1,Math.min(5,n)))*i*a,length:n},function(t){var i,a,o,r,l;t=function(e,t){var n,i,a=Math.ceil(e.length/t),o=[];for(n=0;n<a;++n)i=n*t,o.push(e.slice(i,i+t));return o}(t,n),e(c(".","network")).each(function(c,s){if(void 0!==t[c]){for(r=e(s).attr("id"),l=A.dataStacked[r],o=Math.min(n,t[c].length),i=0;i<o;++i)for(a=1;a<=5;a++)l.setValue(i,a,t[c][i][a]);A.drawStacked(r)}})})}};function O(n){"object"==typeof t.google&&(1===n?e(c("#","chart-countries")).length&&(A.drawPie(c("chart-countries")),A.drawLine(c("chart-daily"),"date")):5===n&&e(c(".","network")).each(function(t,n){A.drawStacked(e(n).attr("id"))}))}function I(e){if("object"==typeof t.google){var n=["corechart"];5===e&&n.push("bar"),t.google.charts.load("current",{packages:n,callback:function(){O(e)}}),d("draw-chart."+e,function(){O(e)})}}function N(t){var n,i,a=[];e.each(t,function(e,t){if(a[e]="",void 0!==t&&(i=t.length))for(a[e]=(t[0]||"o").toString(),n=1;n<i;++n)a[e]+=(t[n]||"o").toString()}),"undefined"!=typeof wpCookies&&wpCookies.setHash("ip-geo-block",a,new Date(Date.now()+2592e6),l.home+l.admin)}function D(t){var i=function(e){var t,n="undefined"!=typeof wpCookies&&wpCookies.getHash("ip-geo-block")||[];for(t in n)n.hasOwnProperty(t)&&(n[t]=n[t].replace(/[^ox\d]/gi,"").split(""));return void 0===n[e]&&(n[e]=[]),n}(t);return e(n).on("click","form>h2,h3",function(){return function(e,t,n){var i,a=e.closest("fieldset").data("section"),o=e.parent().nextAll(".panel-body").toggle();e.toggleClass(c("dropup")).toggleClass(c("dropdown")),(i=e.hasClass(c("dropdown")))?o.addClass(c("border")).trigger(c("show-body")):o.removeClass(c("border")),n[t][a]=i?"o":"x",N(n),O(t)}(e(this),t,i),!1}),e(c("#","toggle-sections")).on("click",function(){var n,a=e(c(".","field")).find("h2,h3"),o=[c("dropdown"),c("dropup")],r=a.filter("."+o[0]).length;return a.each(function(a){(n=e(this)).removeClass(o.join(" ")).addClass(r?o[1]:o[0]),n=n.parent().nextAll(".panel-body").toggle(!r),r?n.removeClass(c("border")):n.addClass(c("border")).trigger("show-body"),i[t][a]=r?"x":"o"}),N(i),O(t),!1}),i}function j(t){e("body").append('<div style="display:none"><form method="POST" id="'+c("export-form")+'" action="'+r.url.replace("ajax.php","post.php")+'"><input type="hidden" name="action" value="'+r.action+'" /><input type="hidden" name="nonce" value="'+r.nonce+'" /><input type="hidden" name="cmd" value="'+t+'" /><input type="hidden" name="data" value="" id="'+c("export-data")+'"/><input type="submit" value="submit" /></form><input type="file" name="settings" id="'+c("file-dialog")+'" /></div>')}function T(e,t,n,i){var a,o;return(a=e.cloneNode(!1)).setAttribute("title",s(n)),(o=t.cloneNode(!1)).setAttribute("class","dashicons dashicons-"+i),a.appendChild(o),a}function L(n,i,a,o){var l=Number(o[n][1===n?3:2])||0;l=[10,25,50,100][l],e.extend(!0,e.fn.dataTable.defaults,a,{dom:"tlp",serverSide:!1,autoWidth:!1,processing:!0,deferRender:!0,language:{emptyTable:r.i18n[1],loadingRecords:r.i18n[0],processing:r.i18n[0],zeroRecords:r.i18n[2],lengthMenu:"_MENU_",paginate:{first:"«",last:"»",next:"›",previous:"‹"}},responsive:{details:{type:"column",target:"td:nth-child(n+2)"}},columnDefs:[{width:"1.25em",targets:0},{orderable:!1,targets:0},{searchable:!1,targets:0},{targets:[0],data:null,defaultContent:'<input type="checkbox">'}],pagingType:"full_numbers",lengthMenu:[10,25,50,100],pageLength:l,scroller:!0,scrollY:1e4,scrollCollapse:!0,drawCallback:function(t){var n=e(c("#",i.tableID)).find("td.dataTables_empty"),a="restore-logs"===i.ajaxCMD?3:2;a>t.iDraw?n.html(r.i18n[0]):a===t.iDraw&&(n.html(r.i18n[1]),(n=e(c("@","search_filter"))).val()&&n.trigger("keyup"))}});var s=e(c("#",i.tableID)).DataTable({ajax:{url:r.url,type:"POST",data:{cmd:i.ajaxCMD,action:r.action,nonce:r.nonce}},mark:!0}),u=function(){s.columns.adjust().responsive.recalc().draw(!1)};return d("draw-table."+n,u),e(c("#",i.sectionID)).find(".panel-body").off(c("show-body")).on(c("show-body"),function(){return u(),!1}).off("change").on("change",'th>input[type="checkbox"]',function(){var t=e(this).prop("checked");return e(c("#",i.tableID)).find('td>input[type="checkbox"]').prop("checked",t),!1}),e(c("#","select-target")).off("change").on("change",function(){var t=e(this).find('input[name="'+c("target")+'"]:checked').val();return s.columns(i.targetColumn).search("all"!==t?t:"").draw(),!1}).trigger("change"),e(c("#","bulk-action")).off("click").on("click",function(){var t,a,o=e(this).prev().val(),l=/(<([^>]+)>)/gi,d=/data-hash=[\W]([\w]+)[\W]/i,u={IP:[],AS:[]},p=s.$("input:checked");return!!o&&(p.length?(p.each(function(){a=s.cell(this.parentNode).data(),t=("bulk-action-remove"===o||"bulk-action-ip-erase"===o)&&(t=a[i.columnIP].match(d))?","+t[1]:"",u.IP.push(a[i.columnIP].replace(l,"")+t),u.AS.push(a[i.columnAS].replace(l,""))}),u.IP.length&&v("loading",{cmd:o,which:u},function(t){void 0!==t.page?g(t.page,"tab="+n):t&&(s.ajax.reload(),e(c("#",i.tableID)).find('th input[type="checkbox"]').prop("checked",!1))}),!1):(h(null,r.msg[10]),!1))}),e(c("@","search_filter")).off("keyup").on("keyup",function(){return s.search(this.value,!1,!0,!/[A-Z]/.test(this.value)).draw(),!1}),e(c("#","reset-filter")).off("click").on("click",function(){return e(c("@","search_filter")).val(""),s.search("").draw(),!1}),e(c("@","clear_all")).off("click").on("click",function(){return p(r.msg[0],function(){m(1===n?"cache":"logs",null)}),!1}),e("table"+c(".","dataTable")+" tbody").on("click","a",function(){var i,a,o=t.location.search.slice(1).split("&"),r=o.length,l={};for(i=0;i<r;++i)l[(a=o[i].split("="))[0]]=a[1];for(i in l.tab=1===n?4:2,l.s=e(this).text().replace(/[^\w\.\:\*]/,""),a=[],l)l.hasOwnProperty(i)&&a.push(i+"="+l[i]);return t.open(t.location.pathname+"?"+a.join("&"),"_blank"),!1}),e(c("#",i.tableID)).on("length.dt",function(e,t,i){o[n][1===n?3:2]={10:0,25:1,50:2,100:3}[i]||0,N(o)}),s}e(function(){var a=Number(r.tab)||0,o=D(a);switch(e(c(".","inhibit")).on("submit",function(){return!1}),e(t).on("beforeunload",function(){i=!0}),a){case 0:var d=c("%","settings");e('[id^="'+c("scan-")+'"]').on("click",function(){var t=e(this),n=t.attr("id"),i=t.parent();return v(n.replace(/^.*(?:scan)/,"scanning"),{cmd:"scan-code",which:n.replace(c("scan-"),"")},function(e){var t,n;for(t in i.children("ul").length||i.append('<ul id="'+c("code-list")+'"></ul>'),i=i.children("ul").empty(),e)e.hasOwnProperty(t)&&("string"==typeof e[t=s(t)]?n=s(e[t]):(n=s(e[t].code),t='<abbr title="'+s(e[t].type)+'">'+t+"</abbr>"),i.append("<li>"+t+' : <span class="'+c("notice")+'">'+n+"</span></li>"));i.show("slow")}),!1}),e(c("@","matching_rule")).on("change",function(){var t=this.value;return e(c("@","white_list")).closest("tr").toggle("0"===t),e(c("@","black_list")).closest("tr").toggle("1"===t),!1}).change(),e(c(".","icon-cidr")).on("click",function(){var n=e(c("#","admin-styles-css")).get(0).href,i=t.open("about:blank","","width=560,height=170");return n=n.slice(0,n.lastIndexOf("css/")),i.document.write('<!DOCTYPE html><html lang=en><meta charset=utf-8><title>CIDR calculator for IPv4 / IPv6</title><link href="'+n+'css/cidr.min.css?v=.1" rel=stylesheet><div class="row container"><div class=row id=i><fieldset class="col span_11"><legend>Range <input id=a type=button value=Clear tabindex=1></legend><textarea id=c name=range placeholder="192.168.0.0 - 192.168.255.255" rows=5 wrap=off tabindex=2></textarea></fieldset><ul class="col span_2" id=h><li class=row><input id=e type=button value=→ class="col span_24" tabindex=3><li class=row><input id=f type=button value=← class="col span_24" tabindex=6></ul><fieldset class="col span_11"><legend>CIDR <input id=b type=button value=Clear tabindex=4></legend><textarea id=d name=cidr placeholder=192.168.0.0/16 rows=5 wrap=off tabindex=5></textarea></fieldset></div><div class=row id=j><span class=col id=g> </span></div></div><script src="'+n+'js/cidr.min.js?v=.1"><\/script>'),i.document.close(),!1}),e(c("@","validation_mimetype")).on("change",function(t){var n=e(this),i=Number(n.val());return n.nextAll(c(".","settings-folding")).each(function(t,n){k(e(n),i===t+1||i&&2===t)}),b(t)}).change(),e('select[name*="response_code"]').on("change",function(t){var n=e(this),i=parseInt(n.val()/100,10),a=n.closest("tr").nextAll("tr");return 0<=n.attr("name").indexOf("public")&&-1===Number(e(c("@","public_matching_rule")).val())?(a.each(function(t){1>=t&&e(this).hide()}),b(t)):(i<=3?a.each(function(t){0===t?e(this).show():1===t&&e(this).hide()}):a.each(function(t){0===t?e(this).hide():1===t&&e(this).show()}),b(t))}).change(),e(c("#","decode")).on("click",function(){var t=e(c("@","signature")),n=t.val();return-1===n.search(/,/)?t.val(C(n)):t.val(_(n)),!1}),e(c("@","validation_login")).on("change",function(t){var n=e(this);return w(n,n,d),b(t)}).change(),v(null,{cmd:"get-actions"},function(t){var i,a,o,d,u=e(c("#","list-admin")),p=n.createElement("li"),h=n.createElement("input"),f=n.createElement("label"),g=n.createElement("dfn"),m=n.createElement("span");for(d in t)t.hasOwnProperty(d)&&(d=s(d),u.find("#"+(o=c("!","exception_admin_"+d))).size()||((i=h.cloneNode(!1)).setAttribute("id",o),i.setAttribute("value",d),i.setAttribute("type","checkbox"),(a=p.cloneNode(!1)).appendChild(i),(i=f.cloneNode(!1)).setAttribute("for",o),i.appendChild(n.createTextNode(d)),a.appendChild(i),1&t[d]&&a.appendChild(T(g,m,r.msg[5],"lock")),2&t[d]&&a.appendChild(T(g,m,r.msg[6],"unlock")),u.append(a)));e(c(".","icon-unlock")).on("click",function(){return e(c("#","list-admin")+">li").filter(function(){return!e(this).find(".dashicons-unlock").length}).toggle(),!1}),e(c("@","exception_admin")).on("change",function(t){var n=e.grep(e(this).val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});return e(c("#","list-admin")).find("input").each(function(){var t=e(this),i=t.val();t.prop("checked",-1!==e.inArray(i,n))}),b(t)}).change(),e(c("#","list-admin")).on("click","input",function(){var t,n=e(this),i=e(c("@","exception_admin")),a=n.val(),o=e.grep(i.val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});-1===(t=e.inArray(a,o))?o.push(a):o.splice(t,1),i.val(o.join(",")).change()}),e(c(".","icon-find")).on("click",function(){var t,n,i,a,o=e(this),d=[],u=0,p=s(r.msg[8]),h=s(o.data("target"));return e(c("#","find-"+h)).empty(),o.next().children(c(".","find-desc")).show(),(o=e(c("#","list-"+h))).children("li").each(function(t,n){d.push(e(n).find("input").val())}),v("find-"+h,{cmd:"find-"+h},function(f){var g;for(g in f)f.hasOwnProperty(g)&&(++u,t=s(f[g]),g=s(g),n=e.inArray(g,d),i=c("!","exception_"+h+"_"+g),a="admin"===h?t+"="+g:"/"+t+"/"+g+"/",a='<a class="ip-geo-block-icon ip-geo-block-icon-alert" href="'+l.sites[0]+l.admin+"options-general.php?page=ip-geo-block&tab=4&s="+encodeURIComponent(a)+'" title="'+p.replace("%s",a)+'" target="_blank"><span></span></a>',n<0?(d.push(g),o.prepend('<li><input id="'+i+'" value="'+g+'" type="checkbox" '+("admin"===h?"/>":"name=ip_geo_block_settings[exception]["+h+"]["+g+"] />")+'<label for="'+i+'">'+g+"</lable>"+a+"</li>")):(i=o.find("#"+i).parent()).find("a").length||i.append(a));e(c("@","exception_"+h)).trigger("change"),e(c("#","find-"+h)).append(' <span class="ip-geo-block-warn">'+s(r.msg[7].replace("%d",u))+"</span>")}),!1})}),e('input[id^="'+c("!","validation_ajax_")+'"]').on("change",function(){x(e(this))}).change(),e(c("@","validation_public")).on("change",function(t){return P(e(this)),b(t)}).change(),e(c("@","public_matching_rule")).on("change",function(t){var n=this.value;return e(c("@","public_white_list")).closest("tr").toggle("0"===n),e(c("@","public_black_list")).closest("tr").toggle("1"===n),e(c("@","public_response_code")).change().closest("tr").toggle("-1"!==n),b(t)}).change(),e(c("@","public_behavior")).on("change",function(t){var n=e(this);return k(n.siblings("ul"),n.prop("checked")),b(t)}).change(),e(c("@","update")).on("click",function(){return v("download",{cmd:"download"},function(t){var n,i,a;for(n in t)if(t.hasOwnProperty(n))for(i in a=t[n])a.hasOwnProperty(i)&&(a[i=s(i)].filename&&e(c("@",n+"_"+i+"_path")).val(s(a[i].filename)),a[i].message&&e(c("#",n+"-"+i)).text(s(a[i].message)))}),!1}),e(c("@","restrict_api")).on("change",function(){e('input[class*="remote"]').prop("disabled",e(this).prop("checked"))}).trigger("change"),e(c("@","save_statistics")).on("change",function(){return e(c("@","validation_recdays")).prop("disabled",!e(this).prop("checked")),!1}).trigger("change"),e(c("@","validation_reclogs")).on("change",function(){var t=e(this);t.parent().parent().nextAll().find('input[id*="validation"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),e(c("@","cache_hold")).on("change",function(){var t=e(this).prop("checked");e('input[name*="[cache_time]"]').prop("disabled",!t),e('select[id*="login_fails"]').prop("disabled",!t)}).trigger("change"),e(c("@","comment_pos")).on("change",function(){var t=e(this);t.nextAll('input[type="text"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),j("validate"),e(c("#","export")).on("click",function(){if("undefined"==typeof JSON)return f(),!1;var t=d,n={};return e.each(e(this).closest("form").serializeArray(),function(e,i){-1!==i.name.indexOf(t)&&(n[i.name]=i.value)}),n[t+="[signature]"]=_(n[t]),e(c("#","export-data")).val(JSON.stringify(n)),e(c("#","export-form")).submit(),!1}),e(c("#","file-dialog")).on("change",function(e){if(void 0===t.FileReader)return f(),!1;var n,i=e.target.files[0];return i&&function(e,n){var i=new t.FileReader;i.onload=function(e){n&&n(e.target.result)},i.onerror=function(e){h("Error",e.target.error.code)},i.readAsText(e)}(i,function(e){void 0!==(e=JSON.parse(e))[n=d+"[signature]"]&&(e[n]=_(e[n])),v("export-import",{cmd:"validate",data:JSON.stringify(e)},function(e){S(e,!0)})}),!1}),e(c("#","import")).on("click",function(){return e(c("#","file-dialog")).click(),!1}),e(c("#","default")).on("click",function(){return p(r.msg[0],function(){v("pre-defined",{cmd:"import-default"},function(e){S(e,!0)})}),!1}),e(c("#","preferred")).on("click",function(){return p(r.msg[0],function(){v("pre-defined",{cmd:"import-preferred"},function(e){S(e,!1)})}),!1}),e(c("@","reset_live")).on("click",function(){return v("reset-live",{cmd:"reset-live"}),!1}),e(c("#","login-link")).on("click",function(){var t=e(this),n=c("$","primary");return t.hasClass(n)?v("login-loading",{cmd:"generate-link"},function(i){t.text(r.msg[3]),t.removeClass(n).nextAll(c(".","desc")).remove(),e('<p class="ip-geo-block-desc"></p>').appendTo(t.parent()).append(r.msg[4],'<a href="'+i.link+'" title="'+r.msg[1]+'" target=_blank>'+i.link+"</a></p>")}):p(r.msg[0],function(){v("login-loading",{cmd:"delete-link"},function(e){t.text(r.msg[2]),t.addClass(n).nextAll(c(".","desc")).remove()})}),!1}),e(c("@","init_table")).on("click",function(){return p(r.msg[0],function(){var e;v(e="init-table",{cmd:e},function(e){g(e.page,e.tab)})}),!1}),e(c("#","show-info")).on("click",function(){e(c("#","wp-info")).empty(),v("wp-info",{cmd:"show-info"},function(t){var n,i=[];for(n in t)t.hasOwnProperty(n)&&i.push("- "+n+" "+t[n]);return e(c("#","wp-info")).html('<textarea class="regular-text code" rows="'+i.length+'">'+i.join("\n")+"</textarea>").find("textarea").select(),!1})}),e('select[name^="'+d+'"]').on("change",function(){var t,n,i,a=e(this);return t=a,i=c(".","desc"),t.next(i).empty(),(n=t.children("option:selected").data("desc"))&&t.next(i).html(e.parseHTML(n)),w(a,a,d),!1}).change(),e(c(".","icon-cycle")).on("click",function(){var t,n=e(this).nextAll("li"),i=n.find(c("@","exception_admin")),a=n.find("input:checkbox").filter(":visible"),o=a.filter(":checked").length;return a.prop("checked",!o),i.length&&(o?i.val(""):(t=[],a.each(function(n,i){t.push(e(i).val())}),i.val(t.join(",")))),e(this).blur(),!1}),e(c(".","settings-folding>dfn")).on("click",function(){var t=c("drop"),n=e(this).parent();return n.children(c(".","hide")).toggle(),n.toggleClass(t+"up").toggleClass(t+"down"),n.hasClass(t+"up")&&n.children("div").hide(),!1}),e("#submit").on("click",function(){var t=e(c("@","signature")),n=t.val();return-1!==n.indexOf(",")&&t.val(_(n)),!0});break;case 1:I(a);var u=0;e(c("#","sort-slug")).on("click",function(){var t=e(this).closest("ol"),n=t.children("li");(u=!u)?n.sort(function(t,n){return e(t).text()>e(n).text()}):n.sort(function(t,n){return Number(e(t).text().replace(/^.*\((\d+)\)$/,"$1"))<=Number(e(n).text().replace(/^.*\((\d+)\)$/,"$1"))}),t.children("li").remove(),n.appendTo(t)}),e(c("@","clear_statistics")).on("click",function(){return p(r.msg[0],function(){m("statistics",null)}),!1}),e(c("@","clear_logs")).on("click",function(){return p(r.msg[0],function(){m("logs",null)}),!1}),L(a,{tableID:"statistics-cache",ajaxCMD:"restore-cache",sectionID:"section-2",targetColumn:4,columnIP:1,columnAS:3},{columns:[{title:'<input type="checkbox">'},{title:r.i18n[3]},{title:r.i18n[4]},{title:r.i18n[5]},{title:r.i18n[6]},{title:r.i18n[7]},{title:r.i18n[8]},{title:r.i18n[9]}],columnDefs:[{responsivePriority:0,targets:0},{responsivePriority:1,targets:1},{responsivePriority:2,targets:2},{responsivePriority:6,targets:3},{responsivePriority:7,targets:4},{responsivePriority:3,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{className:"all",targets:[0,1,2,5]}]},o),j("export-cache"),e(c("#","export-cache")).on("click",function(){return e(c("#","export-form")).submit(),!1});break;case 4:var y={tableID:"validation-logs",sectionID:"section-0",targetColumn:6,columnIP:3,columnAS:5},O={columns:[{title:'<input type="checkbox">'},{title:""},{title:r.i18n[10]},{title:r.i18n[3]},{title:r.i18n[4]},{title:r.i18n[5]},{title:r.i18n[7]},{title:r.i18n[11]},{title:r.i18n[12]},{title:r.i18n[13]},{title:r.i18n[14]},{title:r.i18n[15]}],columnDefs:[{responsivePriority:11,targets:0},{responsivePriority:0,targets:1},{responsivePriority:1,targets:2},{responsivePriority:2,targets:3},{responsivePriority:3,targets:4},{responsivePriority:6,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{responsivePriority:7,targets:8},{responsivePriority:8,targets:9},{responsivePriority:9,targets:10},{responsivePriority:10,targets:11},{visible:!1,targets:1},{className:"all",targets:[0,2,3,4]},{className:"none",targets:[8,9,10,11]}]},R=null,M=null,z=e(c("#","live-loading")),E=null,$=function(){R&&(t.clearTimeout(R),R=null),M&&(z.removeClass(c("live-timer")),t.clearTimeout(M),M=null)},J=function(){$(),v("live-loading",{cmd:"live-start"},function(e){if(e.error)h(null,e.error);else if(e.data.length){var n,i=e.data.length;for(n=0;n<i;n++)E.row.add(e.data[n]);E.draw(!1)}R=t.setTimeout(J,1e3*r.interval)})},B=function(e,t){$(),v(null,{cmd:e||"live-stop",callback:t})},q=c(""),H=function(t,n,i){-1===n[7].indexOf("pass")?e(t).addClass(q+i+"blocked"):e(t).addClass(q+i+"passed")},V=e(c("#","live-log")),G=e(c("#","live-update"));e(c("#","validation-logs")).on("animationend",function(){return e(this).find('tr[class*="'+q+'new"]').each(function(){var t=e(this);-1!==t.prop("class").indexOf("passed")?t.addClass(q+"passed").removeClass(q+"new-passed"):t.addClass(q+"blocked").removeClass(q+"new-blocked")}),!1}),V.on("change",function(){switch(e('input[name="'+c("live-log")+'"]:checked').val()){case"start":J();break;case"pause":B("live-pause",function(){z.addClass(c("live-timer")),M=t.setTimeout(function(){$(),e(c("#","live-log-stop")).prop("checked",!0)},1e3*r.timeout)});break;case"stop":B()}}),G.on("change",function(){var t=V.closest("tr"),n=G.prop("checked");return o[a][1]=n?"o":"x",N(o),E&&E.clear().destroy(),n?(t.show().next().next().next().nextAll().hide(),y.ajaxCMD="live-stop",O.order=[1,"desc"],O.createdRow=function(e,t){H(e,t,"new-")}):(t.hide().next().next().next().nextAll().show(),y.ajaxCMD="restore-logs",O.order=[0,""],O.createdRow=function(e,t){H(e,t,"")}),e(c("#","live-log-stop")).trigger("click"),E=L(a,y,O,o),!1}).trigger("change"),e(c("#","logs-preset")).on("click","a",function(){var t=e(this).data("value");return e(c("@","search_filter")).val(t),E.search(t,!1,!0,!/[A-Z]/.test(t)).draw(),!1}),j("export-logs"),e(c("#","export-logs")).on("click",function(){return e(c("#","export-form")).submit(),!1});break;case 2:e(t).on(c("gmap-error"),function(){v(null,{cmd:"gmap-error"},function(e){g(e.page,e.tab)})});var U=e(c("#","map"));"object"==typeof t.google?U.each(function(){e(this).GmapRS()}):U.each(function(){e(this).empty().html('<iframe src="'+r.altgmap+'?output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')});O=[];e('select[id^="'+c("!","service")+'"]').on("change",function(){e(this).children("option").each(function(t,n){O[e(n).text()]=t,o[a][3+t]=e(n).prop("selected")?"o":"x"}),"o"!==o[a][3+(Number(o[a][2])||0)]&&(o[a][2]=e(this).prop("selectedIndex")),N(o)}).change(),e(c("@","get_location")).on("click",function(){var n,i=e(c("#","whois")),l=e(c("#","apis")),d=e(c("@","service")).val(),u=e.trim(e(c("@","ip_address")).val());if(u&&d){if(e(c("@","anonymize")).prop("checked")){if(/[^0-9a-f\.:]/.test(u))return h(null,"illegal format."),!1;-1!==u.indexOf(".")?u=u.replace(/\.\w+$/,".0"):(-1===(u=(u=u.split(":")).splice(0,4).join(":")).indexOf("::")&&(u+="::"),u=u.replace(/:{3,}/,"::")),e(c("@","ip_address")).val(u)}i.hide().empty(),l.hide().empty(),n=e.whois(u,function(t){var n,r="";for(n=0;n<t.length;++n)r+="<tr><td>"+t[n].name+"</td><td>"+t[n].value+"</td></tr>";i.html('<fieldset id="'+c("section-1")+'" class="'+c("field")+' panel panel-default" data-section="1"><legend class="panel-heading"><h3 id="'+c("whois-title")+'" class="'+c("dropdown")+'">Whois</h3></legend><div class="panel-body '+c("border")+'"><table class="'+c("table")+'">'+r+"</table></div></fieldset>").fadeIn("slow"),"x"===o[a][1]&&e(c("#","whois-title")).trigger("click")}),v("loading",{cmd:"search",ip:u,which:d},function(n){var i,d="",p=Number(o[a][2])||0;for(i in n)n.hasOwnProperty(i)&&(d+='<a href="#!" class="nav-tab'+(O[i]===p?" nav-tab-active":"")+'" data-index="'+O[i]+"\" data-api='"+s(JSON.stringify(n[i]))+"'>"+i+"</a>");l.html('<div class="nav-tab-wrapper">'+d+'</div><div id="ip-geo-block-geoinfo"></div>').fadeIn("slow").on("click","a",function(){var n,i=e(this),l=e(this).data("api"),d="",p=s(l.latitude||"0"),h=s(l.longitude||"0"),f=l.latitude||l.longitude?7:2;for(n in i.parent().children("a").removeClass("nav-tab-active"),i.addClass("nav-tab-active"),o[a][2]=i.data("index"),N(o),l)l.hasOwnProperty(n)&&(n=s(n),d+='<li><span class="'+c("title")+'">'+n+' : </span><span class="'+c("result")+'">'+s(l[n])+"</span></li>");"object"==typeof t.google?U.GmapRS("deleteMarkers").GmapRS("addMarker",{latitude:p,longitude:h,title:u,content:"<ul>"+d+"</ul>",show:!0,zoom:f}):(U.empty().html('<iframe src="'+r.altgmap+"?q="+p+","+h+"&z="+f+'&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>'),e(c("#","geoinfo")).html("<ul>"+d+"</ul>"))}).find(".nav-tab-active").trigger("click")},[n])}return!1}),e(c("@","ip_address")).on("keypress",function(t){if(t.which&&13===t.which||t.keyCode&&13===t.keyCode)return e(c("@","get_location")).click(),!1}),e(c("@","ip_address")).val()&&e(c("@","get_location")).click();break;case 5:I(a),e("input[name="+c("duration")+"]:radio").on("click",function(){var t=e('div[class*="paginate"]').find('a[class*="current"]').text();o[a][2]=e(this).val()||0,o[a][3]=o[a][3]||2,o[a][4]=o[a][4]||1,N(o),A.ajaxStacked(o[a][2],o[a][3],o[a][4],t-1)}),e(c("#","open-new")).on("change",function(){var t=e(this).prop("checked");o[a][1]=t?"o":"x",N(o),e(c("#","section-0 svg")).find("a").each(function(){this.setAttribute("target",t?"_blank":"_self")})}),e(c("#","apply-layout")).on("click",function(){var t=e(c("#","select-layout"));o[a][3]=t.find('select[name="rows"] option:selected').val(),o[a][4]=t.find('select[name="cols"] option:selected').val(),N(o)}),e("ul.wp-submenu>li.wp-first-item").removeClass("current").next().addClass("current")}})}(jQuery,window,document);
|
admin/js/authenticate.js
CHANGED
@@ -5,8 +5,6 @@
|
|
5 |
* This software is released under the MIT License.
|
6 |
*/
|
7 |
(function ($, window, document) {
|
8 |
-
'use strict';
|
9 |
-
|
10 |
var auth = IP_GEO_BLOCK_AUTH, wpzep = {
|
11 |
init: false,
|
12 |
name: 'ip-geo-block-auth-nonce'
|
5 |
* This software is released under the MIT License.
|
6 |
*/
|
7 |
(function ($, window, document) {
|
|
|
|
|
8 |
var auth = IP_GEO_BLOCK_AUTH, wpzep = {
|
9 |
init: false,
|
10 |
name: 'ip-geo-block-auth-nonce'
|
admin/js/authenticate.min.js
CHANGED
@@ -1,6 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*
|
2 |
-
|
3 |
-
Copyright (c) 2013
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Project: WP-ZEP - Zero-day exploit Prevention for wp-admin
|
3 |
+
* Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
|
4 |
+
* This software is released under the MIT License.
|
5 |
+
*/
|
6 |
+
!function(e,t,n){var r=IP_GEO_BLOCK_AUTH,o={init:!1,name:"ip-geo-block-auth-nonce"},a=new RegExp("^(?:"+(r.home||"")+r.admin+"|"+(r.home||"")+r.plugins+"|"+(r.home||"")+r.themes+")(?:.*.php|.*/)?$"),i=function(e){for(var t=e.length;t-- >0;)if(-1!==e[t].indexOf("request%5Bbrowse%5D=ip-geo-block-auth")){e[t]="request%5Bbrowse%5D=featured";break}return e},h={"upload.php":function(e){for(var t=e.length;t-- >0;)if(-1!==e[t].indexOf("query%5Bip-geo-block-auth-nonce%5D=")){delete e[t];break}return e},"theme-install.php":i,"network/theme-install.php":i};function c(e){var t=(e=e?e.toString():"").match(/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return{scheme:t[1]||"",relative:t[2]||"",authority:t[3]||"",path:t[4]||"",query:t[5]||"",fragment:t[6]||""}}var s,l=function(){var e=null;try{new URL("/","http://example.com/")}catch(t){try{e=(new DOMParser).parseFromString("<html><head></head><body></body></html>","text/html")}catch(t){e=n.implementation.createHTMLDocument("")}}return function(r,o){var a,i,h,c=n;if(r=void 0!==r?r:t.location.href,null===e){void 0===o&&(o=t.location.href);try{h=new URL(r,o)}catch(e){h=new URL(r,t.location.href)}}else{if(void 0!==o){for(c=e;c.head.firstChild;)c.head.removeChild(c.head.firstChild);(a=c.createElement("base")).setAttribute("href",o),c.head.appendChild(a)}(i=c.createElement("a")).setAttribute("href",r),i.setAttribute("href",i.href),"http:"===(h={protocol:i.protocol,host:i.host,hostname:i.hostname,port:i.port,pathname:i.pathname,search:i.search,hash:i.hash,href:i.href,username:"",password:"",origin:i.origin||null}).protocol&&"80"===h.port?(h.port="",h.host=h.host.replace(/:80$/,"")):"https:"===h.protocol&&"443"===h.port&&(h.port="",h.host=h.host.replace(/:443$/,"")),"http:"!==h.protocol&&"https:"!==h.protocol||(h.pathname&&"/"!==h.pathname.charAt(0)&&(h.pathname="/"+h.pathname),h.origin||(h.origin=h.protocol+"//"+h.hostname+(h.port?":"+h.port:"")))}if(h.username||h.password)throw new URIError(h.username+":"+h.password);return h}}();function p(e,n){"object"!=typeof e&&(e=c(e||t.location.href));for(var r=e.query?e.query.split("&"):[],a=r.length;a-- >0;)if(0===r[a].indexOf(o.name)){r.splice(a,1);break}return r.push(o.name+"="+encodeURIComponent(n)),e.query=r.join("&"),function(e){return(e.scheme?e.scheme+":":"")+(e.relative+e.path)+(e.query?"?"+e.query:"")+(e.fragment?"#"+e.fragment:"")}(e)}function f(e){return(!e.scheme||/^https?$/.test(e.scheme))&&(e.path||e.query)}function u(e){try{e=e||t.location.pathname||""}catch(t){e=""}var n=c(e.toLowerCase());if(f(n)){if((n=l(e)).origin!==t.location.origin)return-1;if((e=a.exec(n.pathname))&&(0<=e[0].indexOf(r.admin+"admin-")||0<=e[0].indexOf(r.admin)||0<=e[0].indexOf(r.plugins)||0<=e[0].indexOf(r.themes)))return 1}return 0}function m(e){return/\/$/.test(e.path)}function d(e){return-1!==(e.attr("rel")||"").indexOf("nofollow")}
|
7 |
/*
|
8 |
+
* jQuery.bind-first library v0.2.3 (jquery >= 1.7)
|
9 |
+
* Copyright (c) 2013 Vladimir Zhuravlev
|
10 |
+
*
|
11 |
+
* Released under MIT License
|
12 |
+
* @license https://github.com/private-face/jquery.bind-first
|
13 |
+
*
|
14 |
+
* Date: Thu Feb 6 10:13:59 ICT 2014
|
15 |
+
*/
|
16 |
+
function v(t,n,r){var o=e._data(t[0]).events[n],a=r?o.splice(o.delegateCount-1,1)[0]:o.pop();o.splice(r?0:o.delegateCount||0,0,a)}function g(t,n,r){var o=n.split(/\s+/);t.each(function(t){for(t=0;t<o.length;++t){var n=e.trim(o[t]).match(/[^\.]+/i)[0];v(e(this),n,r)}})}function w(){if(!o.init){if(o.init=!0,e("img").each(function(){var t=e(this).attr("src");1===u(t)&&e(this).attr("src",p(t,r.nonce))}),void 0!==t._wpRevisionsSettings){var n,a=t._wpRevisionsSettings.revisionData,i=a.length;for(n=0;n<i;++n)-1===a[n].restoreUrl.indexOf(o.name)&&(t._wpRevisionsSettings.revisionData[n].restoreUrl=p(a[n].restoreUrl,r.nonce))}e("#toplevel_page_ip-geo-block li.wp-first-item").each(function(){var t=e(this);t.css("display","IP Geo Block"===t.children("a").text()?"none":"block")})}}e.ajaxPrefilter(function(e){if(1===u(e.url)&&!e.url.match(/async-upload\.php$/))if(void 0!==t.FormData&&e.data instanceof FormData)e.data.append(o.name,r.nonce);else{var n,a,i=c(e.url);void 0===e.data||i.query?e.url=p(i,r.nonce):(n=e.data?e.data.split("&"):[],s=(s=t.location.pathname).replace(r.home+r.admin,""),(a=h.hasOwnProperty(s)?h[s]:null)&&(n=a(n)),n.push(o.name+"="+encodeURIComponent(r.nonce)),e.data=n.join("&"))}var s}),void 0===e.fn.onFirst&&(e.fn.onFirst=function(t,n){var r,o=e(this),a="string"==typeof n;if(e.fn.on.apply(o,arguments),"object"==typeof t)for(r in t)t.hasOwnProperty(r)&&g(o,r,a);else"string"==typeof t&&g(o,t,a);return o}),e(t).on("error",function(){w()}),e(function(){w()}),(s=e(n)).onFirst("click contextmenu","a",function(a){var i,h,s=0,l=e(this),v=l.attr("href")||"",g=c(v);if(f(g)&&(s=u(v)),"click"===a.type)if(1===s)l.attr("href",m(g)?v:p(v,d(l)?"nofollow":r.nonce));else if(-1===s&&(1===u(t.location.pathname)||t.location.search.indexOf(o.name)>=0))if("_self"===l.attr("target")||function(e){var t,n,o=r.sites.length;for(t=0;t<o;++t)if(0<=(n=e.indexOf(r.sites[t]+"/"))&&n<=6)return!0;return!1}(v))l.attr("href",m(g)?v:p(v,d(l)?"nofollow":r.nonce));else if(!this.hasAttribute("onClick"))return v=v.split(";",2).shift(),i=decodeURIComponent(this.href),(h=n.createElement("div")).appendChild(n.createTextNode(i)),i=h.innerHTML.replace(/["']/g,function(e){return{'"':""","'":"'"}[e]}),h="",v=i,(s=t.open()).document.write('<!DOCTYPE html><html><head><meta name="referrer" content="never" /><meta name="referrer" content="no-referrer" /><meta http-equiv="refresh" content="0; url='+v+'" />'+(e("body").hasClass("webview")?'<script>window.location.replace("'+v+'")<\/script>':"")+"</head></html>"),s.document.close(),a.stopImmediatePropagation(),!1}),s.onFirst("submit","form",function(){var t=e(this),n=t.attr("action");1===u(n)&&("post"===(t.attr("method")||"").toLowerCase()?t.attr("action",p(n,r.nonce)):t.append('<input type="hidden" name="'+o.name+'" value="'+r.nonce+'">'))})}(jQuery,window,document);
|
admin/js/gmap.js
CHANGED
@@ -7,12 +7,10 @@
|
|
7 |
*/
|
8 |
// https://developers.google.com/maps/documentation/javascript/events?hl=en#auth-errors
|
9 |
function gm_authFailure() {
|
10 |
-
'use strict';
|
11 |
jQuery(window).trigger('ip-geo-block-gmap-error');
|
12 |
}
|
13 |
|
14 |
(function ($) {
|
15 |
-
'use strict';
|
16 |
$(function ($) {
|
17 |
if ('undefined' === typeof google) {
|
18 |
return;
|
@@ -56,6 +54,9 @@ function gm_authFailure() {
|
|
56 |
this.m.setZoom(j || this.o.zoom);
|
57 |
return this.e;
|
58 |
},
|
|
|
|
|
|
|
59 |
showMarker: function (l, k) {
|
60 |
var j = this.q[l];
|
61 |
if (j && j.w) {
|
7 |
*/
|
8 |
// https://developers.google.com/maps/documentation/javascript/events?hl=en#auth-errors
|
9 |
function gm_authFailure() {
|
|
|
10 |
jQuery(window).trigger('ip-geo-block-gmap-error');
|
11 |
}
|
12 |
|
13 |
(function ($) {
|
|
|
14 |
$(function ($) {
|
15 |
if ('undefined' === typeof google) {
|
16 |
return;
|
54 |
this.m.setZoom(j || this.o.zoom);
|
55 |
return this.e;
|
56 |
},
|
57 |
+
getZoom: function () {
|
58 |
+
return this.m.getZoom();
|
59 |
+
},
|
60 |
showMarker: function (l, k) {
|
61 |
var j = this.q[l];
|
62 |
if (j && j.w) {
|
admin/js/gmap.min.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
|
2 |
-
Project: GmapRS - google map for WordPress IP Geo Block
|
3 |
-
Description: A really simple google map plugin based on jQuery-boilerplate.
|
4 |
-
Version: 0.2.4
|
5 |
-
Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
|
6 |
-
This software is released under the MIT License.
|
7 |
-
*/
|
8 |
-
function gm_authFailure(){jQuery(window).trigger("ip-geo-block-gmap-error")}(function(
|
1 |
+
/*!
|
2 |
+
* Project: GmapRS - google map for WordPress IP Geo Block
|
3 |
+
* Description: A really simple google map plugin based on jQuery-boilerplate.
|
4 |
+
* Version: 0.2.4
|
5 |
+
* Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
|
6 |
+
* This software is released under the MIT License.
|
7 |
+
*/
|
8 |
+
function gm_authFailure(){jQuery(window).trigger("ip-geo-block-gmap-error")}jQuery(function(t){if("undefined"!=typeof google){var e="GmapRS",i="plugin_"+e,o={zoom:2,latitude:0,longitude:0},n=google.maps,s=function(e){this.o=t.extend({},o),this.q=[]};s.prototype={init:function(e){t.extend(this.o,e),this.c=new n.LatLng(this.o.latitude,this.o.longitude),this.m=new n.Map(this.e.get(0),{zoom:this.o.zoom,center:this.c,mapTypeId:n.MapTypeId.ROADMAP})},destroy:function(){this.deleteMarkers(),this.e.data(i,null)},setCenter:function(){if(arguments.length>=2){var t=new n.LatLng(this.o.latitude=arguments[0],this.o.longitude=arguments[1]);delete this.c,this.c=t}return this.m.setCenter(this.c),this.e},setZoom:function(t){return this.m.setZoom(t||this.o.zoom),this.e},getZoom:function(){return this.m.getZoom()},showMarker:function(t,e){var i=this.q[t];i&&i.w&&(!1===e?i.w.close():i.w.open(this.m,i.m))},addMarker:function(t){var e,i,o;return e=new n.LatLng(t.latitude||this.o.latitude,t.longitude||this.o.longitude),i=new n.Marker({position:e,map:this.m,title:t.title||""}),t.content&&(o=new n.InfoWindow({content:t.content}),n.event.addListener(i,"click",function(){o.open(i.getMap(),i)})),this.q.push({p:e,w:o,m:i}),this.m.setCenter(e),this.m.setZoom(t.zoom),t.show&&this.showMarker(this.q.length-1),this.e},deleteMarkers:function(){var t;for(t in this.q)this.q.hasOwnProperty(t)&&this.q[t].m.setMap(null);return this.q.length=0,this.e}},t.fn[e]=function(o){var n,r;if(this.data(i)instanceof s||this.data(i,new s(this)),(r=this.data(i)).e=this,void 0===o||"object"==typeof o)"function"==typeof r.init&&r.init(o);else{if("string"==typeof o&&"function"==typeof r[o])return n=Array.prototype.slice.call(arguments,1),r[o].apply(r,n);t.error("Method "+o+" does not exist."+e)}}}});
|
admin/js/whois.js
CHANGED
@@ -14,8 +14,6 @@
|
|
14 |
* @link https://github.com/RIPE-NCC/whois/wiki/WHOIS-REST-API-search
|
15 |
*/
|
16 |
(function ($) {
|
17 |
-
'use strict';
|
18 |
-
|
19 |
$.extend({
|
20 |
whois: function (query, callback) {
|
21 |
/**
|
@@ -28,7 +26,7 @@
|
|
28 |
// app = 'https://apps.db.ripe.net/search/lookup.html?source=%SRC%&key=%KEY%&type=%TYPE%';
|
29 |
|
30 |
function escapeHTML(str) {
|
31 |
-
return str ? str.toString().replace(/[&<>"']/g, function (match) {
|
32 |
return {
|
33 |
'&': '&',
|
34 |
'<': '<',
|
@@ -46,7 +44,7 @@
|
|
46 |
})
|
47 |
|
48 |
.done(function (data, textStatus, jqXHR) {
|
49 |
-
//
|
50 |
function traverse(key, value) {
|
51 |
if (value && typeof value === 'object') {
|
52 |
if (value.errormessage) {
|
@@ -79,12 +77,16 @@
|
|
79 |
|
80 |
if (value.link) {
|
81 |
if ((value['referenced-type'] || false) && 'aut-num' === value['referenced-type']) {
|
82 |
-
value.value += ' [ <a href="
|
83 |
} else {
|
84 |
value.value = '<a href="' + escapeHTML(value.link.href) + '.json" target=_blank>' + escapeHTML(value.value) + '</a>';
|
85 |
}
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
88 |
else if ('remarks' === value.name) {
|
89 |
value.value = escapeHTML(value.value);
|
90 |
value.value = value.value.replace(/(https?:\/\/[^\s]+)/gi, '<a href="$1" target=_blank>$1</a>');
|
14 |
* @link https://github.com/RIPE-NCC/whois/wiki/WHOIS-REST-API-search
|
15 |
*/
|
16 |
(function ($) {
|
|
|
|
|
17 |
$.extend({
|
18 |
whois: function (query, callback) {
|
19 |
/**
|
26 |
// app = 'https://apps.db.ripe.net/search/lookup.html?source=%SRC%&key=%KEY%&type=%TYPE%';
|
27 |
|
28 |
function escapeHTML(str) {
|
29 |
+
return str ? str.toString().replace(/[&<>"']/g, function (match) { //'"
|
30 |
return {
|
31 |
'&': '&',
|
32 |
'<': '<',
|
44 |
})
|
45 |
|
46 |
.done(function (data, textStatus, jqXHR) {
|
47 |
+
// https://stackoverflow.com/questions/722668/traverse-all-the-nodes-of-a-json-object-tree-with-javascript#answer-722676
|
48 |
function traverse(key, value) {
|
49 |
if (value && typeof value === 'object') {
|
50 |
if (value.errormessage) {
|
77 |
|
78 |
if (value.link) {
|
79 |
if ((value['referenced-type'] || false) && 'aut-num' === value['referenced-type']) {
|
80 |
+
value.value += ' [ <a href="https://ipinfo.io/' + escapeHTML(value.value) + '" target=_blank>Search on ipinfo.io</a> ]';
|
81 |
} else {
|
82 |
value.value = '<a href="' + escapeHTML(value.link.href) + '.json" target=_blank>' + escapeHTML(value.value) + '</a>';
|
83 |
}
|
84 |
}
|
85 |
|
86 |
+
else if (value.value.match(/^AS\d+$/)) {
|
87 |
+
value.value += ' [ <a href="https://ipinfo.io/' + escapeHTML(value.value) + '" target=_blank>Search on ipinfo.io</a> ]';
|
88 |
+
}
|
89 |
+
|
90 |
else if ('remarks' === value.name) {
|
91 |
value.value = escapeHTML(value.value);
|
92 |
value.value = value.value.replace(/(https?:\/\/[^\s]+)/gi, '<a href="$1" target=_blank>$1</a>');
|
admin/js/whois.min.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
|
2 |
-
Project: whois.js - get whois infomation
|
3 |
-
Description: A jQuery plugin to get whois infomation from RIPE NCC database.
|
4 |
-
Version: 0.1
|
5 |
-
Copyright (c) 2016 tokkonopapa (tokkonopapa@yahoo.com)
|
6 |
-
This software is released under the MIT License.
|
7 |
-
*/
|
8 |
-
|
1 |
+
/*!
|
2 |
+
* Project: whois.js - get whois infomation
|
3 |
+
* Description: A jQuery plugin to get whois infomation from RIPE NCC database.
|
4 |
+
* Version: 0.1
|
5 |
+
* Copyright (c) 2016 tokkonopapa (tokkonopapa@yahoo.com)
|
6 |
+
* This software is released under the MIT License.
|
7 |
+
*/
|
8 |
+
!function(e){e.extend({whois:function(a,r){var t=[];function n(e){return e?e.toString().replace(/[&<>"']/g,function(e){return{"&":"&","<":"<",">":">",'"':""","'":"'"}[e]}):""}return e.ajax({url:'https://query.yahooapis.com/v1/public/yql?q=select * from xml where url="%URL%"&format=json&jsonCompat=new'.replace(/%URL%/,"https://rest.db.ripe.net/search%3fflags=no-filtering%26flags=resource%26query-string="+a),method:"GET",dataType:"json"}).done(function(a,r,u){var l,o=a.query.results,i=[];for(l in o)if(o.hasOwnProperty(l)){i=o[l];break}!function a(r,u){if(u&&"object"==typeof u)if(u.errormessage){var l=u.errormessage,o=l.text.split(/\n+/);t.push({name:n(l.severity),value:n(o[1].replace(/%s/,l.args.value))})}else u.href?(u.href=n(u.href),t.push({name:n(r),value:'<a href="'+u.href+'.json" target=_blank>'+u.href+"</a>"})):u.name&&u.value?(u.link?u["referenced-type"]&&"aut-num"===u["referenced-type"]?u.value+=' [ <a href="https://ipinfo.io/'+n(u.value)+'" target=_blank>Search on ipinfo.io</a> ]':u.value='<a href="'+n(u.link.href)+'.json" target=_blank>'+n(u.value)+"</a>":u.value.match(/^AS\d+$/)?u.value+=' [ <a href="https://ipinfo.io/'+n(u.value)+'" target=_blank>Search on ipinfo.io</a> ]':"remarks"===u.name&&(u.value=n(u.value),u.value=u.value.replace(/(https?:\/\/[^\s]+)/gi,'<a href="$1" target=_blank>$1</a>')),t.push({name:n(u.name),value:u.value})):"primary-key"!==r&&e.each(u,function(e,r){a(e,r)})}(null,i)}).fail(function(e,a,r){t.push({name:n(a),value:n(r)})}).always(function(){t.push({name:"copyright",value:'<a href="https://apps.db.ripe.net/search/query.html" title="Database Query - RIPE Network Coordination Centre">RIPE NCC</a>'}),r&&r(t)})}})}(jQuery);
|
classes/class-ip-geo-block-actv.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
classes/class-ip-geo-block-apis.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
@@ -84,7 +84,7 @@ abstract class IP_Geo_Block_API {
|
|
84 |
// build query
|
85 |
$tmp = self::build_url( $ip, $template );
|
86 |
|
87 |
-
//
|
88 |
$res = @wp_remote_get( $tmp, $args ); // @since 2.7
|
89 |
if ( is_wp_error( $res ) )
|
90 |
return array( 'errorMessage' => $res->get_error_message() );
|
@@ -232,7 +232,7 @@ class IP_Geo_Block_API_Ipdataco extends IP_Geo_Block_API {
|
|
232 |
* URL : https://ipstack.com/
|
233 |
* Term of use : https://ipstack.com/terms
|
234 |
* Licence fee : free for registered user
|
235 |
-
* Rate limit : 10,000 queries per month
|
236 |
* Sample URL : http://api.ipstack.com/186.116.207.169?access_key=YOUR_ACCESS_KEY&output=json&legacy=1
|
237 |
* Input type : IP address (IPv4, IPv6) / domain name
|
238 |
* Output type : json, xml
|
@@ -240,7 +240,7 @@ class IP_Geo_Block_API_Ipdataco extends IP_Geo_Block_API {
|
|
240 |
class IP_Geo_Block_API_ipstack extends IP_Geo_Block_API {
|
241 |
protected $template = array(
|
242 |
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
|
243 |
-
'url' => 'http://api.ipstack.com/%API_IP%?access_key=%API_KEY%&output=%API_FORMAT
|
244 |
'api' => array(
|
245 |
'%API_FORMAT%' => 'json',
|
246 |
),
|
@@ -305,7 +305,7 @@ class IP_Geo_Block_API_ipinfoio extends IP_Geo_Block_API {
|
|
305 |
/**
|
306 |
* Class for Nekudo
|
307 |
*
|
308 |
-
* URL :
|
309 |
* Term of use : https://nekudo.com/blog/new-project-shiny-geoip
|
310 |
* Licence fee : free to use the API
|
311 |
* Rate limit : none
|
@@ -406,15 +406,15 @@ class IP_Geo_Block_API_ipapicom extends IP_Geo_Block_API {
|
|
406 |
* Term of use :
|
407 |
* Licence fee : free (need to regist to get API key)
|
408 |
* Rate limit : 2 queries/second for registered user
|
409 |
-
* Sample URL :
|
410 |
-
* Sample URL :
|
411 |
* Input type : IP address (IPv4, IPv6) / domain name
|
412 |
* Output type : json, xml
|
413 |
*/
|
414 |
class IP_Geo_Block_API_IPInfoDB extends IP_Geo_Block_API {
|
415 |
protected $template = array(
|
416 |
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
|
417 |
-
'url' => '
|
418 |
'api' => array(
|
419 |
'%API_FORMAT%' => 'xml',
|
420 |
'%API_OPTION%' => 'ip-city',
|
@@ -456,7 +456,7 @@ class IP_Geo_Block_API_Cache extends IP_Geo_Block_API {
|
|
456 |
|
457 |
if ( $cache ) {
|
458 |
$fail = $cache['fail'] + ( 'failed' === $validate['result'] ? 1 : 0 );
|
459 |
-
$call = $cache['
|
460 |
$last = $cache['last'];
|
461 |
$view = $cache['view'];
|
462 |
} else { // if new cache then reset these values
|
@@ -481,14 +481,16 @@ class IP_Geo_Block_API_Cache extends IP_Geo_Block_API {
|
|
481 |
'asn' => $validate['asn' ], // @since 3.0.4
|
482 |
'code' => $validate['code'],
|
483 |
'auth' => $validate['auth'], // get_current_user_id() > 0
|
484 |
-
'fail' => $validate['auth'] ? 0 : $fail,
|
485 |
-
'
|
486 |
'last' => $last,
|
487 |
'view' => $view,
|
488 |
'host' => isset( $validate['host'] ) && $validate['host'] !== $ip ? $validate['host'] : '',
|
489 |
);
|
490 |
|
491 |
-
|
|
|
|
|
492 |
|
493 |
return self::$memcache[ $ip ] = $cache;
|
494 |
}
|
@@ -527,13 +529,13 @@ class IP_Geo_Block_Provider {
|
|
527 |
'ipinfo.io' => array(
|
528 |
'key' => NULL,
|
529 |
'type' => 'IPv4, IPv6 / free',
|
530 |
-
'link' => '<a rel="noreferrer" href="https://ipinfo.io/" title="IP Address API and Data Solutions">https://ipinfo.io/</a> (IPv4, IPv6 / free)',
|
531 |
),
|
532 |
|
533 |
'Nekudo' => array(
|
534 |
'key' => NULL,
|
535 |
'type' => 'IPv4, IPv6 / free',
|
536 |
-
'link' => '<a rel="noreferrer" href="
|
537 |
),
|
538 |
|
539 |
'GeoIPLookup' => array(
|
@@ -551,7 +553,7 @@ class IP_Geo_Block_Provider {
|
|
551 |
'Ipdata.co' => array(
|
552 |
'key' => '',
|
553 |
'type' => 'IPv4, IPv6 / free',
|
554 |
-
'link' => '<a rel="noreferrer" href="https://ipdata.co/" title="ipdata.co - IP Geolocation and Threat Data API">https://ipdata.co/</a> (IPv4, IPv6 / up to 1500 requests daily
|
555 |
),
|
556 |
|
557 |
'ipstack' => array(
|
@@ -584,11 +586,11 @@ class IP_Geo_Block_Provider {
|
|
584 |
self::$internals += $api;
|
585 |
}
|
586 |
|
587 |
-
public static function get_addons( $providers = array() ) {
|
588 |
$apis = array();
|
589 |
|
590 |
foreach ( self::$internals as $key => $val ) {
|
591 |
-
if ( 'Cache' !== $key && ( ! isset( $providers[ $key ] ) || ! empty( $providers[ $key ] ) ) )
|
592 |
$apis[] = $key;
|
593 |
}
|
594 |
|
@@ -638,31 +640,6 @@ class IP_Geo_Block_Provider {
|
|
638 |
return $list;
|
639 |
}
|
640 |
|
641 |
-
/**
|
642 |
-
* Check status of provider selection
|
643 |
-
*
|
644 |
-
*/
|
645 |
-
public static function diag_providers( $settings = NULL ) {
|
646 |
-
if ( ! $settings ) {
|
647 |
-
$settings = IP_Geo_Block::get_option();
|
648 |
-
$settings = $settings['providers'];
|
649 |
-
}
|
650 |
-
|
651 |
-
$field = 0;
|
652 |
-
foreach ( self::get_providers( 'key' ) as $key => $val ) {
|
653 |
-
if ( ( NULL === $val && ! isset( $settings[ $key ] ) ) ||
|
654 |
-
( FALSE === $val && ! empty( $settings[ $key ] ) ) ||
|
655 |
-
( is_string( $val ) && ! empty( $settings[ $key ] ) ) ) {
|
656 |
-
++$field;
|
657 |
-
}
|
658 |
-
}
|
659 |
-
|
660 |
-
if ( 0 === $field )
|
661 |
-
return __( 'You need to select at least one IP Geolocation API. Otherwise <strong>you\'ll be blocked</strong> after the cache expires.', 'ip-geo-block' );
|
662 |
-
|
663 |
-
return NULL;
|
664 |
-
}
|
665 |
-
|
666 |
}
|
667 |
|
668 |
/**
|
@@ -671,26 +648,26 @@ class IP_Geo_Block_Provider {
|
|
671 |
*/
|
672 |
if ( class_exists( 'IP_Geo_Block', FALSE ) ) {
|
673 |
|
674 |
-
//
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
}
|
695 |
}
|
696 |
}
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
84 |
// build query
|
85 |
$tmp = self::build_url( $ip, $template );
|
86 |
|
87 |
+
// https://codex.wordpress.org/Function_Reference/wp_remote_get
|
88 |
$res = @wp_remote_get( $tmp, $args ); // @since 2.7
|
89 |
if ( is_wp_error( $res ) )
|
90 |
return array( 'errorMessage' => $res->get_error_message() );
|
232 |
* URL : https://ipstack.com/
|
233 |
* Term of use : https://ipstack.com/terms
|
234 |
* Licence fee : free for registered user
|
235 |
+
* Rate limit : 10,000 queries per month for free (https can be available for premium users)
|
236 |
* Sample URL : http://api.ipstack.com/186.116.207.169?access_key=YOUR_ACCESS_KEY&output=json&legacy=1
|
237 |
* Input type : IP address (IPv4, IPv6) / domain name
|
238 |
* Output type : json, xml
|
240 |
class IP_Geo_Block_API_ipstack extends IP_Geo_Block_API {
|
241 |
protected $template = array(
|
242 |
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
|
243 |
+
'url' => 'http://api.ipstack.com/%API_IP%?access_key=%API_KEY%&output=%API_FORMAT%',
|
244 |
'api' => array(
|
245 |
'%API_FORMAT%' => 'json',
|
246 |
),
|
305 |
/**
|
306 |
* Class for Nekudo
|
307 |
*
|
308 |
+
* URL : https://geoip.nekudo.com/
|
309 |
* Term of use : https://nekudo.com/blog/new-project-shiny-geoip
|
310 |
* Licence fee : free to use the API
|
311 |
* Rate limit : none
|
406 |
* Term of use :
|
407 |
* Licence fee : free (need to regist to get API key)
|
408 |
* Rate limit : 2 queries/second for registered user
|
409 |
+
* Sample URL : https://api.ipinfodb.com/v3/ip-city/?key=...&format=xml&ip=124.83.187.140
|
410 |
+
* Sample URL : https://api.ipinfodb.com/v3/ip-country/?key=...&format=xml&ip=yahoo.co.jp
|
411 |
* Input type : IP address (IPv4, IPv6) / domain name
|
412 |
* Output type : json, xml
|
413 |
*/
|
414 |
class IP_Geo_Block_API_IPInfoDB extends IP_Geo_Block_API {
|
415 |
protected $template = array(
|
416 |
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
|
417 |
+
'url' => 'https://api.ipinfodb.com/v3/%API_OPTION%/?key=%API_KEY%&format=%API_FORMAT%&ip=%API_IP%',
|
418 |
'api' => array(
|
419 |
'%API_FORMAT%' => 'xml',
|
420 |
'%API_OPTION%' => 'ip-city',
|
456 |
|
457 |
if ( $cache ) {
|
458 |
$fail = $cache['fail'] + ( 'failed' === $validate['result'] ? 1 : 0 );
|
459 |
+
$call = $cache['reqs'] + ( 'failed' !== $validate['result'] ? 1 : 0 );
|
460 |
$last = $cache['last'];
|
461 |
$view = $cache['view'];
|
462 |
} else { // if new cache then reset these values
|
481 |
'asn' => $validate['asn' ], // @since 3.0.4
|
482 |
'code' => $validate['code'],
|
483 |
'auth' => $validate['auth'], // get_current_user_id() > 0
|
484 |
+
'fail' => $fail, // $validate['auth'] ? 0 : $fail,
|
485 |
+
'reqs' => $settings['save_statistics'] ? $call : 0,
|
486 |
'last' => $last,
|
487 |
'view' => $view,
|
488 |
'host' => isset( $validate['host'] ) && $validate['host'] !== $ip ? $validate['host'] : '',
|
489 |
);
|
490 |
|
491 |
+
// do not update cache while installing geolocation databases
|
492 |
+
if ( $settings['cache_hold'] && ( ! $validate['auth'] || 'ZZ' !== $validate['code'] ) )
|
493 |
+
IP_Geo_Block_Logs::update_cache( $cache );
|
494 |
|
495 |
return self::$memcache[ $ip ] = $cache;
|
496 |
}
|
529 |
'ipinfo.io' => array(
|
530 |
'key' => NULL,
|
531 |
'type' => 'IPv4, IPv6 / free',
|
532 |
+
'link' => '<a rel="noreferrer" href="https://ipinfo.io/" title="IP Address API and Data Solutions">https://ipinfo.io/</a> (IPv4, IPv6 / free up to 1000 requests daily)',
|
533 |
),
|
534 |
|
535 |
'Nekudo' => array(
|
536 |
'key' => NULL,
|
537 |
'type' => 'IPv4, IPv6 / free',
|
538 |
+
'link' => '<a rel="noreferrer" href="https://geoip.nekudo.com/" title="geoip.nekudo.com | Free IP to geolocation API">https://geoip.nekudo.com/</a> (IPv4, IPv6 / free)',
|
539 |
),
|
540 |
|
541 |
'GeoIPLookup' => array(
|
553 |
'Ipdata.co' => array(
|
554 |
'key' => '',
|
555 |
'type' => 'IPv4, IPv6 / free',
|
556 |
+
'link' => '<a rel="noreferrer" href="https://ipdata.co/" title="ipdata.co - IP Geolocation and Threat Data API">https://ipdata.co/</a> (IPv4, IPv6 / free up to 1500 requests daily for registered user)',
|
557 |
),
|
558 |
|
559 |
'ipstack' => array(
|
586 |
self::$internals += $api;
|
587 |
}
|
588 |
|
589 |
+
public static function get_addons( $providers = array(), $force = FALSE ) {
|
590 |
$apis = array();
|
591 |
|
592 |
foreach ( self::$internals as $key => $val ) {
|
593 |
+
if ( 'Cache' !== $key && ( $force || ! isset( $providers[ $key ] ) || ! empty( $providers[ $key ] ) ) )
|
594 |
$apis[] = $key;
|
595 |
}
|
596 |
|
640 |
return $list;
|
641 |
}
|
642 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
643 |
}
|
644 |
|
645 |
/**
|
648 |
*/
|
649 |
if ( class_exists( 'IP_Geo_Block', FALSE ) ) {
|
650 |
|
651 |
+
// Avoid "The plugin does not have a valid header" on activation under WP4.0
|
652 |
+
if ( is_plugin_active( IP_GEO_BLOCK_BASE ) ) {
|
653 |
+
// Get absolute path to the geo-location API
|
654 |
+
$dir = IP_Geo_Block::get_option();
|
655 |
+
if ( $dir['api_dir'] ) {
|
656 |
+
$dir = IP_Geo_Block_Util::slashit(
|
657 |
+
apply_filters( IP_Geo_Block::PLUGIN_NAME . '-api-dir', $dir['api_dir'] )
|
658 |
+
);
|
659 |
+
|
660 |
+
// Scan API directory
|
661 |
+
$plugins = is_dir( $dir ) ? scandir( $dir, defined( 'SCANDIR_SORT_DESCENDING' ) ? SCANDIR_SORT_DESCENDING : 1 ) : FALSE;
|
662 |
+
|
663 |
+
// Load addons by heigher priority order
|
664 |
+
if ( FALSE !== $plugins ) {
|
665 |
+
$exclude = array( '.', '..' );
|
666 |
+
foreach ( $plugins as $plugin ) {
|
667 |
+
if ( ! in_array( $plugin, $exclude, TRUE ) && is_dir( $dir.$plugin ) ) {
|
668 |
+
@include $dir.$plugin.'/class-'.$plugin.'.php';
|
669 |
+
}
|
670 |
+
}
|
671 |
}
|
672 |
}
|
673 |
}
|
classes/class-ip-geo-block-cron.php
CHANGED
@@ -5,10 +5,9 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php'; // is_plugin_active_for_network() @since 3.0.0
|
12 |
|
13 |
class IP_Geo_Block_Cron {
|
14 |
|
@@ -64,6 +63,7 @@ class IP_Geo_Block_Cron {
|
|
64 |
$ip = IP_Geo_Block::get_ip_address( $settings = IP_Geo_Block::get_option() );
|
65 |
add_filter( IP_Geo_Block::PLUGIN_NAME . '-ip-addr', array( __CLASS__, 'extract_ip' ) );
|
66 |
|
|
|
67 |
$args = IP_Geo_Block::get_request_headers( $settings );
|
68 |
|
69 |
// download database files (higher priority order)
|
@@ -83,8 +83,7 @@ class IP_Geo_Block_Cron {
|
|
83 |
|
84 |
// update matching rule immediately
|
85 |
if ( $immediate && 'done' !== get_transient( IP_Geo_Block::CRON_NAME ) ) {
|
86 |
-
$validate =
|
87 |
-
$validate = IP_Geo_Block::validate_country( 'cron', $validate, $settings );
|
88 |
|
89 |
if ( 'ZZ' === $validate['code'] )
|
90 |
continue;
|
@@ -180,7 +179,7 @@ class IP_Geo_Block_Cron {
|
|
180 |
self::stop_cache_gc();
|
181 |
|
182 |
IP_Geo_Block_Logs::delete_expired( array(
|
183 |
-
(int)$settings['validation']['explogs'] * DAY_IN_SECONDS,
|
184 |
(int)$settings['cache_time']
|
185 |
) );
|
186 |
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
|
|
11 |
|
12 |
class IP_Geo_Block_Cron {
|
13 |
|
63 |
$ip = IP_Geo_Block::get_ip_address( $settings = IP_Geo_Block::get_option() );
|
64 |
add_filter( IP_Geo_Block::PLUGIN_NAME . '-ip-addr', array( __CLASS__, 'extract_ip' ) );
|
65 |
|
66 |
+
$context = IP_Geo_Block::get_instance();
|
67 |
$args = IP_Geo_Block::get_request_headers( $settings );
|
68 |
|
69 |
// download database files (higher priority order)
|
83 |
|
84 |
// update matching rule immediately
|
85 |
if ( $immediate && 'done' !== get_transient( IP_Geo_Block::CRON_NAME ) ) {
|
86 |
+
$validate = $context->validate_ip( 'admin', $settings );
|
|
|
87 |
|
88 |
if ( 'ZZ' === $validate['code'] )
|
89 |
continue;
|
179 |
self::stop_cache_gc();
|
180 |
|
181 |
IP_Geo_Block_Logs::delete_expired( array(
|
182 |
+
min( 365, max( 1, (int)$settings['validation']['explogs'] ) ) * DAY_IN_SECONDS,
|
183 |
(int)$settings['cache_time']
|
184 |
) );
|
185 |
|
classes/class-ip-geo-block-file.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @link https://codex.wordpress.org/Filesystem_API
|
10 |
* @copyright 2013-2018 tokkonopapa
|
11 |
*/
|
@@ -273,7 +273,7 @@ if (0) {
|
|
273 |
if ( empty( $wp_filesystem ) )
|
274 |
return array();
|
275 |
|
276 |
-
//
|
277 |
@ini_set( 'auto_detect_line_endings', TRUE );
|
278 |
|
279 |
if ( ! $this->is_file( $file ) || ! $this->is_readable( $file ) )
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @link https://codex.wordpress.org/Filesystem_API
|
10 |
* @copyright 2013-2018 tokkonopapa
|
11 |
*/
|
273 |
if ( empty( $wp_filesystem ) )
|
274 |
return array();
|
275 |
|
276 |
+
// https://php.net/manual/en/function.file.php#refsect1-function.file-returnvalues
|
277 |
@ini_set( 'auto_detect_line_endings', TRUE );
|
278 |
|
279 |
if ( ! $this->is_file( $file ) || ! $this->is_readable( $file ) )
|
classes/class-ip-geo-block-lkup.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2016-2018 tokkonopapa
|
10 |
*/
|
11 |
|
@@ -14,7 +14,7 @@ class IP_Geo_Block_Lkup {
|
|
14 |
/**
|
15 |
* Converts IP address to in_addr representation
|
16 |
*
|
17 |
-
* @link
|
18 |
*/
|
19 |
private static function inet_pton( $ip ) {
|
20 |
// available on Windows platforms after PHP 5.3.0, need IPv6 support by PHP
|
@@ -63,39 +63,14 @@ class IP_Geo_Block_Lkup {
|
|
63 |
*
|
64 |
*/
|
65 |
public static function gethostbyaddr( $ip ) {
|
66 |
-
//
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
// if not available
|
71 |
-
if ( empty( $host ) ) {
|
72 |
-
if ( function_exists( 'dns_get_record' ) ) {
|
73 |
-
// generate in-addr.arpa notation
|
74 |
-
if ( FALSE !== filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ) {
|
75 |
-
$ptr = implode( ".", array_reverse( explode( ".", $ip ) ) ) . ".in-addr.arpa";
|
76 |
-
}
|
77 |
-
|
78 |
-
elseif ( FALSE !== filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) ) {
|
79 |
-
$ptr = self::inet_pton( $ip );
|
80 |
-
$ptr = implode(".", array_reverse( str_split( bin2hex( $ptr ) ) ) ) . ".ip6.arpa";
|
81 |
-
}
|
82 |
-
|
83 |
-
if ( isset( $ptr ) and $ptr = @dns_get_record( $ptr, DNS_PTR ) ) {
|
84 |
-
$host = $ptr[0]['target'];
|
85 |
-
}
|
86 |
-
}
|
87 |
-
}
|
88 |
-
|
89 |
-
// For compatibility with versions before PHP 5.3.0
|
90 |
-
// on some operating systems, try the PEAR class Net_DNS
|
91 |
-
if ( empty( $host ) ) {
|
92 |
set_include_path( IP_GEO_BLOCK_PATH . 'includes' . PATH_SEPARATOR . get_include_path() );
|
93 |
require_once IP_GEO_BLOCK_PATH . 'includes/Net/DNS2.php';
|
94 |
|
95 |
-
|
96 |
-
$r = new Net_DNS2_Resolver(
|
97 |
-
array( 'nameservers' => array( '8.8.8.8' ) )
|
98 |
-
);
|
99 |
|
100 |
try {
|
101 |
$result = $r->query( $ip, 'PTR' );
|
@@ -107,14 +82,34 @@ class IP_Geo_Block_Lkup {
|
|
107 |
if ( isset( $result->answer ) ) {
|
108 |
foreach ( $result->answer as $obj ) {
|
109 |
if ( 'PTR' === $obj->type ) {
|
110 |
-
|
111 |
-
break;
|
112 |
}
|
113 |
}
|
114 |
}
|
115 |
}
|
116 |
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
|
120 |
}
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2016-2018 tokkonopapa
|
10 |
*/
|
11 |
|
14 |
/**
|
15 |
* Converts IP address to in_addr representation
|
16 |
*
|
17 |
+
* @link https://stackoverflow.com/questions/14459041/inet-pton-replacement-function-for-php-5-2-17-in-windows
|
18 |
*/
|
19 |
private static function inet_pton( $ip ) {
|
20 |
// available on Windows platforms after PHP 5.3.0, need IPv6 support by PHP
|
63 |
*
|
64 |
*/
|
65 |
public static function gethostbyaddr( $ip ) {
|
66 |
+
// array( 'nameservers' => array( '8.8.8.8', '8.8.4.4' ) ) // Google public DNS
|
67 |
+
// array( 'nameservers' => array( '1.1.1.1', '1.0.0.1' ) ) // APNIC public DNS
|
68 |
+
$servers = array( 'nameservers' => apply_filters( IP_GEO_BLOCK::PLUGIN_NAME . '-dns', array() ) );
|
69 |
+
if ( ! empty( $servers['nameservers'] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
set_include_path( IP_GEO_BLOCK_PATH . 'includes' . PATH_SEPARATOR . get_include_path() );
|
71 |
require_once IP_GEO_BLOCK_PATH . 'includes/Net/DNS2.php';
|
72 |
|
73 |
+
$r = new Net_DNS2_Resolver( $servers );
|
|
|
|
|
|
|
74 |
|
75 |
try {
|
76 |
$result = $r->query( $ip, 'PTR' );
|
82 |
if ( isset( $result->answer ) ) {
|
83 |
foreach ( $result->answer as $obj ) {
|
84 |
if ( 'PTR' === $obj->type ) {
|
85 |
+
return $obj->ptrdname;
|
|
|
86 |
}
|
87 |
}
|
88 |
}
|
89 |
}
|
90 |
|
91 |
+
// available on Windows platforms after PHP 5.3.0
|
92 |
+
if ( function_exists( 'gethostbyaddr' ) )
|
93 |
+
$host = @gethostbyaddr( $ip );
|
94 |
+
|
95 |
+
// if not available
|
96 |
+
if ( empty( $host ) && function_exists( 'dns_get_record' ) ) {
|
97 |
+
// generate in-addr.arpa notation
|
98 |
+
if ( FALSE !== filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ) {
|
99 |
+
$ptr = implode( ".", array_reverse( explode( ".", $ip ) ) ) . ".in-addr.arpa";
|
100 |
+
}
|
101 |
+
|
102 |
+
elseif ( FALSE !== filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) ) {
|
103 |
+
$ptr = self::inet_pton( $ip );
|
104 |
+
$ptr = implode(".", array_reverse( str_split( bin2hex( $ptr ) ) ) ) . ".ip6.arpa";
|
105 |
+
}
|
106 |
+
|
107 |
+
if ( isset( $ptr ) and $ptr = @dns_get_record( $ptr, DNS_PTR ) ) {
|
108 |
+
return $ptr[0]['target'];
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
return empty( $host ) ? $ip : $host;
|
113 |
}
|
114 |
|
115 |
}
|
classes/class-ip-geo-block-load.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2016-2018 tokkonopapa
|
10 |
*/
|
11 |
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2016-2018 tokkonopapa
|
10 |
*/
|
11 |
|
classes/class-ip-geo-block-logs.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
@@ -46,40 +46,38 @@ class IP_Geo_Block_Logs {
|
|
46 |
* @internal creating mixed storage engine may cause troubles with some plugins.
|
47 |
*/
|
48 |
public static function create_tables() {
|
49 |
-
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
50 |
-
|
51 |
global $wpdb;
|
52 |
$charset_collate = $wpdb->get_charset_collate(); // @since 3.5.0
|
53 |
|
54 |
// for logs
|
55 |
$table = $wpdb->prefix . self::TABLE_LOGS;
|
56 |
-
$sql = "CREATE TABLE
|
57 |
-
No bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
58 |
-
time int(10) unsigned NOT NULL DEFAULT 0,
|
59 |
-
ip varbinary(96) NOT NULL,
|
60 |
-
asn varchar(8) NULL,
|
61 |
-
hook varchar(8) NOT NULL,
|
62 |
-
auth int(10) unsigned NOT NULL DEFAULT 0,
|
63 |
-
code varchar(2) NOT NULL DEFAULT 'ZZ',
|
64 |
-
result varchar(8) NULL,
|
65 |
-
method varchar(" . IP_GEO_BLOCK_MAX_STR_LEN . ") NOT NULL,
|
66 |
-
user_agent varchar(" . IP_GEO_BLOCK_MAX_STR_LEN . ") NULL,
|
67 |
-
headers varbinary(" . IP_GEO_BLOCK_MAX_BIN_LEN . ") NULL,
|
68 |
-
data text NULL,
|
69 |
-
PRIMARY KEY (No),
|
70 |
-
KEY time (time),
|
71 |
-
KEY hook (hook)
|
72 |
) $charset_collate";
|
73 |
-
$
|
74 |
|
75 |
// for statistics
|
76 |
$table = $wpdb->prefix . self::TABLE_STAT;
|
77 |
-
$sql = "CREATE TABLE
|
78 |
-
No tinyint(4) unsigned NOT NULL AUTO_INCREMENT,
|
79 |
-
data longtext NULL,
|
80 |
-
PRIMARY KEY (No)
|
81 |
) $charset_collate";
|
82 |
-
$
|
83 |
|
84 |
// Create 1 record if not exists
|
85 |
$sql = $wpdb->prepare(
|
@@ -89,31 +87,76 @@ class IP_Geo_Block_Logs {
|
|
89 |
|
90 |
// for IP address cache
|
91 |
$table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
|
92 |
-
$sql = "CREATE TABLE
|
93 |
-
No bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
94 |
-
time int(10) unsigned NOT NULL DEFAULT 0,
|
95 |
-
hook varchar(8) NOT NULL,
|
96 |
-
ip varbinary(96) UNIQUE NOT NULL,
|
97 |
-
asn varchar(8) NULL,
|
98 |
-
code varchar(2) NOT NULL DEFAULT 'ZZ',
|
99 |
-
auth int(10) unsigned NOT NULL DEFAULT 0,
|
100 |
-
fail int(10) unsigned NOT NULL DEFAULT 0,
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
105 |
) $charset_collate";
|
106 |
-
$
|
107 |
-
|
108 |
-
// dbDelta() parses `call` field as `CALL` statement. So alter it after init @since 3.0.10
|
109 |
-
if ( ! $wpdb->query( "DESCRIBE `$table` `call`" ) ) {
|
110 |
-
$wpdb->query( "ALTER TABLE `$table` ADD `call` int(10) unsigned NOT NULL DEFAULT 0 AFTER `fail`" )
|
111 |
-
or self::error( __LINE__ );
|
112 |
-
}
|
113 |
|
114 |
return TRUE;
|
115 |
}
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
/**
|
118 |
* Encrypts / Decrypts a string.
|
119 |
*
|
@@ -124,7 +167,7 @@ class IP_Geo_Block_Logs {
|
|
124 |
* @return array actual mode and cipher key
|
125 |
*/
|
126 |
private static function cipher_mode_key( $mode = IP_GEO_BLOCK_CIPHER_MODE ) {
|
127 |
-
$mode and $mode =
|
128 |
|
129 |
if ( empty( self::$cipher['mode'] ) ) {
|
130 |
// openssl
|
@@ -163,47 +206,6 @@ class IP_Geo_Block_Logs {
|
|
163 |
return isset( self::$cipher[ $ip ] ) ? self::$cipher[ $ip ] : self::$cipher[ $ip ] = self::encrypt( $ip );
|
164 |
}
|
165 |
|
166 |
-
/**
|
167 |
-
* Upgrade
|
168 |
-
*
|
169 |
-
*/
|
170 |
-
public static function upgrade( $version ) {
|
171 |
-
// delete IP address cache
|
172 |
-
self::clear_cache();
|
173 |
-
|
174 |
-
// restore logs by old format
|
175 |
-
$logs = self::restore_logs( NULL, FALSE ); // should be called before `cipher_mode_key()`
|
176 |
-
|
177 |
-
if ( 1 === ( $mode = self::cipher_mode_key() ) )
|
178 |
-
$key = bin2hex( self::$cipher['key'] );
|
179 |
-
|
180 |
-
// `No`, `hook`, `time`, `ip`, `code`, `result`, `asn`, `method`, `user_agent`, `headers`, `data`
|
181 |
-
$fields = $ips = $headers = array();
|
182 |
-
foreach ( $logs as $log ) {
|
183 |
-
if ( $log[3] ) { // if `ip` is successfully extracted
|
184 |
-
$fields[] = $log[0]; // `No`
|
185 |
-
if ( 2 === $mode ) {
|
186 |
-
$ips [] = "UNHEX('" . bin2hex( self::encrypt( $log[3] ) ) . "')"; // `ip`
|
187 |
-
$headers[] = "UNHEX('" . bin2hex( self::encrypt( $log[9] ) ) . "')"; // `headers`
|
188 |
-
} else {
|
189 |
-
$ips [] = "AES_ENCRYPT(UNHEX('" . bin2hex( $log[3] ) . "'), UNHEX('" . $key . "'))"; // `ip`
|
190 |
-
$headers[] = "AES_ENCRYPT(UNHEX('" . bin2hex( $log[9] ) . "'), UNHEX('" . $key . "'))"; // `headers`
|
191 |
-
}
|
192 |
-
}
|
193 |
-
}
|
194 |
-
|
195 |
-
// bulk update logs
|
196 |
-
if ( ! empty( $fields ) ) {
|
197 |
-
global $wpdb;
|
198 |
-
$table = $wpdb->prefix . self::TABLE_LOGS;
|
199 |
-
|
200 |
-
$sql = sprintf(
|
201 |
-
"UPDATE `$table` set `ip` = ELT(FIELD(`No`, %s), %s), `headers` = ELT(FIELD(`No`, %s), %s) WHERE `No` IN (%s)",
|
202 |
-
$fields = implode( ',', $fields ), implode( ',', $ips ), $fields, implode( ',', $headers ), $fields
|
203 |
-
) and $wpdb->query( $sql ) or self::error( __LINE__ );
|
204 |
-
}
|
205 |
-
}
|
206 |
-
|
207 |
/**
|
208 |
* Delete specific tables
|
209 |
*
|
@@ -338,7 +340,7 @@ class IP_Geo_Block_Logs {
|
|
338 |
/**
|
339 |
* Truncate string as utf8
|
340 |
*
|
341 |
-
* @see
|
342 |
* @link https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php
|
343 |
* @link https://core.trac.wordpress.org/browser/trunk/src/wp-includes/functions.php
|
344 |
*/
|
@@ -516,8 +518,8 @@ class IP_Geo_Block_Logs {
|
|
516 |
*
|
517 |
* The absolute path to the database can be set via filter hook `ip-geo-block-live-log`.
|
518 |
*
|
519 |
-
* @see
|
520 |
-
* @see
|
521 |
* @see https://www.sqlite.org/sharedcache.html#shared_cache_and_in_memory_databases
|
522 |
*
|
523 |
* @param int $id ID of the blog
|
@@ -620,7 +622,7 @@ class IP_Geo_Block_Logs {
|
|
620 |
|
621 |
// mark if malicious upload exists
|
622 |
if ( isset( $validate['upload'] ) )
|
623 |
-
$validate['result'] .= '
|
624 |
|
625 |
// anonymize ip address
|
626 |
if ( $settings['anonymize'] )
|
@@ -700,7 +702,7 @@ class IP_Geo_Block_Logs {
|
|
700 |
self::$stm = self::$pdo->prepare( // possibly throw an PDOException
|
701 |
'INSERT INTO ' . self::TABLE_LOGS . ' (blog_id, time, ip, asn, hook, auth, code, result, method, user_agent, headers, data) ' .
|
702 |
'VALUES ' . ' ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);'
|
703 |
-
); // example:
|
704 |
self::$stm->bindParam( 1, $id, PDO::PARAM_INT );
|
705 |
self::$stm->bindParam( 2, $_SERVER['REQUEST_TIME'], PDO::PARAM_INT );
|
706 |
self::$stm->bindParam( 3, $validate['ip'], PDO::PARAM_STR );
|
@@ -1012,11 +1014,11 @@ class IP_Geo_Block_Logs {
|
|
1012 |
$mode = self::cipher_mode_key();
|
1013 |
|
1014 |
if ( 2 === $mode ) {
|
1015 |
-
$sql = "SELECT `time`, `hook`, `ip`, `asn`, `code`, `auth`, `fail`, `
|
1016 |
$result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
|
1017 |
} else {
|
1018 |
$sql = $wpdb->prepare(
|
1019 |
-
"SELECT `time`, `hook`, AES_DECRYPT(`ip`, %s), `asn`, `code`, `auth`, `fail`, `
|
1020 |
self::$cipher['key'], self::$cipher['key']
|
1021 |
) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
|
1022 |
}
|
@@ -1031,7 +1033,7 @@ class IP_Geo_Block_Logs {
|
|
1031 |
}
|
1032 |
|
1033 |
// make the encrypted `ip` hashed so that it can be specified as a key
|
1034 |
-
$val = array_combine( array( 'time', 'hook', 'ip', 'asn', 'code', 'auth', 'fail', '
|
1035 |
$val['hash'] = bin2hex( $val['hash'] );
|
1036 |
|
1037 |
$ip = $val['ip'];
|
@@ -1061,12 +1063,12 @@ class IP_Geo_Block_Logs {
|
|
1061 |
|
1062 |
if ( 2 === $mode ) {
|
1063 |
$sql = $wpdb->prepare(
|
1064 |
-
"SELECT `time`, `hook`, `asn`, `code`, `auth`, `fail`, `
|
1065 |
"WHERE `ip` = %s", self::encrypt_ip( $ip )
|
1066 |
) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
|
1067 |
} else {
|
1068 |
$sql = $wpdb->prepare(
|
1069 |
-
"SELECT `time`, `hook`, `asn`, `code`, `auth`, `fail`, `
|
1070 |
"WHERE `ip` = AES_ENCRYPT(%s, %s)", self::$cipher['key'], $ip, self::$cipher['key']
|
1071 |
) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
|
1072 |
}
|
@@ -1075,7 +1077,7 @@ class IP_Geo_Block_Logs {
|
|
1075 |
if ( 2 === $mode )
|
1076 |
$result[0][9] = self::decrypt( $result[0][9] ); // decrypt `host`
|
1077 |
|
1078 |
-
$result[0] = array_combine( array( 'time', 'hook', 'asn', 'code', 'auth', 'fail', '
|
1079 |
$result[0]['ip'] = $ip;
|
1080 |
return $result[0];
|
1081 |
} else {
|
@@ -1094,7 +1096,7 @@ class IP_Geo_Block_Logs {
|
|
1094 |
if ( 2 === self::cipher_mode_key() ) {
|
1095 |
$sql = $wpdb->prepare(
|
1096 |
"INSERT INTO `$table`
|
1097 |
-
(`time`, `hook`, `ip`, `asn`, `code`, `auth`, `fail`, `
|
1098 |
VALUES (%d, %s, %s, %s, %s, %d, %d, %d, %d, %d, %s)
|
1099 |
ON DUPLICATE KEY UPDATE
|
1100 |
`time` = VALUES(`time`),
|
@@ -1102,7 +1104,7 @@ class IP_Geo_Block_Logs {
|
|
1102 |
`auth` = VALUES(`auth`),
|
1103 |
`code` = VALUES(`code`),
|
1104 |
`fail` = VALUES(`fail`),
|
1105 |
-
`
|
1106 |
`last` = VALUES(`last`),
|
1107 |
`view` = VALUES(`view`)",
|
1108 |
$cache['time'],
|
@@ -1112,7 +1114,7 @@ class IP_Geo_Block_Logs {
|
|
1112 |
$cache['code'],
|
1113 |
$cache['auth'],
|
1114 |
$cache['fail'],
|
1115 |
-
$cache['
|
1116 |
$cache['last'],
|
1117 |
$cache['view'],
|
1118 |
self::encrypt( $cache['host'] )
|
@@ -1120,7 +1122,7 @@ class IP_Geo_Block_Logs {
|
|
1120 |
} else {
|
1121 |
$sql = $wpdb->prepare(
|
1122 |
"INSERT INTO `$table`
|
1123 |
-
(`time`, `hook`, `ip`, `asn`, `code`, `auth`, `fail`, `
|
1124 |
VALUES (%d, %s, AES_ENCRYPT(%s, %s), %s, %s, %d, %d, %d, %d, %d, AES_ENCRYPT(%s, %s))
|
1125 |
ON DUPLICATE KEY UPDATE
|
1126 |
`time` = VALUES(`time`),
|
@@ -1128,7 +1130,7 @@ class IP_Geo_Block_Logs {
|
|
1128 |
`auth` = VALUES(`auth`),
|
1129 |
`code` = VALUES(`code`),
|
1130 |
`fail` = VALUES(`fail`),
|
1131 |
-
`
|
1132 |
`last` = VALUES(`last`),
|
1133 |
`view` = VALUES(`view`)",
|
1134 |
$cache['time'],
|
@@ -1139,7 +1141,7 @@ class IP_Geo_Block_Logs {
|
|
1139 |
$cache['code'],
|
1140 |
$cache['auth'],
|
1141 |
$cache['fail'],
|
1142 |
-
$cache['
|
1143 |
$cache['last'],
|
1144 |
$cache['view'],
|
1145 |
$cache['host'],
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
46 |
* @internal creating mixed storage engine may cause troubles with some plugins.
|
47 |
*/
|
48 |
public static function create_tables() {
|
|
|
|
|
49 |
global $wpdb;
|
50 |
$charset_collate = $wpdb->get_charset_collate(); // @since 3.5.0
|
51 |
|
52 |
// for logs
|
53 |
$table = $wpdb->prefix . self::TABLE_LOGS;
|
54 |
+
$sql = "CREATE TABLE IF NOT EXISTS `$table` (
|
55 |
+
`No` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
56 |
+
`time` int(10) unsigned NOT NULL DEFAULT '0',
|
57 |
+
`ip` varbinary(96) NOT NULL,
|
58 |
+
`asn` varchar(8) NULL,
|
59 |
+
`hook` varchar(8) NOT NULL,
|
60 |
+
`auth` int(10) unsigned NOT NULL DEFAULT '0',
|
61 |
+
`code` varchar(2) NOT NULL DEFAULT 'ZZ',
|
62 |
+
`result` varchar(8) NULL,
|
63 |
+
`method` varchar(" . IP_GEO_BLOCK_MAX_STR_LEN . ") NOT NULL,
|
64 |
+
`user_agent` varchar(" . IP_GEO_BLOCK_MAX_STR_LEN . ") NULL,
|
65 |
+
`headers` varbinary(" . IP_GEO_BLOCK_MAX_BIN_LEN . ") NULL,
|
66 |
+
`data` text NULL,
|
67 |
+
PRIMARY KEY (`No`),
|
68 |
+
KEY `time` (`time`),
|
69 |
+
KEY `hook` (`hook`)
|
70 |
) $charset_collate";
|
71 |
+
$wpdb->query( $sql ) or self::error( __LINE__ );
|
72 |
|
73 |
// for statistics
|
74 |
$table = $wpdb->prefix . self::TABLE_STAT;
|
75 |
+
$sql = "CREATE TABLE IF NOT EXISTS `$table` (
|
76 |
+
`No` tinyint(4) unsigned NOT NULL AUTO_INCREMENT,
|
77 |
+
`data` longtext NULL,
|
78 |
+
PRIMARY KEY (`No`)
|
79 |
) $charset_collate";
|
80 |
+
$wpdb->query( $sql ) or self::error( __LINE__ );
|
81 |
|
82 |
// Create 1 record if not exists
|
83 |
$sql = $wpdb->prepare(
|
87 |
|
88 |
// for IP address cache
|
89 |
$table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
|
90 |
+
$sql = "CREATE TABLE IF NOT EXISTS `$table` (
|
91 |
+
`No` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
92 |
+
`time` int(10) unsigned NOT NULL DEFAULT '0',
|
93 |
+
`hook` varchar(8) NOT NULL,
|
94 |
+
`ip` varbinary(96) UNIQUE NOT NULL,
|
95 |
+
`asn` varchar(8) NULL,
|
96 |
+
`code` varchar(2) NOT NULL DEFAULT 'ZZ',
|
97 |
+
`auth` int(10) unsigned NOT NULL DEFAULT '0',
|
98 |
+
`fail` int(10) unsigned NOT NULL DEFAULT '0',
|
99 |
+
`reqs` int(10) unsigned NOT NULL DEFAULT '0',
|
100 |
+
`last` int(10) unsigned NOT NULL DEFAULT '0',
|
101 |
+
`view` int(10) unsigned NOT NULL DEFAULT '0',
|
102 |
+
`host` varbinary(512) NULL,
|
103 |
+
PRIMARY KEY (`No`)
|
104 |
) $charset_collate";
|
105 |
+
$wpdb->query( $sql ) or self::error( __LINE__ );
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
return TRUE;
|
108 |
}
|
109 |
|
110 |
+
/**
|
111 |
+
* Upgrade
|
112 |
+
*
|
113 |
+
*/
|
114 |
+
public static function upgrade( $version ) {
|
115 |
+
// AES 128 -> AES 256
|
116 |
+
if ( version_compare( $version, '3.0.13' ) < 0 ) {
|
117 |
+
// delete IP address cache
|
118 |
+
self::clear_cache();
|
119 |
+
|
120 |
+
// restore logs by old format
|
121 |
+
$logs = self::restore_logs( NULL, FALSE ); // should be called before `cipher_mode_key()`
|
122 |
+
|
123 |
+
if ( 1 === ( $mode = self::cipher_mode_key() ) )
|
124 |
+
$key = bin2hex( self::$cipher['key'] );
|
125 |
+
|
126 |
+
// `No`, `hook`, `time`, `ip`, `code`, `result`, `asn`, `method`, `user_agent`, `headers`, `data`
|
127 |
+
$fields = $ips = $headers = array();
|
128 |
+
foreach ( $logs as $log ) {
|
129 |
+
if ( $log[3] ) { // if `ip` is successfully extracted
|
130 |
+
$fields[] = $log[0]; // `No`
|
131 |
+
if ( 2 === $mode ) {
|
132 |
+
$ips [] = "UNHEX('" . bin2hex( self::encrypt( $log[3] ) ) . "')"; // `ip`
|
133 |
+
$headers[] = "UNHEX('" . bin2hex( self::encrypt( $log[9] ) ) . "')"; // `headers`
|
134 |
+
} else {
|
135 |
+
$ips [] = "AES_ENCRYPT(UNHEX('" . bin2hex( $log[3] ) . "'), UNHEX('" . $key . "'))"; // `ip`
|
136 |
+
$headers[] = "AES_ENCRYPT(UNHEX('" . bin2hex( $log[9] ) . "'), UNHEX('" . $key . "'))"; // `headers`
|
137 |
+
}
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
// bulk update logs
|
142 |
+
if ( ! empty( $fields ) ) {
|
143 |
+
global $wpdb;
|
144 |
+
$table = $wpdb->prefix . self::TABLE_LOGS;
|
145 |
+
|
146 |
+
$sql = sprintf(
|
147 |
+
"UPDATE `$table` set `ip` = ELT(FIELD(`No`, %s), %s), `headers` = ELT(FIELD(`No`, %s), %s) WHERE `No` IN (%s)",
|
148 |
+
$fields = implode( ',', $fields ), implode( ',', $ips ), $fields, implode( ',', $headers ), $fields
|
149 |
+
) and $wpdb->query( $sql ) or self::error( __LINE__ );
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
// call -> reqs
|
154 |
+
if ( version_compare( $version, '3.0.15' ) < 0 ) {
|
155 |
+
self::delete_tables( IP_Geo_Block::CACHE_NAME );
|
156 |
+
self::create_tables();
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
/**
|
161 |
* Encrypts / Decrypts a string.
|
162 |
*
|
167 |
* @return array actual mode and cipher key
|
168 |
*/
|
169 |
private static function cipher_mode_key( $mode = IP_GEO_BLOCK_CIPHER_MODE ) {
|
170 |
+
$mode and $mode = defined( 'OPENSSL_RAW_DATA' ) ? $mode : 1; // @since PHP 5.3.3
|
171 |
|
172 |
if ( empty( self::$cipher['mode'] ) ) {
|
173 |
// openssl
|
206 |
return isset( self::$cipher[ $ip ] ) ? self::$cipher[ $ip ] : self::$cipher[ $ip ] = self::encrypt( $ip );
|
207 |
}
|
208 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
/**
|
210 |
* Delete specific tables
|
211 |
*
|
340 |
/**
|
341 |
* Truncate string as utf8
|
342 |
*
|
343 |
+
* @see https://jetpack.wp-a2z.org/oik_api/mbstring_binary_safe_encoding/
|
344 |
* @link https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php
|
345 |
* @link https://core.trac.wordpress.org/browser/trunk/src/wp-includes/functions.php
|
346 |
*/
|
518 |
*
|
519 |
* The absolute path to the database can be set via filter hook `ip-geo-block-live-log`.
|
520 |
*
|
521 |
+
* @see https://php.net/manual/en/pdo.connections.php
|
522 |
+
* @see https://php.net/manual/en/features.persistent-connections.php
|
523 |
* @see https://www.sqlite.org/sharedcache.html#shared_cache_and_in_memory_databases
|
524 |
*
|
525 |
* @param int $id ID of the blog
|
622 |
|
623 |
// mark if malicious upload exists
|
624 |
if ( isset( $validate['upload'] ) )
|
625 |
+
$validate['result'] .= '^';
|
626 |
|
627 |
// anonymize ip address
|
628 |
if ( $settings['anonymize'] )
|
702 |
self::$stm = self::$pdo->prepare( // possibly throw an PDOException
|
703 |
'INSERT INTO ' . self::TABLE_LOGS . ' (blog_id, time, ip, asn, hook, auth, code, result, method, user_agent, headers, data) ' .
|
704 |
'VALUES ' . ' ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);'
|
705 |
+
); // example: https://php.net/manual/en/pdo.lobs.php
|
706 |
self::$stm->bindParam( 1, $id, PDO::PARAM_INT );
|
707 |
self::$stm->bindParam( 2, $_SERVER['REQUEST_TIME'], PDO::PARAM_INT );
|
708 |
self::$stm->bindParam( 3, $validate['ip'], PDO::PARAM_STR );
|
1014 |
$mode = self::cipher_mode_key();
|
1015 |
|
1016 |
if ( 2 === $mode ) {
|
1017 |
+
$sql = "SELECT `time`, `hook`, `ip`, `asn`, `code`, `auth`, `fail`, `reqs`, `last`, `view`, `host` FROM `$table`";
|
1018 |
$result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
|
1019 |
} else {
|
1020 |
$sql = $wpdb->prepare(
|
1021 |
+
"SELECT `time`, `hook`, AES_DECRYPT(`ip`, %s), `asn`, `code`, `auth`, `fail`, `reqs`, `last`, `view`, AES_DECRYPT(`host`, %s), `ip` FROM `$table`",
|
1022 |
self::$cipher['key'], self::$cipher['key']
|
1023 |
) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
|
1024 |
}
|
1033 |
}
|
1034 |
|
1035 |
// make the encrypted `ip` hashed so that it can be specified as a key
|
1036 |
+
$val = array_combine( array( 'time', 'hook', 'ip', 'asn', 'code', 'auth', 'fail', 'reqs', 'last', 'view', 'host', 'hash' ), $val );
|
1037 |
$val['hash'] = bin2hex( $val['hash'] );
|
1038 |
|
1039 |
$ip = $val['ip'];
|
1063 |
|
1064 |
if ( 2 === $mode ) {
|
1065 |
$sql = $wpdb->prepare(
|
1066 |
+
"SELECT `time`, `hook`, `asn`, `code`, `auth`, `fail`, `reqs`, `last`, `view`, `host` FROM `$table` " .
|
1067 |
"WHERE `ip` = %s", self::encrypt_ip( $ip )
|
1068 |
) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
|
1069 |
} else {
|
1070 |
$sql = $wpdb->prepare(
|
1071 |
+
"SELECT `time`, `hook`, `asn`, `code`, `auth`, `fail`, `reqs`, `last`, `view`, AES_DECRYPT(`host`, %s) FROM `$table` " .
|
1072 |
"WHERE `ip` = AES_ENCRYPT(%s, %s)", self::$cipher['key'], $ip, self::$cipher['key']
|
1073 |
) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
|
1074 |
}
|
1077 |
if ( 2 === $mode )
|
1078 |
$result[0][9] = self::decrypt( $result[0][9] ); // decrypt `host`
|
1079 |
|
1080 |
+
$result[0] = array_combine( array( 'time', 'hook', 'asn', 'code', 'auth', 'fail', 'reqs', 'last', 'view', 'host' ), $result[0] );
|
1081 |
$result[0]['ip'] = $ip;
|
1082 |
return $result[0];
|
1083 |
} else {
|
1096 |
if ( 2 === self::cipher_mode_key() ) {
|
1097 |
$sql = $wpdb->prepare(
|
1098 |
"INSERT INTO `$table`
|
1099 |
+
(`time`, `hook`, `ip`, `asn`, `code`, `auth`, `fail`, `reqs`, `last`, `view`, `host`)
|
1100 |
VALUES (%d, %s, %s, %s, %s, %d, %d, %d, %d, %d, %s)
|
1101 |
ON DUPLICATE KEY UPDATE
|
1102 |
`time` = VALUES(`time`),
|
1104 |
`auth` = VALUES(`auth`),
|
1105 |
`code` = VALUES(`code`),
|
1106 |
`fail` = VALUES(`fail`),
|
1107 |
+
`reqs` = VALUES(`reqs`),
|
1108 |
`last` = VALUES(`last`),
|
1109 |
`view` = VALUES(`view`)",
|
1110 |
$cache['time'],
|
1114 |
$cache['code'],
|
1115 |
$cache['auth'],
|
1116 |
$cache['fail'],
|
1117 |
+
$cache['reqs'],
|
1118 |
$cache['last'],
|
1119 |
$cache['view'],
|
1120 |
self::encrypt( $cache['host'] )
|
1122 |
} else {
|
1123 |
$sql = $wpdb->prepare(
|
1124 |
"INSERT INTO `$table`
|
1125 |
+
(`time`, `hook`, `ip`, `asn`, `code`, `auth`, `fail`, `reqs`, `last`, `view`, `host`)
|
1126 |
VALUES (%d, %s, AES_ENCRYPT(%s, %s), %s, %s, %d, %d, %d, %d, %d, AES_ENCRYPT(%s, %s))
|
1127 |
ON DUPLICATE KEY UPDATE
|
1128 |
`time` = VALUES(`time`),
|
1130 |
`auth` = VALUES(`auth`),
|
1131 |
`code` = VALUES(`code`),
|
1132 |
`fail` = VALUES(`fail`),
|
1133 |
+
`reqs` = VALUES(`reqs`),
|
1134 |
`last` = VALUES(`last`),
|
1135 |
`view` = VALUES(`view`)",
|
1136 |
$cache['time'],
|
1141 |
$cache['code'],
|
1142 |
$cache['auth'],
|
1143 |
$cache['fail'],
|
1144 |
+
$cache['reqs'],
|
1145 |
$cache['last'],
|
1146 |
$cache['view'],
|
1147 |
$cache['host'],
|
classes/class-ip-geo-block-opts.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
@@ -16,7 +16,7 @@ class IP_Geo_Block_Opts {
|
|
16 |
*
|
17 |
*/
|
18 |
private static $option_table = array(
|
19 |
-
'version' => '3.0.
|
20 |
// since version 1.0
|
21 |
'providers' => array(), // List of providers and API keys
|
22 |
'comment' => array( // Message on the comment form
|
@@ -185,11 +185,16 @@ class IP_Geo_Block_Opts {
|
|
185 |
),
|
186 |
// since version 3.0.10
|
187 |
'behavior' => array(
|
188 |
-
'
|
189 |
-
'
|
190 |
),
|
191 |
// since version 3.0.13
|
192 |
'restrict_api' => TRUE, // Do not send IP address to external APIs
|
|
|
|
|
|
|
|
|
|
|
193 |
);
|
194 |
|
195 |
/**
|
@@ -414,25 +419,25 @@ class IP_Geo_Block_Opts {
|
|
414 |
IP_Geo_Block_Logs::reset_sqlite_db();
|
415 |
}
|
416 |
|
417 |
-
if ( version_compare( $version, '3.0.12' ) < 0 ) {
|
418 |
-
$settings['validation']['maxlogs'] = $default['validation']['maxlogs'];
|
419 |
-
$settings['validation']['explogs'] = $default['validation']['explogs'];
|
420 |
-
} else if ( version_compare( $version, '3.0.13' ) < 0 ) {
|
421 |
-
$settings['validation']['explogs'] /= DAY_IN_SECONDS;
|
422 |
-
}
|
423 |
-
|
424 |
if ( version_compare( $version, '3.0.13' ) < 0 ) {
|
|
|
|
|
425 |
$settings['restrict_api'] = $settings['anonymize'];
|
426 |
-
IP_Geo_Block_Logs::upgrade( $version );
|
427 |
}
|
428 |
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
// update package version number
|
430 |
$settings['version'] = IP_Geo_Block::VERSION;
|
431 |
}
|
432 |
|
433 |
-
// install addons for IP Geolocation database API ver. 1.1.
|
434 |
$providers = IP_Geo_Block_Provider::get_addons();
|
435 |
-
if ( empty( $providers ) || ! $settings['api_dir'] || ! file_exists( $settings['api_dir'] ) || version_compare( $version, '3.0.
|
436 |
$settings['api_dir'] = self::install_api( $settings );
|
437 |
|
438 |
$settings['request_ua'] = trim( str_replace( array( 'InfiniteWP' ), '', @$_SERVER['HTTP_USER_AGENT'] ) );
|
@@ -449,17 +454,23 @@ class IP_Geo_Block_Opts {
|
|
449 |
*
|
450 |
*/
|
451 |
private static function install_api( $settings ) {
|
452 |
-
|
453 |
-
$
|
|
|
|
|
|
|
454 |
|
455 |
if ( $src !== $dst ) {
|
456 |
-
|
457 |
-
if ( FALSE === self::recurse_copy( $src, $dst ) )
|
458 |
-
throw new Exception();
|
459 |
-
} catch ( Exception $e ) {
|
460 |
-
if ( class_exists( 'IP_Geo_Block_Admin', FALSE ) )
|
461 |
-
IP_Geo_Block_Admin::add_admin_notice( 'error', sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), '<code>' . $dst . '</code>' ) );
|
462 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
463 |
return NULL;
|
464 |
}
|
465 |
}
|
@@ -467,9 +478,9 @@ class IP_Geo_Block_Opts {
|
|
467 |
return $dst;
|
468 |
}
|
469 |
|
470 |
-
public static function
|
471 |
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
|
472 |
-
$fs = IP_Geo_Block_FS::init( '
|
473 |
|
474 |
return $fs->delete( self::get_api_dir( $settings ), TRUE ); // $recursive = true
|
475 |
}
|
@@ -483,8 +494,7 @@ class IP_Geo_Block_Opts {
|
|
483 |
$dir = wp_upload_dir();
|
484 |
$dir = $dir['basedir'];
|
485 |
|
486 |
-
if ( ! @is_writable( $dir ) ) {
|
487 |
-
// wp-content/plugins/ip-geo-block
|
488 |
$dir = @is_writable( IP_GEO_BLOCK_PATH ) ? IP_GEO_BLOCK_PATH : NULL;
|
489 |
}
|
490 |
}
|
@@ -494,35 +504,6 @@ class IP_Geo_Block_Opts {
|
|
494 |
) . IP_Geo_Block::GEOAPI_NAME; // must add `ip-geo-api` for basename
|
495 |
}
|
496 |
|
497 |
-
// http://php.net/manual/function.copy.php#91010
|
498 |
-
private static function recurse_copy( $src, $dst ) {
|
499 |
-
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
|
500 |
-
$fs = IP_Geo_Block_FS::init( 'recurse_copy' );
|
501 |
-
|
502 |
-
$src = IP_Geo_Block_Util::slashit( $src );
|
503 |
-
$dst = IP_Geo_Block_Util::slashit( $dst );
|
504 |
-
|
505 |
-
! $fs->is_dir( $dst ) and $fs->mkdir( $dst );
|
506 |
-
|
507 |
-
if ( $dir = @opendir( $src ) ) {
|
508 |
-
while( FALSE !== ( $file = readdir( $dir ) ) ) {
|
509 |
-
if ( '.' !== $file && '..' !== $file ) {
|
510 |
-
if ( $fs->is_dir( $src.$file ) ) {
|
511 |
-
if ( FALSE === self::recurse_copy( $src.$file, $dst.$file ) )
|
512 |
-
return FALSE;
|
513 |
-
} else {
|
514 |
-
if ( FALSE === $fs->copy( $src.$file, $dst.$file, TRUE ) )
|
515 |
-
return FALSE;
|
516 |
-
}
|
517 |
-
}
|
518 |
-
}
|
519 |
-
|
520 |
-
closedir( $dir );
|
521 |
-
}
|
522 |
-
|
523 |
-
return TRUE;
|
524 |
-
}
|
525 |
-
|
526 |
/**
|
527 |
* Activate / Deactivate Must-use plugin / Advanced cache
|
528 |
*
|
@@ -531,7 +512,6 @@ class IP_Geo_Block_Opts {
|
|
531 |
if ( file_exists( $src = WPMU_PLUGIN_DIR . '/ip-geo-block-mu.php' ) ) {
|
532 |
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
|
533 |
$fs = IP_Geo_Block_FS::init( 'remove_mu_plugin' );
|
534 |
-
|
535 |
return $fs->delete( $src ) ? TRUE : $src;
|
536 |
}
|
537 |
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
16 |
*
|
17 |
*/
|
18 |
private static $option_table = array(
|
19 |
+
'version' => '3.0.15',// Version of this table (not package)
|
20 |
// since version 1.0
|
21 |
'providers' => array(), // List of providers and API keys
|
22 |
'comment' => array( // Message on the comment form
|
185 |
),
|
186 |
// since version 3.0.10
|
187 |
'behavior' => array(
|
188 |
+
'view' => 7, // More than 7 page view in 5 seconds
|
189 |
+
'time' => 5, // More than 7 page view in 5 seconds
|
190 |
),
|
191 |
// since version 3.0.13
|
192 |
'restrict_api' => TRUE, // Do not send IP address to external APIs
|
193 |
+
// since version 3.0.14
|
194 |
+
'login_link' => array(
|
195 |
+
'link' => NULL, // key of login link
|
196 |
+
'hash' => NULL, // hash of 'link'
|
197 |
+
),
|
198 |
);
|
199 |
|
200 |
/**
|
419 |
IP_Geo_Block_Logs::reset_sqlite_db();
|
420 |
}
|
421 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
if ( version_compare( $version, '3.0.13' ) < 0 ) {
|
423 |
+
$settings['validation' ]['maxlogs'] = $default['validation']['maxlogs'];
|
424 |
+
$settings['validation' ]['explogs'] = $default['validation']['explogs'];
|
425 |
$settings['restrict_api'] = $settings['anonymize'];
|
|
|
426 |
}
|
427 |
|
428 |
+
if ( version_compare( $version, '3.0.14' ) < 0 )
|
429 |
+
$settings['login_link'] = $default['login_link'];
|
430 |
+
|
431 |
+
if ( version_compare( $version, '3.0.15' ) < 0 )
|
432 |
+
IP_Geo_Block_Logs::upgrade( $version );
|
433 |
+
|
434 |
// update package version number
|
435 |
$settings['version'] = IP_Geo_Block::VERSION;
|
436 |
}
|
437 |
|
438 |
+
// install addons for IP Geolocation database API ver. 1.1.13
|
439 |
$providers = IP_Geo_Block_Provider::get_addons();
|
440 |
+
if ( empty( $providers ) || ! $settings['api_dir'] || ! file_exists( $settings['api_dir'] ) || version_compare( $version, '3.0.14' ) < 0 )
|
441 |
$settings['api_dir'] = self::install_api( $settings );
|
442 |
|
443 |
$settings['request_ua'] = trim( str_replace( array( 'InfiniteWP' ), '', @$_SERVER['HTTP_USER_AGENT'] ) );
|
454 |
*
|
455 |
*/
|
456 |
private static function install_api( $settings ) {
|
457 |
+
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
|
458 |
+
$fs = IP_Geo_Block_FS::init( 'install_api' );
|
459 |
+
|
460 |
+
$src = IP_Geo_Block_Util::slashit( IP_GEO_BLOCK_PATH . 'wp-content/' . IP_Geo_Block::GEOAPI_NAME );
|
461 |
+
$dst = IP_Geo_Block_Util::slashit( self::get_api_dir( $settings ) );
|
462 |
|
463 |
if ( $src !== $dst ) {
|
464 |
+
$fs->exists( $dst ) or $fs->mkdir( $dst );
|
|
|
|
|
|
|
|
|
|
|
465 |
|
466 |
+
$result = copy_dir( $src, $dst );
|
467 |
+
|
468 |
+
if ( is_wp_error( $result ) ) {
|
469 |
+
if ( class_exists( 'IP_Geo_Block_Admin', FALSE ) ) {
|
470 |
+
IP_Geo_Block_Admin::add_admin_notice( 'error',
|
471 |
+
sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), '<code>' . $dst . '</code>' )
|
472 |
+
);
|
473 |
+
}
|
474 |
return NULL;
|
475 |
}
|
476 |
}
|
478 |
return $dst;
|
479 |
}
|
480 |
|
481 |
+
public static function uninstall_api( $settings ) {
|
482 |
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
|
483 |
+
$fs = IP_Geo_Block_FS::init( 'uninstall_api' );
|
484 |
|
485 |
return $fs->delete( self::get_api_dir( $settings ), TRUE ); // $recursive = true
|
486 |
}
|
494 |
$dir = wp_upload_dir();
|
495 |
$dir = $dir['basedir'];
|
496 |
|
497 |
+
if ( ! @is_writable( $dir ) ) { // wp-content/plugins/ip-geo-block
|
|
|
498 |
$dir = @is_writable( IP_GEO_BLOCK_PATH ) ? IP_GEO_BLOCK_PATH : NULL;
|
499 |
}
|
500 |
}
|
504 |
) . IP_Geo_Block::GEOAPI_NAME; // must add `ip-geo-api` for basename
|
505 |
}
|
506 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
/**
|
508 |
* Activate / Deactivate Must-use plugin / Advanced cache
|
509 |
*
|
512 |
if ( file_exists( $src = WPMU_PLUGIN_DIR . '/ip-geo-block-mu.php' ) ) {
|
513 |
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
|
514 |
$fs = IP_Geo_Block_FS::init( 'remove_mu_plugin' );
|
|
|
515 |
return $fs->delete( $src ) ? TRUE : $src;
|
516 |
}
|
517 |
|
classes/class-ip-geo-block-util.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
@@ -19,11 +19,8 @@ class IP_Geo_Block_Util {
|
|
19 |
static $offset = NULL;
|
20 |
static $format = NULL;
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
if ( NULL === $format )
|
26 |
-
$format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
|
27 |
|
28 |
return date_i18n( $fmt ? $fmt : $format, $timestamp ? (int)$timestamp + $offset : FALSE );
|
29 |
}
|
@@ -147,7 +144,7 @@ class IP_Geo_Block_Util {
|
|
147 |
/**
|
148 |
* Convert back to string from a parsed url.
|
149 |
*
|
150 |
-
* @source
|
151 |
*/
|
152 |
private static function unparse_url( $url ) {
|
153 |
$scheme = isset( $url['scheme' ] ) ? $url['scheme' ] . '://' : '';
|
@@ -372,8 +369,8 @@ class IP_Geo_Block_Util {
|
|
372 |
* WP alternative function of hash_equals() for mu-plugins
|
373 |
*
|
374 |
* Timing attack safe string comparison.
|
375 |
-
* @source
|
376 |
-
* @see
|
377 |
* @see wp-includes/compat.php
|
378 |
*/
|
379 |
private static function hash_equals( $a, $b ) {
|
@@ -398,7 +395,7 @@ class IP_Geo_Block_Util {
|
|
398 |
* WP alternative function of hash_hmac() for mu-plugins
|
399 |
*
|
400 |
* Generate a keyed hash value using the HMAC method.
|
401 |
-
* @source
|
402 |
*/
|
403 |
public static function hash_hmac( $algo, $data, $key, $raw_output = FALSE ) {
|
404 |
// PHP 5 >= 5.1.2, PECL hash >= 1.1 or wp-includes/compat.php
|
@@ -584,8 +581,14 @@ class IP_Geo_Block_Util {
|
|
584 |
public static function is_user_logged_in() {
|
585 |
static $logged_in = NULL;
|
586 |
|
587 |
-
if ( NULL === $logged_in )
|
588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
|
590 |
return $logged_in;
|
591 |
}
|
@@ -599,8 +602,14 @@ class IP_Geo_Block_Util {
|
|
599 |
public static function get_current_user_id() {
|
600 |
static $user_id = NULL;
|
601 |
|
602 |
-
if ( NULL === $user_id )
|
603 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
604 |
|
605 |
return $user_id;
|
606 |
}
|
@@ -678,7 +687,7 @@ class IP_Geo_Block_Util {
|
|
678 |
/**
|
679 |
* Arrange $_FILES array
|
680 |
*
|
681 |
-
* @see
|
682 |
*/
|
683 |
public static function arrange_files( $files ) {
|
684 |
if ( ! is_array( $files['name'] ) )
|
@@ -810,7 +819,7 @@ class IP_Geo_Block_Util {
|
|
810 |
*
|
811 |
* @param string $vars comma separated keys in $_SERVER for http header ('HTTP_...')
|
812 |
* @return string $ip IP address
|
813 |
-
* @link
|
814 |
* @link https://github.com/zendframework/zend-http/blob/master/src/PhpEnvironment/RemoteAddress.php
|
815 |
*/
|
816 |
public static function get_client_ip( $vars = NULL ) {
|
@@ -825,7 +834,7 @@ class IP_Geo_Block_Util {
|
|
825 |
}
|
826 |
}
|
827 |
|
828 |
-
return isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
|
829 |
}
|
830 |
|
831 |
/**
|
@@ -861,14 +870,14 @@ class IP_Geo_Block_Util {
|
|
861 |
* 192.168.0.0/16 reserved for Private-Use Networks [RFC1918]
|
862 |
*/
|
863 |
public static function is_private_ip( $ip ) {
|
864 |
-
//
|
865 |
return ! filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE );
|
866 |
}
|
867 |
|
868 |
/**
|
869 |
* Get IP address of the host server
|
870 |
*
|
871 |
-
* @link
|
872 |
*/
|
873 |
public static function get_server_ip() {
|
874 |
return isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : ( (int)self::is_IIS() >= 7 ?
|
@@ -904,8 +913,8 @@ class IP_Geo_Block_Util {
|
|
904 |
$installed[ $key ] = isset( $installed[ $key ] ) ? $installed[ $key ] | $val : $val;
|
905 |
}
|
906 |
}
|
907 |
-
unset( $installed['ip_geo_block'] );
|
908 |
|
|
|
909 |
return $installed;
|
910 |
}
|
911 |
|
@@ -930,16 +939,14 @@ class IP_Geo_Block_Util {
|
|
930 |
*/
|
931 |
public static function anonymize_ip( $subject, $strict = TRUE ) {
|
932 |
return $strict ?
|
933 |
-
preg_replace( '
|
934 |
preg_replace(
|
935 |
array(
|
936 |
-
// loose pattern for
|
937 |
-
'/([0-9]{
|
938 |
-
'/([0-
|
939 |
-
// loose pattern for IPv6
|
940 |
-
'/((?:[0-9a-f:]+[-:]+)+)[0-9a-f:\*]+([^0-9a-f]?)/i',
|
941 |
),
|
942 |
-
'$1
|
943 |
$subject
|
944 |
);
|
945 |
}
|
@@ -948,37 +955,126 @@ class IP_Geo_Block_Util {
|
|
948 |
* Load and show theme template
|
949 |
*
|
950 |
*/
|
951 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
952 |
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
self::$theme_template = $type;
|
959 |
|
960 |
-
|
961 |
-
|
962 |
-
else
|
963 |
-
add_action( 'init', 'IP_Geo_Block_Util::load_theme_template', $settings['priority'] );
|
964 |
|
965 |
-
|
966 |
-
} else {
|
967 |
-
return FALSE;
|
968 |
-
}
|
969 |
}
|
970 |
|
971 |
public static function load_theme_template( $template = FALSE ) {
|
972 |
-
global $wp_query;
|
973 |
-
$wp_query->set_404(); // for stylesheet
|
974 |
-
$wp_query->is_404 = ( 404 === self::$theme_template );
|
975 |
-
status_header( self::$theme_template ); // @since 2.0.0
|
976 |
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
982 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
983 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
984 |
}
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
19 |
static $offset = NULL;
|
20 |
static $format = NULL;
|
21 |
|
22 |
+
NULL === $offset and $offset = wp_timezone_override_offset() * HOUR_IN_SECONDS;
|
23 |
+
NULL === $format and $format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
|
|
|
|
|
|
|
24 |
|
25 |
return date_i18n( $fmt ? $fmt : $format, $timestamp ? (int)$timestamp + $offset : FALSE );
|
26 |
}
|
144 |
/**
|
145 |
* Convert back to string from a parsed url.
|
146 |
*
|
147 |
+
* @source https://php.net/manual/en/function.parse-url.php#106731
|
148 |
*/
|
149 |
private static function unparse_url( $url ) {
|
150 |
$scheme = isset( $url['scheme' ] ) ? $url['scheme' ] . '://' : '';
|
369 |
* WP alternative function of hash_equals() for mu-plugins
|
370 |
*
|
371 |
* Timing attack safe string comparison.
|
372 |
+
* @source https://php.net/manual/en/function.hash-equals.php#115635
|
373 |
+
* @see https://php.net/manual/en/language.operators.increment.php
|
374 |
* @see wp-includes/compat.php
|
375 |
*/
|
376 |
private static function hash_equals( $a, $b ) {
|
395 |
* WP alternative function of hash_hmac() for mu-plugins
|
396 |
*
|
397 |
* Generate a keyed hash value using the HMAC method.
|
398 |
+
* @source https://php.net/manual/en/function.hash-hmac.php#93440
|
399 |
*/
|
400 |
public static function hash_hmac( $algo, $data, $key, $raw_output = FALSE ) {
|
401 |
// PHP 5 >= 5.1.2, PECL hash >= 1.1 or wp-includes/compat.php
|
581 |
public static function is_user_logged_in() {
|
582 |
static $logged_in = NULL;
|
583 |
|
584 |
+
if ( NULL === $logged_in ) {
|
585 |
+
if ( did_action( 'init' ) ) {
|
586 |
+
$logged_in = is_user_logged_in(); // @since 2.0.0
|
587 |
+
} else {
|
588 |
+
$user = self::validate_auth_cookie();
|
589 |
+
$logged_in = $user ? $user->exists() : FALSE; // @since 3.4.0
|
590 |
+
}
|
591 |
+
}
|
592 |
|
593 |
return $logged_in;
|
594 |
}
|
602 |
public static function get_current_user_id() {
|
603 |
static $user_id = NULL;
|
604 |
|
605 |
+
if ( NULL === $user_id ) {
|
606 |
+
if ( did_action( 'init' ) ) {
|
607 |
+
$user_id = get_current_user_id(); // @since MU 3.0.0
|
608 |
+
} else {
|
609 |
+
$user = self::validate_auth_cookie();
|
610 |
+
$user_id = $user ? $user->ID : 0; // @since 2.0.0
|
611 |
+
}
|
612 |
+
}
|
613 |
|
614 |
return $user_id;
|
615 |
}
|
687 |
/**
|
688 |
* Arrange $_FILES array
|
689 |
*
|
690 |
+
* @see https://php.net/manual/features.file-upload.multiple.php#53240
|
691 |
*/
|
692 |
public static function arrange_files( $files ) {
|
693 |
if ( ! is_array( $files['name'] ) )
|
819 |
*
|
820 |
* @param string $vars comma separated keys in $_SERVER for http header ('HTTP_...')
|
821 |
* @return string $ip IP address
|
822 |
+
* @link https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/x-forwarded-headers.html
|
823 |
* @link https://github.com/zendframework/zend-http/blob/master/src/PhpEnvironment/RemoteAddress.php
|
824 |
*/
|
825 |
public static function get_client_ip( $vars = NULL ) {
|
834 |
}
|
835 |
}
|
836 |
|
837 |
+
return isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1'; // for CLI
|
838 |
}
|
839 |
|
840 |
/**
|
870 |
* 192.168.0.0/16 reserved for Private-Use Networks [RFC1918]
|
871 |
*/
|
872 |
public static function is_private_ip( $ip ) {
|
873 |
+
// https://php.net/manual/en/filter.filters.flags.php
|
874 |
return ! filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE );
|
875 |
}
|
876 |
|
877 |
/**
|
878 |
* Get IP address of the host server
|
879 |
*
|
880 |
+
* @link https://php.net/manual/en/reserved.variables.server.php#88418
|
881 |
*/
|
882 |
public static function get_server_ip() {
|
883 |
return isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : ( (int)self::is_IIS() >= 7 ?
|
913 |
$installed[ $key ] = isset( $installed[ $key ] ) ? $installed[ $key ] | $val : $val;
|
914 |
}
|
915 |
}
|
|
|
916 |
|
917 |
+
unset( $installed['ip_geo_block'] );
|
918 |
return $installed;
|
919 |
}
|
920 |
|
939 |
*/
|
940 |
public static function anonymize_ip( $subject, $strict = TRUE ) {
|
941 |
return $strict ?
|
942 |
+
preg_replace( '/(:)*[0-9a-f\*]{0,4}$/', '$1***', $subject, 1 ) :
|
943 |
preg_replace(
|
944 |
array(
|
945 |
+
'/([0-9a-f]{3,})[0-9a-f]{3,}/', // loose pattern for IPv[4|6]
|
946 |
+
'/((?:[0-9]{1,3}[-_x\.]){3,})[0-9]+/', // loose pattern for IPv4
|
947 |
+
'/((?:[0-9a-f]+[-:]+)+)[0-9a-f:\*]{2,}/', // loose pattern for IPv6
|
|
|
|
|
948 |
),
|
949 |
+
'$1***',
|
950 |
$subject
|
951 |
);
|
952 |
}
|
955 |
* Load and show theme template
|
956 |
*
|
957 |
*/
|
958 |
+
private static $theme_template = array();
|
959 |
+
|
960 |
+
public static function show_theme_template( $code, $settings ) {
|
961 |
+
if ( file_exists( $file = get_stylesheet_directory() . '/' . $code . '.php' ) /* child theme */ ||
|
962 |
+
file_exists( $file = get_template_directory() . '/' . $code . '.php' ) /* parent theme */ ) {
|
963 |
+
// keep the response code and the template file
|
964 |
+
self::$theme_template = array( 'code' => $code, 'file' => $file );
|
965 |
+
|
966 |
+
// case 1: validation timing is `init`
|
967 |
+
if ( $action = current_filter() ) { // `plugins_loaded`, `wp` or FALSE
|
968 |
+
add_action( // `wp` (on front-end target) is too late to apply `init`
|
969 |
+
'wp' === $action ? 'template_redirect' : 'init',
|
970 |
+
'IP_Geo_Block_Util::load_theme_template', $settings['priority']
|
971 |
+
);
|
972 |
+
return TRUE; // load template at the specified action
|
973 |
+
}
|
974 |
|
975 |
+
// case 2: validation timing is `mu-plugins`
|
976 |
+
elseif ( '<?php' !== file_get_contents( $file, FALSE, NULL, 0, 5 ) ) {
|
977 |
+
self::load_theme_template(); // load template and die immediately
|
978 |
+
}
|
979 |
+
}
|
|
|
980 |
|
981 |
+
// prevent to make a cached page. `set_404()` should not be used for `wp_dir()`.
|
982 |
+
global $wp_query; isset( $wp_query->is_404 ) and $wp_query->is_404 = TRUE;
|
|
|
|
|
983 |
|
984 |
+
return FALSE; // die with wp_die() immediately
|
|
|
|
|
|
|
985 |
}
|
986 |
|
987 |
public static function load_theme_template( $template = FALSE ) {
|
988 |
+
global $wp_query; isset( $wp_query ) and $wp_query->set_404(); // for stylesheet
|
|
|
|
|
|
|
989 |
|
990 |
+
status_header( self::$theme_template['code'] ); // @since 2.0.0
|
991 |
+
add_filter( 'document_title_parts', 'IP_Geo_Block_Util::change_title' ); // @since 4.4.0
|
992 |
+
|
993 |
+
// avoid loading template for HEAD requests because of performance bump. See #14348.
|
994 |
+
'HEAD' !== $_SERVER['REQUEST_METHOD'] and include self::$theme_template['file'];
|
995 |
+
exit;
|
996 |
+
}
|
997 |
+
|
998 |
+
public static function change_title( $title_parts ) {
|
999 |
+
// change title from `Not Found` to the correct one.
|
1000 |
+
$title_parts['title'] = get_status_header_desc( self::$theme_template['code'] );
|
1001 |
+
return $title_parts;
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
/**
|
1005 |
+
* Generates cryptographically secure pseudo-random bytes
|
1006 |
+
*
|
1007 |
+
*/
|
1008 |
+
private static function random_bytes( $length = 64 ) {
|
1009 |
+
if ( version_compare( PHP_VERSION, '7.0.0', '<' ) )
|
1010 |
+
require_once IP_GEO_BLOCK_PATH . 'includes/random_compat/random.php';
|
1011 |
+
|
1012 |
+
// align length
|
1013 |
+
$length = max( 64, $length ) - ( $length % 2 );
|
1014 |
+
|
1015 |
+
try {
|
1016 |
+
$str = bin2hex( random_bytes( $length / 2 ) );
|
1017 |
+
} catch ( TypeError $e ) {
|
1018 |
+
$str = NULL;
|
1019 |
+
} catch ( Exception $e ) {
|
1020 |
+
$str = NULL;
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
if ( empty( $str ) && function_exists( 'openssl_random_pseudo_bytes' ) )
|
1024 |
+
$str = bin2hex( openssl_random_pseudo_bytes( $length / 2 ) );
|
1025 |
+
|
1026 |
+
if ( empty( $str ) ) {
|
1027 |
+
for( $i = 0; $i < $length; $i++ ) {
|
1028 |
+
$str .= chr( ( mt_rand( 1, 36 ) <= 26 ) ? mt_rand( 97, 122 ) : mt_rand( 48, 57 ) );
|
1029 |
+
}
|
1030 |
}
|
1031 |
+
|
1032 |
+
return $str;
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
/**
|
1036 |
+
* Manipulate emergency login link
|
1037 |
+
*
|
1038 |
+
*/
|
1039 |
+
private static function hash_link( $link ) {
|
1040 |
+
return self::hash_hmac(
|
1041 |
+
function_exists( 'hash' ) ? 'sha256' /* 32 bytes (256 bits) */ : 'sha1' /* 20 bytes (160 bits) */,
|
1042 |
+
$link, NONCE_SALT, TRUE
|
1043 |
+
);
|
1044 |
}
|
1045 |
+
|
1046 |
+
public static function generate_link() {
|
1047 |
+
$link = self::random_bytes();
|
1048 |
+
$hash = bin2hex( self::hash_link( $link ) );
|
1049 |
+
|
1050 |
+
/**
|
1051 |
+
* Verify the consistency of `self::hash_hmac()`
|
1052 |
+
* key from external: self::verify_link( $link )
|
1053 |
+
* key from internal: self::verify_link( 'link', 'hash' )
|
1054 |
+
*/
|
1055 |
+
$settings = IP_Geo_Block::get_option();
|
1056 |
+
$settings['login_link'] = array(
|
1057 |
+
'link' => $hash,
|
1058 |
+
'hash' => bin2hex( self::hash_link( $hash ) ),
|
1059 |
+
);
|
1060 |
+
|
1061 |
+
update_option( IP_Geo_Block::OPTION_NAME, $settings );
|
1062 |
+
return add_query_arg( IP_Geo_Block::PLUGIN_NAME . '-key', $link, wp_login_url() );
|
1063 |
+
}
|
1064 |
+
|
1065 |
+
public static function delete_link() {
|
1066 |
+
$settings = IP_Geo_Block::get_option();
|
1067 |
+
$settings['login_link'] = array( 'link' => NULL, 'hash' => NULL );
|
1068 |
+
update_option( IP_Geo_Block::OPTION_NAME, $settings );
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
public static function get_link() {
|
1072 |
+
$settings = IP_Geo_Block::get_option();
|
1073 |
+
return $settings['login_link']['link'] ? $settings['login_link']['link'] : FALSE;
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
public static function verify_link( $link, $hash = NULL ) {
|
1077 |
+
return self::hash_equals( self::hash_link( $link ), pack( 'H*', $hash ? $hash : self::get_link() ) ); // hex2bin() for PHP 5.4+
|
1078 |
+
}
|
1079 |
+
|
1080 |
}
|
classes/class-ip-geo-block.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
@@ -15,7 +15,7 @@ class IP_Geo_Block {
|
|
15 |
* Unique identifier for this plugin.
|
16 |
*
|
17 |
*/
|
18 |
-
const VERSION = '3.0.
|
19 |
const GEOAPI_NAME = 'ip-geo-api';
|
20 |
const PLUGIN_NAME = 'ip-geo-block';
|
21 |
const OPTION_NAME = 'ip_geo_block_settings';
|
@@ -182,7 +182,7 @@ class IP_Geo_Block {
|
|
182 |
|
183 |
// get optional values from wp options
|
184 |
public static function get_option() {
|
185 |
-
return
|
186 |
}
|
187 |
|
188 |
// get the WordPress path of validation target
|
@@ -235,7 +235,7 @@ class IP_Geo_Block {
|
|
235 |
/**
|
236 |
* Setup the http header.
|
237 |
*
|
238 |
-
* @see
|
239 |
*/
|
240 |
public static function get_request_headers( $settings ) {
|
241 |
return apply_filters( self::PLUGIN_NAME . '-headers', array(
|
@@ -267,8 +267,9 @@ class IP_Geo_Block {
|
|
267 |
* Return true if the validation result is passed.
|
268 |
*
|
269 |
*/
|
270 |
-
public static function is_passed ( $result )
|
271 |
-
public static function is_blocked( $result )
|
|
|
272 |
|
273 |
/**
|
274 |
* Build a validation result for the current user.
|
@@ -414,7 +415,7 @@ class IP_Geo_Block {
|
|
414 |
$hook = ( IP_Geo_Block_Util::is_user_logged_in() && 'admin' === $this->target_type );
|
415 |
wp_die( // get_dashboard_url() @since 3.1.0
|
416 |
IP_Geo_Block_Util::kses( $mesg ) . ( $hook ? "\n<p><a rel='nofollow' href='" . esc_url( get_dashboard_url( IP_Geo_Block_Util::get_current_user_id() ) ) . "'>« " . __( 'Dashboard' ) . "</a></p>" : '' ),
|
417 |
-
|
418 |
);
|
419 |
}
|
420 |
}
|
@@ -439,15 +440,15 @@ class IP_Geo_Block {
|
|
439 |
// 6 check_auth
|
440 |
// 7 check_ips_black (high), check_ips_white (low)
|
441 |
// 8 check_fail
|
442 |
-
// 9
|
443 |
// priority low 10 check_page (high), validate_country (low)
|
444 |
$var = self::PLUGIN_NAME . '-' . $hook;
|
445 |
-
$settings['validation' ]['mimetype' ]
|
446 |
-
$check_auth
|
447 |
$settings['extra_ips' ] = apply_filters( self::PLUGIN_NAME . '-extra-ips', $settings['extra_ips'], $hook );
|
448 |
-
$settings['extra_ips' ]['black_list']
|
449 |
-
$settings['extra_ips' ]['white_list']
|
450 |
-
$settings['login_fails'] >= 0
|
451 |
|
452 |
// make valid provider name list
|
453 |
$providers = IP_Geo_Block_Provider::get_valid_providers( $settings );
|
@@ -532,22 +533,38 @@ class IP_Geo_Block {
|
|
532 |
* Validate on login.
|
533 |
*
|
534 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
public function validate_login() {
|
536 |
// parse action
|
537 |
$action = isset( $_GET['key'] ) ? 'resetpass' : ( isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'login' );
|
538 |
$action = 'retrievepassword' === $action ? 'lostpassword' : ( 'rp' === $action ? 'resetpass' : $action );
|
539 |
-
|
540 |
$settings = self::get_option();
|
541 |
-
$list = $settings['login_action'];
|
542 |
|
543 |
// the same rule should be applied to login and logout
|
544 |
-
! empty( $
|
545 |
|
546 |
// avoid conflict with WP Limit Login Attempts (wp-includes/pluggable.php @since 2.5.0)
|
547 |
! empty( $_POST ) and add_action( 'wp_login_failed', array( $this, 'auth_fail' ), $settings['priority'] );
|
548 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
549 |
// enables to skip validation of country on login/out except BuddyPress signup
|
550 |
-
$this->validate_ip( 'login', $settings, ! empty( $
|
551 |
}
|
552 |
|
553 |
/**
|
@@ -557,7 +574,6 @@ class IP_Geo_Block {
|
|
557 |
private function check_exceptions( $action, $page, $exceptions = array() ) {
|
558 |
$in_action = in_array( $action, $exceptions, TRUE );
|
559 |
$in_page = in_array( $page, $exceptions, TRUE );
|
560 |
-
|
561 |
return ( ( $action xor $page ) && ( ! $in_action and ! $in_page ) ) ||
|
562 |
( ( $action and $page ) && ( ! $in_action or ! $in_page ) ) ? FALSE : TRUE;
|
563 |
}
|
@@ -595,8 +611,8 @@ class IP_Geo_Block {
|
|
595 |
$list = array_merge( apply_filters( self::PLUGIN_NAME . '-bypass-admins', array(), $settings ), array(
|
596 |
// in wp-admin js/widget.js, includes/template.php, async-upload.php, plugins.php, PHP Compatibility Checker
|
597 |
'heartbeat', 'save-widget', 'wp-compression-test', 'upload-attachment', 'deactivate', 'imgedit-preview', 'wpephpcompat_start_test',
|
598 |
-
// bbPress, Anti-Malware Security and Brute-Force Firewall, Jetpack page & action
|
599 |
-
'bp_avatar_upload', 'GOTMLS_logintime', 'jetpack', 'authorize', 'jetpack_modules', 'atd_settings', 'bulk-activate', 'bulk-deactivate',
|
600 |
) );
|
601 |
|
602 |
// skip validation of country code and WP-ZEP if exceptions matches action or page
|
@@ -850,12 +866,12 @@ class IP_Geo_Block {
|
|
850 |
add_filter( self::PLUGIN_NAME . '-public', array( $this, 'check_page' ), 10, 2 );
|
851 |
}
|
852 |
|
853 |
-
// validate bad behavior by bots and crawlers
|
854 |
-
$public['behavior'] and add_filter( self::PLUGIN_NAME . '-public', array( $this, 'check_behavior' ), 9, 2 );
|
855 |
-
|
856 |
// validate undesired user agent
|
857 |
add_filter( self::PLUGIN_NAME . '-public', array( $this, 'check_ua' ), 9, 2 );
|
858 |
|
|
|
|
|
|
|
859 |
// retrieve IP address of visitor via proxy services
|
860 |
add_filter( self::PLUGIN_NAME . '-ip-addr', array( 'IP_Geo_Block_Util', 'get_proxy_ip' ), 20, 1 );
|
861 |
|
@@ -866,9 +882,9 @@ class IP_Geo_Block {
|
|
866 |
public function check_behavior( $validate, $settings ) {
|
867 |
// check if page view with a short period time is under the threshold
|
868 |
$cache = IP_Geo_Block_API_Cache::get_cache( self::$remote_addr );
|
869 |
-
|
|
|
870 |
return $validate + array( 'result' => 'badbot' ); // can't overwrite existing result
|
871 |
-
}
|
872 |
|
873 |
return $validate;
|
874 |
}
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
15 |
* Unique identifier for this plugin.
|
16 |
*
|
17 |
*/
|
18 |
+
const VERSION = '3.0.15';
|
19 |
const GEOAPI_NAME = 'ip-geo-api';
|
20 |
const PLUGIN_NAME = 'ip-geo-block';
|
21 |
const OPTION_NAME = 'ip_geo_block_settings';
|
182 |
|
183 |
// get optional values from wp options
|
184 |
public static function get_option() {
|
185 |
+
return ( $option = get_option( self::OPTION_NAME ) ) ? $option : self::get_default();
|
186 |
}
|
187 |
|
188 |
// get the WordPress path of validation target
|
235 |
/**
|
236 |
* Setup the http header.
|
237 |
*
|
238 |
+
* @see https://codex.wordpress.org/Function_Reference/wp_remote_get
|
239 |
*/
|
240 |
public static function get_request_headers( $settings ) {
|
241 |
return apply_filters( self::PLUGIN_NAME . '-headers', array(
|
267 |
* Return true if the validation result is passed.
|
268 |
*
|
269 |
*/
|
270 |
+
public static function is_passed ( $result ) { return 0 === strncmp( 'pass', $result, 4 ); }
|
271 |
+
public static function is_blocked( $result ) { return 0 !== strncmp( 'pass', $result, 4 ); }
|
272 |
+
public static function is_listed ( $code, $list ) { return FALSE !== strpos( $list, (string)$code ); }
|
273 |
|
274 |
/**
|
275 |
* Build a validation result for the current user.
|
415 |
$hook = ( IP_Geo_Block_Util::is_user_logged_in() && 'admin' === $this->target_type );
|
416 |
wp_die( // get_dashboard_url() @since 3.1.0
|
417 |
IP_Geo_Block_Util::kses( $mesg ) . ( $hook ? "\n<p><a rel='nofollow' href='" . esc_url( get_dashboard_url( IP_Geo_Block_Util::get_current_user_id() ) ) . "'>« " . __( 'Dashboard' ) . "</a></p>" : '' ),
|
418 |
+
get_status_header_desc( $code ), array( 'response' => $code, 'back_link' => ! $hook )
|
419 |
);
|
420 |
}
|
421 |
}
|
440 |
// 6 check_auth
|
441 |
// 7 check_ips_black (high), check_ips_white (low)
|
442 |
// 8 check_fail
|
443 |
+
// 9 check_ua (high), check_behavior (low)
|
444 |
// priority low 10 check_page (high), validate_country (low)
|
445 |
$var = self::PLUGIN_NAME . '-' . $hook;
|
446 |
+
$settings['validation' ]['mimetype' ] and add_filter( $var, array( $this, 'check_upload' ), 5, 2 );
|
447 |
+
$check_auth and add_filter( $var, array( $this, 'check_auth' ), 6, 2 );
|
448 |
$settings['extra_ips' ] = apply_filters( self::PLUGIN_NAME . '-extra-ips', $settings['extra_ips'], $hook );
|
449 |
+
$settings['extra_ips' ]['black_list'] and add_filter( $var, array( $this, 'check_ips_black' ), 7, 2 );
|
450 |
+
$settings['extra_ips' ]['white_list'] and add_filter( $var, array( $this, 'check_ips_white' ), 7, 2 );
|
451 |
+
$settings['login_fails'] >= 0 && $block and add_filter( $var, array( $this, 'check_fail' ), 8, 2 );
|
452 |
|
453 |
// make valid provider name list
|
454 |
$providers = IP_Geo_Block_Provider::get_valid_providers( $settings );
|
533 |
* Validate on login.
|
534 |
*
|
535 |
*/
|
536 |
+
public function filter_login_url( $url, $path, $scheme, $blog_id ) {
|
537 |
+
if ( isset( $this->login_key ) && FALSE !== strpos( $url, $this->request_uri ) )
|
538 |
+
$url = esc_url( add_query_arg( self::PLUGIN_NAME . '-key', $this->login_key, $url ) );
|
539 |
+
|
540 |
+
return $url;
|
541 |
+
}
|
542 |
+
|
543 |
public function validate_login() {
|
544 |
// parse action
|
545 |
$action = isset( $_GET['key'] ) ? 'resetpass' : ( isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'login' );
|
546 |
$action = 'retrievepassword' === $action ? 'lostpassword' : ( 'rp' === $action ? 'resetpass' : $action );
|
|
|
547 |
$settings = self::get_option();
|
|
|
548 |
|
549 |
// the same rule should be applied to login and logout
|
550 |
+
! empty( $settings['login_action']['login'] ) and $settings['login_action']['logout'] = TRUE;
|
551 |
|
552 |
// avoid conflict with WP Limit Login Attempts (wp-includes/pluggable.php @since 2.5.0)
|
553 |
! empty( $_POST ) and add_action( 'wp_login_failed', array( $this, 'auth_fail' ), $settings['priority'] );
|
554 |
|
555 |
+
// verify emergency login key
|
556 |
+
if ( 'login' === $action && ! empty( $_REQUEST[ self::PLUGIN_NAME . '-key' ] ) &&
|
557 |
+
IP_Geo_Block_Util::verify_link( $_REQUEST[ self::PLUGIN_NAME . '-key' ] ) ) {
|
558 |
+
$this->login_key = sanitize_key( $_REQUEST[ self::PLUGIN_NAME . '-key' ] );
|
559 |
+
|
560 |
+
// add the verified key to the url in login form
|
561 |
+
has_filter( 'site_url', array( $this, 'filter_login_url' ) ) or
|
562 |
+
add_filter( 'site_url', array( $this, 'filter_login_url' ), 10, 4 );
|
563 |
+
$settings['login_action']['login'] = FALSE; // skip blocking in validate_ip()
|
564 |
+
}
|
565 |
+
|
566 |
// enables to skip validation of country on login/out except BuddyPress signup
|
567 |
+
$this->validate_ip( 'login', $settings, ! empty( $settings['login_action'][ $action ] ) || 'bp_' === substr( current_filter(), 0, 3 ) );
|
568 |
}
|
569 |
|
570 |
/**
|
574 |
private function check_exceptions( $action, $page, $exceptions = array() ) {
|
575 |
$in_action = in_array( $action, $exceptions, TRUE );
|
576 |
$in_page = in_array( $page, $exceptions, TRUE );
|
|
|
577 |
return ( ( $action xor $page ) && ( ! $in_action and ! $in_page ) ) ||
|
578 |
( ( $action and $page ) && ( ! $in_action or ! $in_page ) ) ? FALSE : TRUE;
|
579 |
}
|
611 |
$list = array_merge( apply_filters( self::PLUGIN_NAME . '-bypass-admins', array(), $settings ), array(
|
612 |
// in wp-admin js/widget.js, includes/template.php, async-upload.php, plugins.php, PHP Compatibility Checker
|
613 |
'heartbeat', 'save-widget', 'wp-compression-test', 'upload-attachment', 'deactivate', 'imgedit-preview', 'wpephpcompat_start_test',
|
614 |
+
// bbPress, Anti-Malware Security and Brute-Force Firewall, Jetpack page & action, Email Subscribers & Newsletters by Icegram
|
615 |
+
'bp_avatar_upload', 'GOTMLS_logintime', 'jetpack', 'authorize', 'jetpack_modules', 'atd_settings', 'bulk-activate', 'bulk-deactivate', 'es_sendemail',
|
616 |
) );
|
617 |
|
618 |
// skip validation of country code and WP-ZEP if exceptions matches action or page
|
866 |
add_filter( self::PLUGIN_NAME . '-public', array( $this, 'check_page' ), 10, 2 );
|
867 |
}
|
868 |
|
|
|
|
|
|
|
869 |
// validate undesired user agent
|
870 |
add_filter( self::PLUGIN_NAME . '-public', array( $this, 'check_ua' ), 9, 2 );
|
871 |
|
872 |
+
// validate bad behavior by bots and crawlers
|
873 |
+
$public['behavior'] and add_filter( self::PLUGIN_NAME . '-public', array( $this, 'check_behavior' ), 9, 2 );
|
874 |
+
|
875 |
// retrieve IP address of visitor via proxy services
|
876 |
add_filter( self::PLUGIN_NAME . '-ip-addr', array( 'IP_Geo_Block_Util', 'get_proxy_ip' ), 20, 1 );
|
877 |
|
882 |
public function check_behavior( $validate, $settings ) {
|
883 |
// check if page view with a short period time is under the threshold
|
884 |
$cache = IP_Geo_Block_API_Cache::get_cache( self::$remote_addr );
|
885 |
+
|
886 |
+
if ( $cache && $cache['view'] >= $settings['behavior']['view'] && $_SERVER['REQUEST_TIME'] - $cache['last'] <= $settings['behavior']['time'] )
|
887 |
return $validate + array( 'result' => 'badbot' ); // can't overwrite existing result
|
|
|
888 |
|
889 |
return $validate;
|
890 |
}
|
includes/random_compat/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The MIT License (MIT)
|
2 |
+
|
3 |
+
Copyright (c) 2015 Paragon Initiative Enterprises
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
22 |
+
|
includes/random_compat/byte_safe_strings.php
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('RandomCompat_strlen')) {
|
30 |
+
if (
|
31 |
+
defined('MB_OVERLOAD_STRING')
|
32 |
+
&&
|
33 |
+
((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING
|
34 |
+
) {
|
35 |
+
/**
|
36 |
+
* strlen() implementation that isn't brittle to mbstring.func_overload
|
37 |
+
*
|
38 |
+
* This version uses mb_strlen() in '8bit' mode to treat strings as raw
|
39 |
+
* binary rather than UTF-8, ISO-8859-1, etc
|
40 |
+
*
|
41 |
+
* @param string $binary_string
|
42 |
+
*
|
43 |
+
* @throws TypeError
|
44 |
+
*
|
45 |
+
* @return int
|
46 |
+
*/
|
47 |
+
function RandomCompat_strlen($binary_string)
|
48 |
+
{
|
49 |
+
if (!is_string($binary_string)) {
|
50 |
+
throw new TypeError(
|
51 |
+
'RandomCompat_strlen() expects a string'
|
52 |
+
);
|
53 |
+
}
|
54 |
+
|
55 |
+
return (int) mb_strlen($binary_string, '8bit');
|
56 |
+
}
|
57 |
+
|
58 |
+
} else {
|
59 |
+
/**
|
60 |
+
* strlen() implementation that isn't brittle to mbstring.func_overload
|
61 |
+
*
|
62 |
+
* This version just used the default strlen()
|
63 |
+
*
|
64 |
+
* @param string $binary_string
|
65 |
+
*
|
66 |
+
* @throws TypeError
|
67 |
+
*
|
68 |
+
* @return int
|
69 |
+
*/
|
70 |
+
function RandomCompat_strlen($binary_string)
|
71 |
+
{
|
72 |
+
if (!is_string($binary_string)) {
|
73 |
+
throw new TypeError(
|
74 |
+
'RandomCompat_strlen() expects a string'
|
75 |
+
);
|
76 |
+
}
|
77 |
+
return (int) strlen($binary_string);
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
if (!is_callable('RandomCompat_substr')) {
|
83 |
+
|
84 |
+
if (
|
85 |
+
defined('MB_OVERLOAD_STRING')
|
86 |
+
&&
|
87 |
+
((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING
|
88 |
+
) {
|
89 |
+
/**
|
90 |
+
* substr() implementation that isn't brittle to mbstring.func_overload
|
91 |
+
*
|
92 |
+
* This version uses mb_substr() in '8bit' mode to treat strings as raw
|
93 |
+
* binary rather than UTF-8, ISO-8859-1, etc
|
94 |
+
*
|
95 |
+
* @param string $binary_string
|
96 |
+
* @param int $start
|
97 |
+
* @param int|null $length (optional)
|
98 |
+
*
|
99 |
+
* @throws TypeError
|
100 |
+
*
|
101 |
+
* @return string
|
102 |
+
*/
|
103 |
+
function RandomCompat_substr($binary_string, $start, $length = null)
|
104 |
+
{
|
105 |
+
if (!is_string($binary_string)) {
|
106 |
+
throw new TypeError(
|
107 |
+
'RandomCompat_substr(): First argument should be a string'
|
108 |
+
);
|
109 |
+
}
|
110 |
+
|
111 |
+
if (!is_int($start)) {
|
112 |
+
throw new TypeError(
|
113 |
+
'RandomCompat_substr(): Second argument should be an integer'
|
114 |
+
);
|
115 |
+
}
|
116 |
+
|
117 |
+
if ($length === null) {
|
118 |
+
/**
|
119 |
+
* mb_substr($str, 0, NULL, '8bit') returns an empty string on
|
120 |
+
* PHP 5.3, so we have to find the length ourselves.
|
121 |
+
*/
|
122 |
+
/** @var int $length */
|
123 |
+
$length = RandomCompat_strlen($binary_string) - $start;
|
124 |
+
} elseif (!is_int($length)) {
|
125 |
+
throw new TypeError(
|
126 |
+
'RandomCompat_substr(): Third argument should be an integer, or omitted'
|
127 |
+
);
|
128 |
+
}
|
129 |
+
|
130 |
+
// Consistency with PHP's behavior
|
131 |
+
if ($start === RandomCompat_strlen($binary_string) && $length === 0) {
|
132 |
+
return '';
|
133 |
+
}
|
134 |
+
if ($start > RandomCompat_strlen($binary_string)) {
|
135 |
+
return '';
|
136 |
+
}
|
137 |
+
|
138 |
+
return (string) mb_substr(
|
139 |
+
(string) $binary_string,
|
140 |
+
(int) $start,
|
141 |
+
(int) $length,
|
142 |
+
'8bit'
|
143 |
+
);
|
144 |
+
}
|
145 |
+
|
146 |
+
} else {
|
147 |
+
|
148 |
+
/**
|
149 |
+
* substr() implementation that isn't brittle to mbstring.func_overload
|
150 |
+
*
|
151 |
+
* This version just uses the default substr()
|
152 |
+
*
|
153 |
+
* @param string $binary_string
|
154 |
+
* @param int $start
|
155 |
+
* @param int|null $length (optional)
|
156 |
+
*
|
157 |
+
* @throws TypeError
|
158 |
+
*
|
159 |
+
* @return string
|
160 |
+
*/
|
161 |
+
function RandomCompat_substr($binary_string, $start, $length = null)
|
162 |
+
{
|
163 |
+
if (!is_string($binary_string)) {
|
164 |
+
throw new TypeError(
|
165 |
+
'RandomCompat_substr(): First argument should be a string'
|
166 |
+
);
|
167 |
+
}
|
168 |
+
|
169 |
+
if (!is_int($start)) {
|
170 |
+
throw new TypeError(
|
171 |
+
'RandomCompat_substr(): Second argument should be an integer'
|
172 |
+
);
|
173 |
+
}
|
174 |
+
|
175 |
+
if ($length !== null) {
|
176 |
+
if (!is_int($length)) {
|
177 |
+
throw new TypeError(
|
178 |
+
'RandomCompat_substr(): Third argument should be an integer, or omitted'
|
179 |
+
);
|
180 |
+
}
|
181 |
+
|
182 |
+
return (string) substr(
|
183 |
+
(string )$binary_string,
|
184 |
+
(int) $start,
|
185 |
+
(int) $length
|
186 |
+
);
|
187 |
+
}
|
188 |
+
|
189 |
+
return (string) substr(
|
190 |
+
(string) $binary_string,
|
191 |
+
(int) $start
|
192 |
+
);
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}
|
includes/random_compat/cast_to_int.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('RandomCompat_intval')) {
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Cast to an integer if we can, safely.
|
33 |
+
*
|
34 |
+
* If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX)
|
35 |
+
* (non-inclusive), it will sanely cast it to an int. If you it's equal to
|
36 |
+
* ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats
|
37 |
+
* lose precision, so the <= and => operators might accidentally let a float
|
38 |
+
* through.
|
39 |
+
*
|
40 |
+
* @param int|float $number The number we want to convert to an int
|
41 |
+
* @param bool $fail_open Set to true to not throw an exception
|
42 |
+
*
|
43 |
+
* @return float|int
|
44 |
+
* @psalm-suppress InvalidReturnType
|
45 |
+
*
|
46 |
+
* @throws TypeError
|
47 |
+
*/
|
48 |
+
function RandomCompat_intval($number, $fail_open = false)
|
49 |
+
{
|
50 |
+
if (is_int($number) || is_float($number)) {
|
51 |
+
$number += 0;
|
52 |
+
} elseif (is_numeric($number)) {
|
53 |
+
/** @psalm-suppress InvalidOperand */
|
54 |
+
$number += 0;
|
55 |
+
}
|
56 |
+
/** @var int|float $number */
|
57 |
+
|
58 |
+
if (
|
59 |
+
is_float($number)
|
60 |
+
&&
|
61 |
+
$number > ~PHP_INT_MAX
|
62 |
+
&&
|
63 |
+
$number < PHP_INT_MAX
|
64 |
+
) {
|
65 |
+
$number = (int) $number;
|
66 |
+
}
|
67 |
+
|
68 |
+
if (is_int($number)) {
|
69 |
+
return (int) $number;
|
70 |
+
} elseif (!$fail_open) {
|
71 |
+
throw new TypeError(
|
72 |
+
'Expected an integer.'
|
73 |
+
);
|
74 |
+
}
|
75 |
+
return $number;
|
76 |
+
}
|
77 |
+
}
|
includes/random_compat/error_polyfill.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!class_exists('Error', false)) {
|
30 |
+
// We can't really avoid making this extend Exception in PHP 5.
|
31 |
+
class Error extends Exception
|
32 |
+
{
|
33 |
+
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
if (!class_exists('TypeError', false)) {
|
38 |
+
if (is_subclass_of('Error', 'Exception')) {
|
39 |
+
class TypeError extends Error
|
40 |
+
{
|
41 |
+
|
42 |
+
}
|
43 |
+
} else {
|
44 |
+
class TypeError extends Exception
|
45 |
+
{
|
46 |
+
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
includes/random_compat/random.php
ADDED
@@ -0,0 +1,225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* @version 2.0.17
|
7 |
+
* @released 2018-07-04
|
8 |
+
*
|
9 |
+
* The MIT License (MIT)
|
10 |
+
*
|
11 |
+
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
|
12 |
+
*
|
13 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
14 |
+
* of this software and associated documentation files (the "Software"), to deal
|
15 |
+
* in the Software without restriction, including without limitation the rights
|
16 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
17 |
+
* copies of the Software, and to permit persons to whom the Software is
|
18 |
+
* furnished to do so, subject to the following conditions:
|
19 |
+
*
|
20 |
+
* The above copyright notice and this permission notice shall be included in
|
21 |
+
* all copies or substantial portions of the Software.
|
22 |
+
*
|
23 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
24 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
25 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
26 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
27 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
28 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
29 |
+
* SOFTWARE.
|
30 |
+
*/
|
31 |
+
|
32 |
+
if (!defined('PHP_VERSION_ID')) {
|
33 |
+
// This constant was introduced in PHP 5.2.7
|
34 |
+
$RandomCompatversion = array_map('intval', explode('.', PHP_VERSION));
|
35 |
+
define(
|
36 |
+
'PHP_VERSION_ID',
|
37 |
+
$RandomCompatversion[0] * 10000
|
38 |
+
+ $RandomCompatversion[1] * 100
|
39 |
+
+ $RandomCompatversion[2]
|
40 |
+
);
|
41 |
+
$RandomCompatversion = null;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* PHP 7.0.0 and newer have these functions natively.
|
46 |
+
*/
|
47 |
+
if (PHP_VERSION_ID >= 70000) {
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
|
51 |
+
if (!defined('RANDOM_COMPAT_READ_BUFFER')) {
|
52 |
+
define('RANDOM_COMPAT_READ_BUFFER', 8);
|
53 |
+
}
|
54 |
+
|
55 |
+
$RandomCompatDIR = dirname(__FILE__);
|
56 |
+
|
57 |
+
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'byte_safe_strings.php';
|
58 |
+
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'cast_to_int.php';
|
59 |
+
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'error_polyfill.php';
|
60 |
+
|
61 |
+
if (!is_callable('random_bytes')) {
|
62 |
+
/**
|
63 |
+
* PHP 5.2.0 - 5.6.x way to implement random_bytes()
|
64 |
+
*
|
65 |
+
* We use conditional statements here to define the function in accordance
|
66 |
+
* to the operating environment. It's a micro-optimization.
|
67 |
+
*
|
68 |
+
* In order of preference:
|
69 |
+
* 1. Use libsodium if available.
|
70 |
+
* 2. fread() /dev/urandom if available (never on Windows)
|
71 |
+
* 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM)
|
72 |
+
* 4. COM('CAPICOM.Utilities.1')->GetRandom()
|
73 |
+
*
|
74 |
+
* See RATIONALE.md for our reasoning behind this particular order
|
75 |
+
*/
|
76 |
+
if (extension_loaded('libsodium')) {
|
77 |
+
// See random_bytes_libsodium.php
|
78 |
+
if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) {
|
79 |
+
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_libsodium.php';
|
80 |
+
} elseif (method_exists('Sodium', 'randombytes_buf')) {
|
81 |
+
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_libsodium_legacy.php';
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Reading directly from /dev/urandom:
|
87 |
+
*/
|
88 |
+
if (DIRECTORY_SEPARATOR === '/') {
|
89 |
+
// DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast
|
90 |
+
// way to exclude Windows.
|
91 |
+
$RandomCompatUrandom = true;
|
92 |
+
$RandomCompat_basedir = ini_get('open_basedir');
|
93 |
+
|
94 |
+
if (!empty($RandomCompat_basedir)) {
|
95 |
+
$RandomCompat_open_basedir = explode(
|
96 |
+
PATH_SEPARATOR,
|
97 |
+
strtolower($RandomCompat_basedir)
|
98 |
+
);
|
99 |
+
$RandomCompatUrandom = (array() !== array_intersect(
|
100 |
+
array('/dev', '/dev/', '/dev/urandom'),
|
101 |
+
$RandomCompat_open_basedir
|
102 |
+
));
|
103 |
+
$RandomCompat_open_basedir = null;
|
104 |
+
}
|
105 |
+
|
106 |
+
if (
|
107 |
+
!is_callable('random_bytes')
|
108 |
+
&&
|
109 |
+
$RandomCompatUrandom
|
110 |
+
&&
|
111 |
+
@is_readable('/dev/urandom')
|
112 |
+
) {
|
113 |
+
// Error suppression on is_readable() in case of an open_basedir
|
114 |
+
// or safe_mode failure. All we care about is whether or not we
|
115 |
+
// can read it at this point. If the PHP environment is going to
|
116 |
+
// panic over trying to see if the file can be read in the first
|
117 |
+
// place, that is not helpful to us here.
|
118 |
+
|
119 |
+
// See random_bytes_dev_urandom.php
|
120 |
+
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_dev_urandom.php';
|
121 |
+
}
|
122 |
+
// Unset variables after use
|
123 |
+
$RandomCompat_basedir = null;
|
124 |
+
} else {
|
125 |
+
$RandomCompatUrandom = false;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* mcrypt_create_iv()
|
130 |
+
*
|
131 |
+
* We only want to use mcypt_create_iv() if:
|
132 |
+
*
|
133 |
+
* - random_bytes() hasn't already been defined
|
134 |
+
* - the mcrypt extensions is loaded
|
135 |
+
* - One of these two conditions is true:
|
136 |
+
* - We're on Windows (DIRECTORY_SEPARATOR !== '/')
|
137 |
+
* - We're not on Windows and /dev/urandom is readabale
|
138 |
+
* (i.e. we're not in a chroot jail)
|
139 |
+
* - Special case:
|
140 |
+
* - If we're not on Windows, but the PHP version is between
|
141 |
+
* 5.6.10 and 5.6.12, we don't want to use mcrypt. It will
|
142 |
+
* hang indefinitely. This is bad.
|
143 |
+
* - If we're on Windows, we want to use PHP >= 5.3.7 or else
|
144 |
+
* we get insufficient entropy errors.
|
145 |
+
*/
|
146 |
+
if (
|
147 |
+
!is_callable('random_bytes')
|
148 |
+
&&
|
149 |
+
// Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be.
|
150 |
+
(DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307)
|
151 |
+
&&
|
152 |
+
// Prevent this code from hanging indefinitely on non-Windows;
|
153 |
+
// see https://bugs.php.net/bug.php?id=69833
|
154 |
+
(
|
155 |
+
DIRECTORY_SEPARATOR !== '/' ||
|
156 |
+
(PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613)
|
157 |
+
)
|
158 |
+
&&
|
159 |
+
extension_loaded('mcrypt')
|
160 |
+
) {
|
161 |
+
// See random_bytes_mcrypt.php
|
162 |
+
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_mcrypt.php';
|
163 |
+
}
|
164 |
+
$RandomCompatUrandom = null;
|
165 |
+
|
166 |
+
/**
|
167 |
+
* This is a Windows-specific fallback, for when the mcrypt extension
|
168 |
+
* isn't loaded.
|
169 |
+
*/
|
170 |
+
if (
|
171 |
+
!is_callable('random_bytes')
|
172 |
+
&&
|
173 |
+
extension_loaded('com_dotnet')
|
174 |
+
&&
|
175 |
+
class_exists('COM')
|
176 |
+
) {
|
177 |
+
$RandomCompat_disabled_classes = preg_split(
|
178 |
+
'#\s*,\s*#',
|
179 |
+
strtolower(ini_get('disable_classes'))
|
180 |
+
);
|
181 |
+
|
182 |
+
if (!in_array('com', $RandomCompat_disabled_classes)) {
|
183 |
+
try {
|
184 |
+
$RandomCompatCOMtest = new COM('CAPICOM.Utilities.1');
|
185 |
+
if (method_exists($RandomCompatCOMtest, 'GetRandom')) {
|
186 |
+
// See random_bytes_com_dotnet.php
|
187 |
+
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_com_dotnet.php';
|
188 |
+
}
|
189 |
+
} catch (com_exception $e) {
|
190 |
+
// Don't try to use it.
|
191 |
+
}
|
192 |
+
}
|
193 |
+
$RandomCompat_disabled_classes = null;
|
194 |
+
$RandomCompatCOMtest = null;
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* throw new Exception
|
199 |
+
*/
|
200 |
+
if (!is_callable('random_bytes')) {
|
201 |
+
/**
|
202 |
+
* We don't have any more options, so let's throw an exception right now
|
203 |
+
* and hope the developer won't let it fail silently.
|
204 |
+
*
|
205 |
+
* @param mixed $length
|
206 |
+
* @psalm-suppress InvalidReturnType
|
207 |
+
* @throws Exception
|
208 |
+
* @return string
|
209 |
+
*/
|
210 |
+
function random_bytes($length)
|
211 |
+
{
|
212 |
+
unset($length); // Suppress "variable not used" warnings.
|
213 |
+
throw new Exception(
|
214 |
+
'There is no suitable CSPRNG installed on your system'
|
215 |
+
);
|
216 |
+
return '';
|
217 |
+
}
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
if (!is_callable('random_int')) {
|
222 |
+
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_int.php';
|
223 |
+
}
|
224 |
+
|
225 |
+
$RandomCompatDIR = null;
|
includes/random_compat/random_bytes_com_dotnet.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('random_bytes')) {
|
30 |
+
/**
|
31 |
+
* Windows with PHP < 5.3.0 will not have the function
|
32 |
+
* openssl_random_pseudo_bytes() available, so let's use
|
33 |
+
* CAPICOM to work around this deficiency.
|
34 |
+
*
|
35 |
+
* @param int $bytes
|
36 |
+
*
|
37 |
+
* @throws Exception
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
function random_bytes($bytes)
|
42 |
+
{
|
43 |
+
try {
|
44 |
+
/** @var int $bytes */
|
45 |
+
$bytes = RandomCompat_intval($bytes);
|
46 |
+
} catch (TypeError $ex) {
|
47 |
+
throw new TypeError(
|
48 |
+
'random_bytes(): $bytes must be an integer'
|
49 |
+
);
|
50 |
+
}
|
51 |
+
|
52 |
+
if ($bytes < 1) {
|
53 |
+
throw new Error(
|
54 |
+
'Length must be greater than 0'
|
55 |
+
);
|
56 |
+
}
|
57 |
+
|
58 |
+
/** @var string $buf */
|
59 |
+
$buf = '';
|
60 |
+
if (!class_exists('COM')) {
|
61 |
+
throw new Error(
|
62 |
+
'COM does not exist'
|
63 |
+
);
|
64 |
+
}
|
65 |
+
/** @var COM $util */
|
66 |
+
$util = new COM('CAPICOM.Utilities.1');
|
67 |
+
$execCount = 0;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Let's not let it loop forever. If we run N times and fail to
|
71 |
+
* get N bytes of random data, then CAPICOM has failed us.
|
72 |
+
*/
|
73 |
+
do {
|
74 |
+
$buf .= base64_decode((string) $util->GetRandom($bytes, 0));
|
75 |
+
if (RandomCompat_strlen($buf) >= $bytes) {
|
76 |
+
/**
|
77 |
+
* Return our random entropy buffer here:
|
78 |
+
*/
|
79 |
+
return (string) RandomCompat_substr($buf, 0, $bytes);
|
80 |
+
}
|
81 |
+
++$execCount;
|
82 |
+
} while ($execCount < $bytes);
|
83 |
+
|
84 |
+
/**
|
85 |
+
* If we reach here, PHP has failed us.
|
86 |
+
*/
|
87 |
+
throw new Exception(
|
88 |
+
'Could not gather sufficient random data'
|
89 |
+
);
|
90 |
+
}
|
91 |
+
}
|
includes/random_compat/random_bytes_dev_urandom.php
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!defined('RANDOM_COMPAT_READ_BUFFER')) {
|
30 |
+
define('RANDOM_COMPAT_READ_BUFFER', 8);
|
31 |
+
}
|
32 |
+
|
33 |
+
if (!is_callable('random_bytes')) {
|
34 |
+
/**
|
35 |
+
* Unless open_basedir is enabled, use /dev/urandom for
|
36 |
+
* random numbers in accordance with best practices
|
37 |
+
*
|
38 |
+
* Why we use /dev/urandom and not /dev/random
|
39 |
+
* @ref http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers
|
40 |
+
*
|
41 |
+
* @param int $bytes
|
42 |
+
*
|
43 |
+
* @throws Exception
|
44 |
+
*
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
function random_bytes($bytes)
|
48 |
+
{
|
49 |
+
/** @var resource $fp */
|
50 |
+
static $fp = null;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* This block should only be run once
|
54 |
+
*/
|
55 |
+
if (empty($fp)) {
|
56 |
+
/**
|
57 |
+
* We use /dev/urandom if it is a char device.
|
58 |
+
* We never fall back to /dev/random
|
59 |
+
*/
|
60 |
+
/** @var resource|bool $fp */
|
61 |
+
$fp = fopen('/dev/urandom', 'rb');
|
62 |
+
if (is_resource($fp)) {
|
63 |
+
/** @var array<string, int> $st */
|
64 |
+
$st = fstat($fp);
|
65 |
+
if (($st['mode'] & 0170000) !== 020000) {
|
66 |
+
fclose($fp);
|
67 |
+
$fp = false;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
if (is_resource($fp)) {
|
72 |
+
/**
|
73 |
+
* stream_set_read_buffer() does not exist in HHVM
|
74 |
+
*
|
75 |
+
* If we don't set the stream's read buffer to 0, PHP will
|
76 |
+
* internally buffer 8192 bytes, which can waste entropy
|
77 |
+
*
|
78 |
+
* stream_set_read_buffer returns 0 on success
|
79 |
+
*/
|
80 |
+
if (is_callable('stream_set_read_buffer')) {
|
81 |
+
stream_set_read_buffer($fp, RANDOM_COMPAT_READ_BUFFER);
|
82 |
+
}
|
83 |
+
if (is_callable('stream_set_chunk_size')) {
|
84 |
+
stream_set_chunk_size($fp, RANDOM_COMPAT_READ_BUFFER);
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
try {
|
90 |
+
/** @var int $bytes */
|
91 |
+
$bytes = RandomCompat_intval($bytes);
|
92 |
+
} catch (TypeError $ex) {
|
93 |
+
throw new TypeError(
|
94 |
+
'random_bytes(): $bytes must be an integer'
|
95 |
+
);
|
96 |
+
}
|
97 |
+
|
98 |
+
if ($bytes < 1) {
|
99 |
+
throw new Error(
|
100 |
+
'Length must be greater than 0'
|
101 |
+
);
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* This if() block only runs if we managed to open a file handle
|
106 |
+
*
|
107 |
+
* It does not belong in an else {} block, because the above
|
108 |
+
* if (empty($fp)) line is logic that should only be run once per
|
109 |
+
* page load.
|
110 |
+
*/
|
111 |
+
if (is_resource($fp)) {
|
112 |
+
/**
|
113 |
+
* @var int
|
114 |
+
*/
|
115 |
+
$remaining = $bytes;
|
116 |
+
|
117 |
+
/**
|
118 |
+
* @var string|bool
|
119 |
+
*/
|
120 |
+
$buf = '';
|
121 |
+
|
122 |
+
/**
|
123 |
+
* We use fread() in a loop to protect against partial reads
|
124 |
+
*/
|
125 |
+
do {
|
126 |
+
/**
|
127 |
+
* @var string|bool
|
128 |
+
*/
|
129 |
+
$read = fread($fp, $remaining);
|
130 |
+
if (!is_string($read)) {
|
131 |
+
if ($read === false) {
|
132 |
+
/**
|
133 |
+
* We cannot safely read from the file. Exit the
|
134 |
+
* do-while loop and trigger the exception condition
|
135 |
+
*
|
136 |
+
* @var string|bool
|
137 |
+
*/
|
138 |
+
$buf = false;
|
139 |
+
break;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
/**
|
143 |
+
* Decrease the number of bytes returned from remaining
|
144 |
+
*/
|
145 |
+
$remaining -= RandomCompat_strlen($read);
|
146 |
+
/**
|
147 |
+
* @var string|bool
|
148 |
+
*/
|
149 |
+
$buf = $buf . $read;
|
150 |
+
} while ($remaining > 0);
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Is our result valid?
|
154 |
+
*/
|
155 |
+
if (is_string($buf)) {
|
156 |
+
if (RandomCompat_strlen($buf) === $bytes) {
|
157 |
+
/**
|
158 |
+
* Return our random entropy buffer here:
|
159 |
+
*/
|
160 |
+
return $buf;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* If we reach here, PHP has failed us.
|
167 |
+
*/
|
168 |
+
throw new Exception(
|
169 |
+
'Error reading from source device'
|
170 |
+
);
|
171 |
+
}
|
172 |
+
}
|
includes/random_compat/random_bytes_libsodium.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('random_bytes')) {
|
30 |
+
/**
|
31 |
+
* If the libsodium PHP extension is loaded, we'll use it above any other
|
32 |
+
* solution.
|
33 |
+
*
|
34 |
+
* libsodium-php project:
|
35 |
+
* @ref https://github.com/jedisct1/libsodium-php
|
36 |
+
*
|
37 |
+
* @param int $bytes
|
38 |
+
*
|
39 |
+
* @throws Exception
|
40 |
+
*
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
function random_bytes($bytes)
|
44 |
+
{
|
45 |
+
try {
|
46 |
+
/** @var int $bytes */
|
47 |
+
$bytes = RandomCompat_intval($bytes);
|
48 |
+
} catch (TypeError $ex) {
|
49 |
+
throw new TypeError(
|
50 |
+
'random_bytes(): $bytes must be an integer'
|
51 |
+
);
|
52 |
+
}
|
53 |
+
|
54 |
+
if ($bytes < 1) {
|
55 |
+
throw new Error(
|
56 |
+
'Length must be greater than 0'
|
57 |
+
);
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be
|
62 |
+
* generated in one invocation.
|
63 |
+
*/
|
64 |
+
/** @var string|bool $buf */
|
65 |
+
if ($bytes > 2147483647) {
|
66 |
+
$buf = '';
|
67 |
+
for ($i = 0; $i < $bytes; $i += 1073741824) {
|
68 |
+
$n = ($bytes - $i) > 1073741824
|
69 |
+
? 1073741824
|
70 |
+
: $bytes - $i;
|
71 |
+
$buf .= \Sodium\randombytes_buf($n);
|
72 |
+
}
|
73 |
+
} else {
|
74 |
+
/** @var string|bool $buf */
|
75 |
+
$buf = \Sodium\randombytes_buf($bytes);
|
76 |
+
}
|
77 |
+
|
78 |
+
if (is_string($buf)) {
|
79 |
+
if (RandomCompat_strlen($buf) === $bytes) {
|
80 |
+
return $buf;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* If we reach here, PHP has failed us.
|
86 |
+
*/
|
87 |
+
throw new Exception(
|
88 |
+
'Could not gather sufficient random data'
|
89 |
+
);
|
90 |
+
}
|
91 |
+
}
|
includes/random_compat/random_bytes_libsodium_legacy.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('random_bytes')) {
|
30 |
+
/**
|
31 |
+
* If the libsodium PHP extension is loaded, we'll use it above any other
|
32 |
+
* solution.
|
33 |
+
*
|
34 |
+
* libsodium-php project:
|
35 |
+
* @ref https://github.com/jedisct1/libsodium-php
|
36 |
+
*
|
37 |
+
* @param int $bytes
|
38 |
+
*
|
39 |
+
* @throws Exception
|
40 |
+
*
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
function random_bytes($bytes)
|
44 |
+
{
|
45 |
+
try {
|
46 |
+
/** @var int $bytes */
|
47 |
+
$bytes = RandomCompat_intval($bytes);
|
48 |
+
} catch (TypeError $ex) {
|
49 |
+
throw new TypeError(
|
50 |
+
'random_bytes(): $bytes must be an integer'
|
51 |
+
);
|
52 |
+
}
|
53 |
+
|
54 |
+
if ($bytes < 1) {
|
55 |
+
throw new Error(
|
56 |
+
'Length must be greater than 0'
|
57 |
+
);
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @var string
|
62 |
+
*/
|
63 |
+
$buf = '';
|
64 |
+
|
65 |
+
/**
|
66 |
+
* \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be
|
67 |
+
* generated in one invocation.
|
68 |
+
*/
|
69 |
+
if ($bytes > 2147483647) {
|
70 |
+
for ($i = 0; $i < $bytes; $i += 1073741824) {
|
71 |
+
$n = ($bytes - $i) > 1073741824
|
72 |
+
? 1073741824
|
73 |
+
: $bytes - $i;
|
74 |
+
$buf .= Sodium::randombytes_buf((int) $n);
|
75 |
+
}
|
76 |
+
} else {
|
77 |
+
$buf .= Sodium::randombytes_buf((int) $bytes);
|
78 |
+
}
|
79 |
+
|
80 |
+
if (is_string($buf)) {
|
81 |
+
if (RandomCompat_strlen($buf) === $bytes) {
|
82 |
+
return $buf;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* If we reach here, PHP has failed us.
|
88 |
+
*/
|
89 |
+
throw new Exception(
|
90 |
+
'Could not gather sufficient random data'
|
91 |
+
);
|
92 |
+
}
|
93 |
+
}
|
includes/random_compat/random_bytes_mcrypt.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('random_bytes')) {
|
30 |
+
/**
|
31 |
+
* Powered by ext/mcrypt (and thankfully NOT libmcrypt)
|
32 |
+
*
|
33 |
+
* @ref https://bugs.php.net/bug.php?id=55169
|
34 |
+
* @ref https://github.com/php/php-src/blob/c568ffe5171d942161fc8dda066bce844bdef676/ext/mcrypt/mcrypt.c#L1321-L1386
|
35 |
+
*
|
36 |
+
* @param int $bytes
|
37 |
+
*
|
38 |
+
* @throws Exception
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
function random_bytes($bytes)
|
43 |
+
{
|
44 |
+
try {
|
45 |
+
/** @var int $bytes */
|
46 |
+
$bytes = RandomCompat_intval($bytes);
|
47 |
+
} catch (TypeError $ex) {
|
48 |
+
throw new TypeError(
|
49 |
+
'random_bytes(): $bytes must be an integer'
|
50 |
+
);
|
51 |
+
}
|
52 |
+
|
53 |
+
if ($bytes < 1) {
|
54 |
+
throw new Error(
|
55 |
+
'Length must be greater than 0'
|
56 |
+
);
|
57 |
+
}
|
58 |
+
|
59 |
+
/** @var string|bool $buf */
|
60 |
+
$buf = @mcrypt_create_iv((int) $bytes, (int) MCRYPT_DEV_URANDOM);
|
61 |
+
if (
|
62 |
+
is_string($buf)
|
63 |
+
&&
|
64 |
+
RandomCompat_strlen($buf) === $bytes
|
65 |
+
) {
|
66 |
+
/**
|
67 |
+
* Return our random entropy buffer here:
|
68 |
+
*/
|
69 |
+
return $buf;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* If we reach here, PHP has failed us.
|
74 |
+
*/
|
75 |
+
throw new Exception(
|
76 |
+
'Could not gather sufficient random data'
|
77 |
+
);
|
78 |
+
}
|
79 |
+
}
|
includes/random_compat/random_int.php
ADDED
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (!is_callable('random_int')) {
|
4 |
+
/**
|
5 |
+
* Random_* Compatibility Library
|
6 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
7 |
+
*
|
8 |
+
* The MIT License (MIT)
|
9 |
+
*
|
10 |
+
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
|
11 |
+
*
|
12 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
13 |
+
* of this software and associated documentation files (the "Software"), to deal
|
14 |
+
* in the Software without restriction, including without limitation the rights
|
15 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
16 |
+
* copies of the Software, and to permit persons to whom the Software is
|
17 |
+
* furnished to do so, subject to the following conditions:
|
18 |
+
*
|
19 |
+
* The above copyright notice and this permission notice shall be included in
|
20 |
+
* all copies or substantial portions of the Software.
|
21 |
+
*
|
22 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
23 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
24 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
25 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
26 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
27 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
28 |
+
* SOFTWARE.
|
29 |
+
*/
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Fetch a random integer between $min and $max inclusive
|
33 |
+
*
|
34 |
+
* @param int $min
|
35 |
+
* @param int $max
|
36 |
+
*
|
37 |
+
* @throws Exception
|
38 |
+
*
|
39 |
+
* @return int
|
40 |
+
*/
|
41 |
+
function random_int($min, $max)
|
42 |
+
{
|
43 |
+
/**
|
44 |
+
* Type and input logic checks
|
45 |
+
*
|
46 |
+
* If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX)
|
47 |
+
* (non-inclusive), it will sanely cast it to an int. If you it's equal to
|
48 |
+
* ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats
|
49 |
+
* lose precision, so the <= and => operators might accidentally let a float
|
50 |
+
* through.
|
51 |
+
*/
|
52 |
+
|
53 |
+
try {
|
54 |
+
/** @var int $min */
|
55 |
+
$min = RandomCompat_intval($min);
|
56 |
+
} catch (TypeError $ex) {
|
57 |
+
throw new TypeError(
|
58 |
+
'random_int(): $min must be an integer'
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
+
try {
|
63 |
+
/** @var int $max */
|
64 |
+
$max = RandomCompat_intval($max);
|
65 |
+
} catch (TypeError $ex) {
|
66 |
+
throw new TypeError(
|
67 |
+
'random_int(): $max must be an integer'
|
68 |
+
);
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Now that we've verified our weak typing system has given us an integer,
|
73 |
+
* let's validate the logic then we can move forward with generating random
|
74 |
+
* integers along a given range.
|
75 |
+
*/
|
76 |
+
if ($min > $max) {
|
77 |
+
throw new Error(
|
78 |
+
'Minimum value must be less than or equal to the maximum value'
|
79 |
+
);
|
80 |
+
}
|
81 |
+
|
82 |
+
if ($max === $min) {
|
83 |
+
return (int) $min;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Initialize variables to 0
|
88 |
+
*
|
89 |
+
* We want to store:
|
90 |
+
* $bytes => the number of random bytes we need
|
91 |
+
* $mask => an integer bitmask (for use with the &) operator
|
92 |
+
* so we can minimize the number of discards
|
93 |
+
*/
|
94 |
+
$attempts = $bits = $bytes = $mask = $valueShift = 0;
|
95 |
+
/** @var int $attempts */
|
96 |
+
/** @var int $bits */
|
97 |
+
/** @var int $bytes */
|
98 |
+
/** @var int $mask */
|
99 |
+
/** @var int $valueShift */
|
100 |
+
|
101 |
+
/**
|
102 |
+
* At this point, $range is a positive number greater than 0. It might
|
103 |
+
* overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to
|
104 |
+
* a float and we will lose some precision.
|
105 |
+
*
|
106 |
+
* @var int|float $range
|
107 |
+
*/
|
108 |
+
$range = $max - $min;
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Test for integer overflow:
|
112 |
+
*/
|
113 |
+
if (!is_int($range)) {
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Still safely calculate wider ranges.
|
117 |
+
* Provided by @CodesInChaos, @oittaa
|
118 |
+
*
|
119 |
+
* @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435
|
120 |
+
*
|
121 |
+
* We use ~0 as a mask in this case because it generates all 1s
|
122 |
+
*
|
123 |
+
* @ref https://eval.in/400356 (32-bit)
|
124 |
+
* @ref http://3v4l.org/XX9r5 (64-bit)
|
125 |
+
*/
|
126 |
+
$bytes = PHP_INT_SIZE;
|
127 |
+
/** @var int $mask */
|
128 |
+
$mask = ~0;
|
129 |
+
|
130 |
+
} else {
|
131 |
+
|
132 |
+
/**
|
133 |
+
* $bits is effectively ceil(log($range, 2)) without dealing with
|
134 |
+
* type juggling
|
135 |
+
*/
|
136 |
+
while ($range > 0) {
|
137 |
+
if ($bits % 8 === 0) {
|
138 |
+
++$bytes;
|
139 |
+
}
|
140 |
+
++$bits;
|
141 |
+
$range >>= 1;
|
142 |
+
/** @var int $mask */
|
143 |
+
$mask = $mask << 1 | 1;
|
144 |
+
}
|
145 |
+
$valueShift = $min;
|
146 |
+
}
|
147 |
+
|
148 |
+
/** @var int $val */
|
149 |
+
$val = 0;
|
150 |
+
/**
|
151 |
+
* Now that we have our parameters set up, let's begin generating
|
152 |
+
* random integers until one falls between $min and $max
|
153 |
+
*/
|
154 |
+
/** @psalm-suppress RedundantCondition */
|
155 |
+
do {
|
156 |
+
/**
|
157 |
+
* The rejection probability is at most 0.5, so this corresponds
|
158 |
+
* to a failure probability of 2^-128 for a working RNG
|
159 |
+
*/
|
160 |
+
if ($attempts > 128) {
|
161 |
+
throw new Exception(
|
162 |
+
'random_int: RNG is broken - too many rejections'
|
163 |
+
);
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Let's grab the necessary number of random bytes
|
168 |
+
*/
|
169 |
+
$randomByteString = random_bytes($bytes);
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Let's turn $randomByteString into an integer
|
173 |
+
*
|
174 |
+
* This uses bitwise operators (<< and |) to build an integer
|
175 |
+
* out of the values extracted from ord()
|
176 |
+
*
|
177 |
+
* Example: [9F] | [6D] | [32] | [0C] =>
|
178 |
+
* 159 + 27904 + 3276800 + 201326592 =>
|
179 |
+
* 204631455
|
180 |
+
*/
|
181 |
+
$val &= 0;
|
182 |
+
for ($i = 0; $i < $bytes; ++$i) {
|
183 |
+
$val |= ord($randomByteString[$i]) << ($i * 8);
|
184 |
+
}
|
185 |
+
/** @var int $val */
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Apply mask
|
189 |
+
*/
|
190 |
+
$val &= $mask;
|
191 |
+
$val += $valueShift;
|
192 |
+
|
193 |
+
++$attempts;
|
194 |
+
/**
|
195 |
+
* If $val overflows to a floating point number,
|
196 |
+
* ... or is larger than $max,
|
197 |
+
* ... or smaller than $min,
|
198 |
+
* then try again.
|
199 |
+
*/
|
200 |
+
} while (!is_int($val) || $val > $max || $val < $min);
|
201 |
+
|
202 |
+
return (int) $val;
|
203 |
+
}
|
204 |
+
}
|
ip-geo-block.php
CHANGED
@@ -7,15 +7,15 @@
|
|
7 |
* @package IP_Geo_Block
|
8 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
9 |
* @license GPL-3.0
|
10 |
-
* @link
|
11 |
* @copyright 2013-2018 tokkonopapa
|
12 |
*
|
13 |
* Plugin Name: IP Geo Block
|
14 |
-
* Plugin URI:
|
15 |
* Description: It blocks any spams, login attempts and malicious access to the admin area posted from outside your nation, and also prevents zero-day exploit.
|
16 |
-
* Version: 3.0.
|
17 |
* Author: tokkonopapa
|
18 |
-
* Author URI:
|
19 |
* Text Domain: ip-geo-block
|
20 |
* License: GPL-3.0
|
21 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
@@ -40,6 +40,7 @@ define( 'IP_GEO_BLOCK_BASE', plugin_basename( __FILE__ ) ); // @since 1.5
|
|
40 |
* Load class
|
41 |
*
|
42 |
*/
|
|
|
43 |
require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block.php';
|
44 |
require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-util.php';
|
45 |
require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-load.php';
|
@@ -72,7 +73,6 @@ register_deactivation_hook( __FILE__, 'ip_geo_block_deactivate' );
|
|
72 |
function ip_geo_block_update() {
|
73 |
$settings = IP_Geo_Block::get_option();
|
74 |
if ( version_compare( $settings['version'], IP_Geo_Block::VERSION ) < 0 ) {
|
75 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php'; // @since 3.0.0
|
76 |
ip_geo_block_activate( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) );
|
77 |
}
|
78 |
}
|
7 |
* @package IP_Geo_Block
|
8 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
9 |
* @license GPL-3.0
|
10 |
+
* @link https://www.ipgeoblock.com/
|
11 |
* @copyright 2013-2018 tokkonopapa
|
12 |
*
|
13 |
* Plugin Name: IP Geo Block
|
14 |
+
* Plugin URI: https://wordpress.org/plugins/ip-geo-block/
|
15 |
* Description: It blocks any spams, login attempts and malicious access to the admin area posted from outside your nation, and also prevents zero-day exploit.
|
16 |
+
* Version: 3.0.15
|
17 |
* Author: tokkonopapa
|
18 |
+
* Author URI: https://www.ipgeoblock.com/
|
19 |
* Text Domain: ip-geo-block
|
20 |
* License: GPL-3.0
|
21 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
40 |
* Load class
|
41 |
*
|
42 |
*/
|
43 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
44 |
require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block.php';
|
45 |
require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-util.php';
|
46 |
require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-load.php';
|
73 |
function ip_geo_block_update() {
|
74 |
$settings = IP_Geo_Block::get_option();
|
75 |
if ( version_compare( $settings['version'], IP_Geo_Block::VERSION ) < 0 ) {
|
|
|
76 |
ip_geo_block_activate( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) );
|
77 |
}
|
78 |
}
|
languages/ip-geo-block-ja.mo
CHANGED
Binary file
|
languages/ip-geo-block-ja.po
CHANGED
@@ -2,22 +2,22 @@
|
|
2 |
# This file is distributed under the same license as the IP Geo Block package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: IP Geo Block 3.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
|
7 |
-
"POT-Creation-Date: 2018-
|
8 |
-
"PO-Revision-Date: 2018-
|
9 |
"Language-Team: \n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Generator: Poedit 2.
|
14 |
"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
|
15 |
"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
-
"Plural-Forms: nplurals=
|
18 |
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
"Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
|
20 |
-
"Language:
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
|
23 |
#. Description of the plugin/theme
|
@@ -25,365 +25,407 @@ msgid ""
|
|
25 |
"It blocks any spams, login attempts and malicious access to the admin area "
|
26 |
"posted from outside your nation, and also prevents zero-day exploit."
|
27 |
msgstr ""
|
28 |
-
"
|
29 |
-
"
|
30 |
|
31 |
-
#: admin/class-ip-geo-block-admin.php:
|
32 |
-
msgid "
|
33 |
-
msgstr "
|
34 |
-
|
35 |
-
#: admin/class-ip-geo-block-admin.php:287
|
36 |
-
msgid "Create table ?"
|
37 |
-
msgstr "テーブルを作成しますか?"
|
38 |
|
39 |
-
#: admin/class-ip-geo-block-admin.php:
|
40 |
-
|
41 |
-
|
|
|
42 |
|
43 |
-
#: admin/class-ip-geo-block-admin.php:
|
44 |
-
msgid "
|
45 |
-
msgstr "
|
46 |
|
47 |
-
#: admin/class-ip-geo-block-admin.php:
|
48 |
-
msgid "
|
49 |
-
msgstr "
|
50 |
|
51 |
-
#: admin/class-ip-geo-block-admin.php:
|
52 |
-
msgid "
|
53 |
-
|
|
|
54 |
|
55 |
-
#: admin/class-ip-geo-block-admin.php:
|
56 |
msgid "ajax for logged-in user"
|
57 |
msgstr "認証済ユーザー用 ajax"
|
58 |
|
59 |
-
#: admin/class-ip-geo-block-admin.php:
|
60 |
msgid "ajax for non logged-in user"
|
61 |
msgstr "未認証ユーザー用 ajax"
|
62 |
|
63 |
-
#: admin/class-ip-geo-block-admin.php:
|
64 |
#, php-format
|
65 |
msgid "[Found: %d]"
|
66 |
msgstr "[見つかった数:%d]"
|
67 |
|
68 |
-
#: admin/class-ip-geo-block-admin.php:
|
69 |
#, php-format
|
70 |
msgid "Find and verify `%s` on “Logs” tab."
|
71 |
msgstr "ログから `%s` を検索し、検証して下さい。"
|
72 |
|
73 |
-
#: admin/class-ip-geo-block-admin.php:
|
74 |
msgid "This feature is available with HTML5 compliant browsers."
|
75 |
msgstr "HTML5準拠のブラウザでのみ機能します。"
|
76 |
|
77 |
-
#: admin/class-ip-geo-block-admin.php:
|
78 |
-
msgid "The selected row cannot be found in the
|
79 |
-
msgstr "
|
80 |
|
81 |
-
#: admin/class-ip-geo-block-admin.php:
|
82 |
-
#: admin/class-ip-geo-block-admin.php:
|
83 |
#, php-format
|
84 |
msgid "An error occurred while executing the ajax command `%s`."
|
85 |
msgstr "Ajaxコマンド `%s` の実行中にエラーが発生しました。"
|
86 |
|
87 |
-
#: admin/class-ip-geo-block-admin.php:
|
88 |
msgid "No data available in table"
|
89 |
msgstr "テーブルにデータがありません"
|
90 |
|
91 |
-
#: admin/class-ip-geo-block-admin.php:
|
92 |
msgid "No matching records found"
|
93 |
msgstr "一致するレコードがありません"
|
94 |
|
95 |
-
#: admin/class-ip-geo-block-admin.php:
|
96 |
-
#: admin/includes/class-admin-ajax.php:
|
97 |
-
#: admin/includes/class-admin-ajax.php:
|
98 |
-
#: admin/includes/tab-geolocation.php:
|
99 |
msgid "IP address"
|
100 |
msgstr "IPアドレス"
|
101 |
|
102 |
-
#: admin/class-ip-geo-block-admin.php:
|
103 |
-
#: admin/includes/class-admin-ajax.php:
|
104 |
-
#: admin/includes/class-admin-ajax.php:
|
105 |
msgid "Code"
|
106 |
msgstr "国"
|
107 |
|
108 |
-
#: admin/class-ip-geo-block-admin.php:
|
109 |
-
#: admin/includes/class-admin-ajax.php:
|
110 |
-
#: admin/includes/class-admin-ajax.php:
|
111 |
msgid "ASN"
|
112 |
msgstr "AS番号"
|
113 |
|
114 |
-
#: admin/class-ip-geo-block-admin.php:
|
115 |
-
#: admin/includes/class-admin-ajax.php:
|
116 |
msgid "Host name"
|
117 |
msgstr "ホスト名"
|
118 |
|
119 |
-
#: admin/class-ip-geo-block-admin.php:
|
120 |
-
#: admin/includes/class-admin-ajax.php:
|
121 |
-
#: admin/includes/class-admin-ajax.php:
|
122 |
msgid "Target"
|
123 |
msgstr "検証対象"
|
124 |
|
125 |
-
#: admin/class-ip-geo-block-admin.php:
|
126 |
-
#: admin/includes/class-admin-ajax.php:
|
127 |
msgid "Failure / Total"
|
128 |
msgstr "ログイン失敗/総計"
|
129 |
|
130 |
-
#: admin/class-ip-geo-block-admin.php:
|
131 |
-
#: admin/includes/class-admin-ajax.php:
|
132 |
msgid "Elapsed[sec]"
|
133 |
msgstr "経過 [秒]"
|
134 |
|
135 |
-
#: admin/class-ip-geo-block-admin.php:
|
136 |
-
#: admin/includes/class-admin-ajax.php:
|
137 |
msgid "Time"
|
138 |
msgstr "日時"
|
139 |
|
140 |
-
#: admin/class-ip-geo-block-admin.php:
|
141 |
-
#: admin/includes/class-admin-ajax.php:
|
142 |
msgid "Result"
|
143 |
msgstr "検証結果"
|
144 |
|
145 |
-
#: admin/class-ip-geo-block-admin.php:
|
146 |
-
#: admin/includes/class-admin-ajax.php:
|
147 |
msgid "Request"
|
148 |
msgstr "リクエスト"
|
149 |
|
150 |
-
#: admin/class-ip-geo-block-admin.php:
|
151 |
-
#: admin/includes/class-admin-ajax.php:
|
152 |
msgid "User agent"
|
153 |
msgstr "ユーザー・エージェント"
|
154 |
|
155 |
-
#: admin/class-ip-geo-block-admin.php:
|
156 |
-
#: admin/includes/class-admin-ajax.php:
|
157 |
msgid "HTTP headers"
|
158 |
msgstr "HTTP ヘッダー"
|
159 |
|
160 |
-
#: admin/class-ip-geo-block-admin.php:
|
161 |
-
#: admin/includes/class-admin-ajax.php:
|
162 |
msgid "$_POST data"
|
163 |
msgstr "$_POST データ"
|
164 |
|
165 |
-
#: admin/class-ip-geo-block-admin.php:
|
166 |
msgid "Contribute on GitHub"
|
167 |
msgstr "開発に参加"
|
168 |
|
169 |
-
#: admin/class-ip-geo-block-admin.php:
|
170 |
-
#: admin/class-ip-geo-block-admin.php:
|
171 |
-
#: admin/class-ip-geo-block-admin.php:
|
172 |
msgid "Settings"
|
173 |
msgstr "設定"
|
174 |
|
175 |
-
#: admin/class-ip-geo-block-admin.php:
|
176 |
-
#: admin/class-ip-geo-block-admin.php:
|
177 |
-
#: admin/class-ip-geo-block-admin.php:
|
178 |
-
#: admin/class-ip-geo-block-admin.php:
|
179 |
-
#: admin/class-ip-geo-block-admin.php:
|
180 |
-
#: admin/class-ip-geo-block-admin.php:
|
181 |
msgid "IP Geo Block"
|
182 |
msgstr "IP Geo Block"
|
183 |
|
184 |
-
#: admin/class-ip-geo-block-admin.php:
|
185 |
-
#: admin/class-ip-geo-block-admin.php:
|
186 |
msgid "Site List"
|
187 |
msgstr "サイト一覧"
|
188 |
|
189 |
-
#: admin/class-ip-geo-block-admin.php:
|
190 |
msgid "You need WordPress 3.7+."
|
191 |
msgstr "WordPress 3.7 以上が必要です。"
|
192 |
|
193 |
-
#: admin/class-ip-geo-block-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
#, php-format
|
195 |
msgid ""
|
196 |
"Now downloading geolocation databases in background. After a little while, "
|
197 |
"please check your country code and “<strong>Matching rule</"
|
198 |
"strong>” at <a href=\"%s\">Validation rule settings</a>."
|
199 |
msgstr ""
|
200 |
-
"
|
201 |
-
"
|
202 |
-
"検証ルールの設定</a>]で確認して下さい。"
|
203 |
|
204 |
-
#: admin/class-ip-geo-block-admin.php:
|
205 |
#, php-format
|
206 |
msgid ""
|
207 |
"The “<strong>Matching rule</strong>” is not set properly. Please "
|
208 |
"confirm it at <a href=\"%s\">Validation rule settings</a>."
|
209 |
msgstr ""
|
210 |
-
"[<strong>マッチング規則</strong>]が正しく設定されていません。[<a href=\"%s"
|
211 |
-
"
|
212 |
|
213 |
-
#: admin/class-ip-geo-block-admin.php:
|
214 |
msgid "Local database and matching rule have been updated."
|
215 |
msgstr "ローカル・データベースとマッチング規則を更新しました。"
|
216 |
|
217 |
-
#: admin/class-ip-geo-block-admin.php:
|
218 |
msgid ""
|
219 |
"Once you logout, you will be unable to login again because the number of "
|
220 |
"login attempts reaches the limit."
|
221 |
msgstr ""
|
222 |
-
"あなたのIP
|
223 |
-
"
|
224 |
|
225 |
-
#: admin/class-ip-geo-block-admin.php:
|
226 |
#, php-format
|
227 |
msgid ""
|
228 |
-
"Please
|
229 |
-
"tab
|
|
|
230 |
msgstr ""
|
231 |
-
"
|
232 |
-
"
|
233 |
|
234 |
-
#: admin/class-ip-geo-block-admin.php:
|
235 |
msgid ""
|
236 |
"Once you logout, you will be unable to login again because your country code "
|
237 |
"or IP address is in the blacklist."
|
238 |
msgstr ""
|
239 |
-
"あなたの国コードまたはIP
|
240 |
-
"
|
241 |
|
242 |
-
#: admin/class-ip-geo-block-admin.php:
|
243 |
msgid ""
|
244 |
"Once you logout, you will be unable to login again because your country code "
|
245 |
"or IP address is not in the whitelist."
|
246 |
msgstr ""
|
247 |
-
"あなたの国コードまたはIP
|
248 |
-
"
|
249 |
|
250 |
-
#: admin/class-ip-geo-block-admin.php:
|
251 |
#, php-format
|
252 |
msgid "Please check your “%sValidation rule settings%s”."
|
253 |
msgstr "[%s検証ルールの設定%s]を確認して下さい。"
|
254 |
|
255 |
-
#: admin/class-ip-geo-block-admin.php:
|
256 |
#, php-format
|
257 |
msgid ""
|
258 |
"Please confirm your local geolocation databases at “%sLocal database "
|
259 |
"settings%s” section and remove your IP address in cache at “"
|
260 |
"%sStatistics in cache%s” section."
|
261 |
msgstr ""
|
262 |
-
"[%sローカル・データベースの設定%s]で位置情報データベースを確認し、[%s
|
263 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
|
265 |
-
#: admin/class-ip-geo-block-admin.php:
|
266 |
msgid ""
|
267 |
"“mu-plugins” (ip-geo-block-mu.php) at “Validation "
|
268 |
"timing” is imcompatible with <strong>IP Geo Allow</strong>. Please "
|
269 |
"select “init” action hook."
|
270 |
msgstr ""
|
271 |
-
"[検証のタイミング]に「“mu-plugins” (ip-geo-block-mu.php)
|
272 |
-
"
|
273 |
-
"
|
274 |
|
275 |
-
#: admin/class-ip-geo-block-admin.php:
|
276 |
msgid "Statistics"
|
277 |
msgstr "統計"
|
278 |
|
279 |
-
#: admin/class-ip-geo-block-admin.php:
|
280 |
msgid "Logs"
|
281 |
msgstr "ログ"
|
282 |
|
283 |
-
#: admin/class-ip-geo-block-admin.php:
|
284 |
msgid "Search"
|
285 |
msgstr "検索"
|
286 |
|
287 |
-
#: admin/class-ip-geo-block-admin.php:
|
288 |
msgid "Attribution"
|
289 |
msgstr "リンク"
|
290 |
|
291 |
-
#: admin/class-ip-geo-block-admin.php:
|
292 |
-
#: admin/class-ip-geo-block-admin.php:
|
293 |
msgid "Network wide"
|
294 |
msgstr "ネットワーク管理"
|
295 |
|
296 |
-
#: admin/class-ip-geo-block-admin.php:
|
297 |
msgid "Toggle all"
|
298 |
msgstr "全てを開閉"
|
299 |
|
300 |
-
#: admin/class-ip-geo-block-admin.php:
|
301 |
msgid ""
|
302 |
"Independent of “Privacy and record settings”, you can see all "
|
303 |
"the requests validated by this plugin in almost real time."
|
304 |
msgstr ""
|
305 |
-
"
|
306 |
-
"
|
307 |
|
308 |
-
#: admin/class-ip-geo-block-admin.php:
|
309 |
msgid "Live update"
|
310 |
msgstr "ライブアップデート"
|
311 |
|
312 |
-
#: admin/class-ip-geo-block-admin.php:
|
313 |
msgid "Open a new window on clicking the link in the chart."
|
314 |
msgstr "チャート内のリンクをクリックすると、新しいウィンドウが開きます。"
|
315 |
|
316 |
-
#: admin/class-ip-geo-block-admin.php:
|
317 |
-
msgid "Open a new window"
|
318 |
-
msgstr "別窓で開く"
|
319 |
-
|
320 |
-
#: admin/class-ip-geo-block-admin.php:773
|
321 |
msgid "Thanks for providing these great services for free."
|
322 |
msgstr "これらのすばらしいサービスの提供元に、敬意と感謝の意を表します!"
|
323 |
|
324 |
-
#: admin/class-ip-geo-block-admin.php:
|
325 |
msgid ""
|
326 |
-
"(Most browsers will redirect you to each site <a href=\"
|
327 |
"ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
|
328 |
"when you click the link</a>.)"
|
329 |
msgstr ""
|
330 |
-
"(ほとんどのブラウザでは、<a href=\"
|
331 |
-
"
|
332 |
-
"a>。)"
|
333 |
|
334 |
-
#: admin/class-ip-geo-block-admin.php:
|
335 |
msgid "Back to top"
|
336 |
msgstr "トップに戻る"
|
337 |
|
338 |
-
#: admin/class-ip-geo-block-admin.php:
|
339 |
msgid "Enable"
|
340 |
msgstr "有効"
|
341 |
|
342 |
-
#: admin/class-ip-geo-block-admin.php:
|
343 |
msgid "Select one"
|
344 |
msgstr "何れかを選択"
|
345 |
|
346 |
-
#: admin/class-ip-geo-block-admin.php:
|
347 |
msgid "You do not have sufficient permissions to access this page."
|
348 |
msgstr "このページにアクセスするための十分な権限がありません。"
|
349 |
|
350 |
-
#: admin/class-ip-geo-block-admin.php:
|
351 |
#: admin/includes/class-admin-rewrite.php:194
|
352 |
-
#: classes/class-ip-geo-block-cron.php:
|
353 |
-
#: classes/class-ip-geo-block-cron.php:
|
354 |
-
#: classes/class-ip-geo-block-cron.php:
|
355 |
-
#: classes/class-ip-geo-block-opts.php:
|
356 |
#, php-format
|
357 |
msgid "Unable to write <code>%s</code>. Please check the permission."
|
358 |
msgstr "<code>%s</code> に書き込めません。パーミッションをチェックして下さい。"
|
359 |
|
360 |
-
#: admin/class-ip-geo-block-admin.php:
|
361 |
msgid "Settings saved."
|
362 |
msgstr "設定を保存しました。"
|
363 |
|
364 |
#: admin/includes/class-admin-ajax.php:72
|
|
|
|
|
365 |
msgid "n/a"
|
366 |
-
msgstr "利用不可"
|
367 |
-
|
368 |
-
#: admin/includes/class-admin-ajax.php:75 admin/includes/tab-settings.php:75
|
369 |
-
#: admin/includes/tab-settings.php:95
|
370 |
-
msgid "UNKNOWN"
|
371 |
msgstr "不明"
|
372 |
|
373 |
-
#: admin/includes/class-admin-ajax.php:
|
374 |
#, php-format
|
375 |
msgid "The user %s (user ID: %d) is in use."
|
376 |
msgstr "ユーザー %s(ユーザーID:%d)が使用中です。"
|
377 |
|
378 |
-
#: admin/includes/class-admin-ajax.php:
|
379 |
#, php-format
|
380 |
msgid ""
|
381 |
"illegal format at %s. Please delete the corresponding line and try again."
|
382 |
msgstr "%sは誤ったフォーマットです。該当行を削除し、再実行してください。"
|
383 |
|
384 |
#: admin/includes/class-admin-rewrite.php:168
|
385 |
-
#: classes/class-ip-geo-block-cron.php:
|
386 |
-
#: classes/class-ip-geo-block-cron.php:
|
387 |
#, php-format
|
388 |
msgid "Unable to read <code>%s</code>. Please check the permission."
|
389 |
msgstr "<code>%s</code> が読めません。パーミッションをチェックして下さい。"
|
@@ -403,32 +445,31 @@ msgstr "%s で既に「auto_prepend_file」が設定されています。"
|
|
403 |
msgid "Validation logs"
|
404 |
msgstr "検証のログ"
|
405 |
|
406 |
-
#: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:
|
407 |
-
#: admin/includes/tab-settings.php:1425
|
408 |
msgid "Help"
|
409 |
msgstr "ヘルプ"
|
410 |
|
411 |
-
#: admin/includes/tab-accesslog.php:
|
412 |
msgid "Comment post"
|
413 |
msgstr "コメント投稿"
|
414 |
|
415 |
-
#: admin/includes/tab-accesslog.php:
|
416 |
msgid "XML-RPC"
|
417 |
msgstr "XML-RPC"
|
418 |
|
419 |
-
#: admin/includes/tab-accesslog.php:
|
420 |
msgid "Login form"
|
421 |
msgstr "ログイン・フォーム"
|
422 |
|
423 |
-
#: admin/includes/tab-accesslog.php:
|
424 |
msgid "Admin area"
|
425 |
msgstr "管理領域"
|
426 |
|
427 |
-
#: admin/includes/tab-accesslog.php:
|
428 |
msgid "Public facing pages"
|
429 |
msgstr "一般公開ページ"
|
430 |
|
431 |
-
#: admin/includes/tab-accesslog.php:
|
432 |
msgid "All"
|
433 |
msgstr "全て"
|
434 |
|
@@ -436,104 +477,107 @@ msgstr "全て"
|
|
436 |
msgid "Select target"
|
437 |
msgstr "対象を選択"
|
438 |
|
439 |
-
#: admin/includes/tab-accesslog.php:
|
440 |
msgid "Search in logs"
|
441 |
msgstr "ログを検索"
|
442 |
|
443 |
-
#: admin/includes/tab-accesslog.php:
|
444 |
msgid "Reset"
|
445 |
msgstr "リセット"
|
446 |
|
447 |
-
#: admin/includes/tab-accesslog.php:
|
|
|
|
|
|
|
|
|
448 |
msgid "Bulk action"
|
449 |
msgstr "選択して実行"
|
450 |
|
451 |
-
#: admin/includes/tab-accesslog.php:
|
452 |
msgid "Remove entries by IP address"
|
453 |
msgstr "指定のIPアドレスでエントリを削除"
|
454 |
|
455 |
-
#: admin/includes/tab-accesslog.php:
|
456 |
msgid "Add IP address to “Whitelist”"
|
457 |
msgstr "IPアドレスをホワイトリストへ追加"
|
458 |
|
459 |
-
#: admin/includes/tab-accesslog.php:
|
460 |
msgid "Add IP address to “Blacklist”"
|
461 |
msgstr "IPアドレスをブラックリストへ追加"
|
462 |
|
463 |
-
#: admin/includes/tab-accesslog.php:
|
464 |
msgid "Add AS number to “Whitelist”"
|
465 |
msgstr "AS番号をホワイトリストへ追加"
|
466 |
|
467 |
-
#: admin/includes/tab-accesslog.php:
|
468 |
msgid "Add AS number to “Blacklist”"
|
469 |
msgstr "AS番号をブラックリストへ追加"
|
470 |
|
471 |
-
#: admin/includes/tab-accesslog.php:
|
472 |
-
#: admin/includes/tab-statistics.php:
|
473 |
msgid "Apply"
|
474 |
msgstr "実行する"
|
475 |
|
476 |
-
#: admin/includes/tab-accesslog.php:
|
477 |
msgid "Clear logs"
|
478 |
msgstr "ログをクリア"
|
479 |
|
480 |
-
#: admin/includes/tab-accesslog.php:
|
481 |
-
#: admin/includes/tab-statistics.php:
|
482 |
msgid "Clear all"
|
483 |
msgstr "全てをクリア"
|
484 |
|
485 |
-
#: admin/includes/tab-accesslog.php:
|
486 |
msgid "Export logs"
|
487 |
msgstr "ログをエクスポート"
|
488 |
|
489 |
-
#: admin/includes/tab-accesslog.php:
|
490 |
-
#: admin/includes/tab-statistics.php:
|
491 |
msgid "Export to the local file"
|
492 |
msgstr "ローカル・ファイルへエクスポートする"
|
493 |
|
494 |
-
#: admin/includes/tab-accesslog.php:
|
495 |
msgid "Export csv"
|
496 |
msgstr "CSVへエクスポート"
|
497 |
|
498 |
-
#: admin/includes/tab-accesslog.php:
|
499 |
-
#: admin/includes/tab-statistics.php:
|
500 |
#, php-format
|
501 |
-
msgid "[ %sRecord “
|
502 |
msgstr "[%s検証のログを記録%s]が無効です。"
|
503 |
|
504 |
-
#: admin/includes/tab-accesslog.php:
|
505 |
-
#: admin/includes/tab-statistics.php:
|
506 |
msgid ""
|
507 |
"Please set the proper condition to record and analyze the validation logs."
|
508 |
msgstr "検証のログを記録し分析するためには、適切な条件を設定して下さい。"
|
509 |
|
510 |
-
#: admin/includes/tab-attribution.php:
|
511 |
msgid "Attribution links"
|
512 |
msgstr "リンク"
|
513 |
|
514 |
-
#: admin/includes/tab-geolocation.php:
|
515 |
msgid "Search IP address geolocation"
|
516 |
msgstr "IPアドレスの位置情報を検索"
|
517 |
|
518 |
-
#: admin/includes/tab-geolocation.php:
|
519 |
msgid "Geolocation API"
|
520 |
msgstr "位置情報API"
|
521 |
|
522 |
-
#: admin/includes/tab-geolocation.php:
|
523 |
msgid ""
|
524 |
"<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
|
525 |
"Moreover, this option replaces the end of IP address with “***” "
|
526 |
"to make it anonymous.\">Anonymize IP address</dfn>"
|
527 |
msgstr ""
|
528 |
-
"<dfn title=\"IP
|
529 |
-
"
|
530 |
-
"アドレスを匿名化する</dfn>"
|
531 |
|
532 |
-
#: admin/includes/tab-geolocation.php:
|
533 |
msgid "Search geolocation"
|
534 |
msgstr "位置情報の検索"
|
535 |
|
536 |
-
#: admin/includes/tab-geolocation.php:
|
537 |
msgid "Search now"
|
538 |
msgstr "今すぐ検索"
|
539 |
|
@@ -549,71 +593,101 @@ msgstr "行数"
|
|
549 |
msgid "Columns"
|
550 |
msgstr "列数"
|
551 |
|
552 |
-
#: admin/includes/tab-network.php:
|
553 |
msgid "Chart display layout"
|
554 |
msgstr "チャートの表示レイアウト"
|
555 |
|
556 |
-
#: admin/includes/tab-network.php:
|
557 |
msgid "Latest 1 hour"
|
558 |
msgstr "最新の1時間"
|
559 |
|
560 |
-
#: admin/includes/tab-network.php:
|
561 |
msgid "Latest 24 hours"
|
562 |
msgstr "最新の24時間"
|
563 |
|
564 |
-
#: admin/includes/tab-network.php:
|
565 |
msgid "Latest 1 week"
|
566 |
msgstr "最新の1週間"
|
567 |
|
568 |
-
#: admin/includes/tab-network.php:
|
569 |
msgid "Duration to retrieve"
|
570 |
msgstr "取得する期間"
|
571 |
|
572 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
msgid "Validation rule settings"
|
574 |
msgstr "検証ルールの設定"
|
575 |
|
576 |
-
#: admin/includes/tab-settings.php:
|
577 |
msgid ""
|
578 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
579 |
"code by referring “Scan country code”.\">Your IP address / "
|
580 |
"Country</dfn>"
|
581 |
msgstr ""
|
582 |
-
"<dfn title=\"[国コードを検索する]を参照し、適切な位置情報API
|
583 |
-
"
|
584 |
|
585 |
-
#: admin/includes/tab-settings.php:
|
586 |
msgid "Scan all the APIs you selected at Geolocation API settings"
|
587 |
msgstr "選択された位置情報APIを検索します"
|
588 |
|
589 |
-
#: admin/includes/tab-settings.php:
|
590 |
msgid "Scan country code"
|
591 |
msgstr "国コードを検索する"
|
592 |
|
593 |
-
#: admin/includes/tab-settings.php:
|
594 |
msgid ""
|
595 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
596 |
"code by referring “Scan country code”.\">Server IP address / "
|
597 |
"Country</dfn>"
|
598 |
msgstr ""
|
599 |
-
"<dfn title=\"[国コードを検索する]を参照し、適切な位置情報API
|
600 |
-
"
|
601 |
|
602 |
-
#: admin/includes/tab-settings.php:
|
603 |
msgid "Whitelist"
|
604 |
msgstr "ホワイトリスト"
|
605 |
|
606 |
-
#: admin/includes/tab-settings.php:
|
607 |
msgid "Blacklist"
|
608 |
msgstr "ブラックリスト"
|
609 |
|
610 |
-
#: admin/includes/tab-settings.php:
|
611 |
msgid ""
|
612 |
"Please select either “Whitelist” or “Blacklist”."
|
613 |
-
msgstr ""
|
614 |
-
"「ホワイトリスト」または「ブラックリスト」のどちらかを選択してください。"
|
615 |
|
616 |
-
#: admin/includes/tab-settings.php:
|
617 |
msgid ""
|
618 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
619 |
"empty. The special code “XX” is assigned as private IP address "
|
@@ -622,12 +696,11 @@ msgid ""
|
|
622 |
"the code that does not correspond to any of the countries.\">Whitelist of "
|
623 |
"country code</dfn>"
|
624 |
msgstr ""
|
625 |
-
"<dfn title=\"
|
626 |
-
"
|
627 |
-
"
|
628 |
-
"要な場合には、「YY」を指定してください。\">国コードのホワイトリスト</dfn>"
|
629 |
|
630 |
-
#: admin/includes/tab-settings.php:
|
631 |
msgid ""
|
632 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
633 |
"empty. The special code “XX” is assigned as private IP address "
|
@@ -636,97 +709,59 @@ msgid ""
|
|
636 |
"the code that does not correspond to any of the countries.\">Blacklist of "
|
637 |
"country code</dfn>"
|
638 |
msgstr ""
|
639 |
-
"<dfn title=\"
|
640 |
-
"
|
641 |
-
"
|
642 |
-
"要な場合には、「YY」を指定してください。\">国コードのブラックリスト</dfn>"
|
643 |
|
644 |
-
#: admin/includes/tab-settings.php:
|
645 |
-
msgid "(comma separated)"
|
646 |
-
msgstr "(カンマ区切り)"
|
647 |
-
|
648 |
-
#: admin/includes/tab-settings.php:116
|
649 |
-
msgid "(comma or RET separated)"
|
650 |
-
msgstr "(カンマ、改行区切り)"
|
651 |
-
|
652 |
-
#: admin/includes/tab-settings.php:117
|
653 |
-
msgid "Toggle selection"
|
654 |
-
msgstr "選択を切り替える"
|
655 |
-
|
656 |
-
#: admin/includes/tab-settings.php:118
|
657 |
-
msgid "Find blocked requests in “Logs“"
|
658 |
-
msgstr "ログから遮断されたリクエストを検索する"
|
659 |
-
|
660 |
-
#: admin/includes/tab-settings.php:119
|
661 |
-
msgid ""
|
662 |
-
"Before adding as “Exception”, please click on “<a class="
|
663 |
-
"\"ip-geo-block-icon ip-geo-block-icon-alert\" title=\"This button is just a "
|
664 |
-
"sample.\"><span></span></a>” button (if exists) attached to the "
|
665 |
-
"following list to confirm that the blocked request is not malicious."
|
666 |
-
msgstr ""
|
667 |
-
"[例外]に追加する前に、以下の候補に付いたボタン “<a class=\"ip-geo-"
|
668 |
-
"block-icon ip-geo-block-icon-alert\" title=\"このボタンは単なるサンプルで"
|
669 |
-
"す。\"><span></span></a>”(もしあれば)をクリックし、遮断されたリクエス"
|
670 |
-
"トに悪意のないことを確認して下さい。"
|
671 |
-
|
672 |
-
#: admin/includes/tab-settings.php:120
|
673 |
-
msgid "Open CIDR calculator for IPv4 / IPv6."
|
674 |
-
msgstr "IPv4/IPv6用CIDR変換プログラムを開きます。"
|
675 |
-
|
676 |
-
#: admin/includes/tab-settings.php:127 admin/includes/tab-settings.php:794
|
677 |
msgid "Matching rule"
|
678 |
msgstr "マッチング規則"
|
679 |
|
680 |
-
#: admin/includes/tab-settings.php:
|
681 |
msgid ""
|
682 |
"A request from which the country code or IP address is <strong>NOT</strong> "
|
683 |
"in the whitelist will be blocked."
|
684 |
msgstr ""
|
685 |
-
"国コードまたはIPアドレスがホワイトリストに<strong>含まれていない</strong
|
686 |
-
"エストを遮断します。"
|
687 |
|
688 |
-
#: admin/includes/tab-settings.php:
|
689 |
msgid ""
|
690 |
"A request from which the country code or IP address is in the blacklist will "
|
691 |
"be blocked."
|
692 |
-
msgstr ""
|
693 |
-
"国コードまたはIPアドレスがブラックリストに<strong>含まれている</strong>リクエ"
|
694 |
-
"ストを遮断します。"
|
695 |
|
696 |
-
#: admin/includes/tab-settings.php:
|
697 |
msgid ""
|
698 |
"<dfn title=\"It enables utilizing “AS number” in the “"
|
699 |
"Whitelist/Blacklist of extra IP addresses” to specify a group of IP "
|
700 |
"networks.\">Use Autonomous System Number</dfn>"
|
701 |
msgstr ""
|
702 |
-
"<dfn title=\"ホワイトリスト、ブラックリストにIP
|
703 |
-
"
|
704 |
-
"用可能にする</dfn>"
|
705 |
|
706 |
-
#: admin/includes/tab-settings.php:
|
707 |
#, php-format
|
708 |
msgid "Some useful tools to find ASN are introduced in “%s”."
|
709 |
msgstr "AS番号の検索に役立つツールを “%s” に紹介しています。"
|
710 |
|
711 |
-
#: admin/includes/tab-settings.php:
|
712 |
msgid ""
|
713 |
"<dfn title=\"e.g. “192.0.64.0/18” for Jetpack server, "
|
714 |
"“69.46.36.0/27” for WordFence server or “AS32934” "
|
715 |
"for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
|
716 |
msgstr ""
|
717 |
-
"<dfn title=\"例)192.0.64.0/18(Jetpackサーバー)、69.46.36.0/27(WordFence"
|
718 |
-
"
|
719 |
-
"トリスト</dfn>"
|
720 |
|
721 |
-
#: admin/includes/tab-settings.php:
|
722 |
msgid ""
|
723 |
"<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
|
724 |
"\">Blacklist of extra IP addresses prior to country code</dfn>"
|
725 |
msgstr ""
|
726 |
-
"<dfn title=\"サーバー・レベルのアクセス制御の使用をお勧めします(例:."
|
727 |
-
"
|
728 |
|
729 |
-
#: admin/includes/tab-settings.php:
|
730 |
msgid ""
|
731 |
"<dfn title=\"If your server is placed behind the proxy server or the load "
|
732 |
"balancing server, you need to put the appropriate key such as “"
|
@@ -734,12 +769,11 @@ msgid ""
|
|
734 |
"that to retrieve the client IP address.\">$_SERVER keys to retrieve extra IP "
|
735 |
"addresses</dfn>"
|
736 |
msgstr ""
|
737 |
-
"<dfn title=\"
|
738 |
-
"
|
739 |
-
"
|
740 |
-
"してください。\">IPアドレスを追加抽出する $_SERVER のキー</dfn>"
|
741 |
|
742 |
-
#: admin/includes/tab-settings.php:
|
743 |
msgid ""
|
744 |
"<dfn title=\"It validates malicious signatures independently of “Block "
|
745 |
"by country” and “Prevent Zero-day Exploit” for the target "
|
@@ -749,53 +783,45 @@ msgid ""
|
|
749 |
"block-decode\" title=\"When you find ugly character string in the text area, "
|
750 |
"please click to restore.\"><span></span></a>)</nobr>"
|
751 |
msgstr ""
|
752 |
-
"<dfn title=\"
|
753 |
-
"
|
754 |
-
"
|
755 |
-
"
|
756 |
-
"block-decode\" title=\"文字化けした場合、クリックして復元して下さ"
|
757 |
-
"い。\"><span></span></a>)</nobr>"
|
758 |
|
759 |
-
#: admin/includes/tab-settings.php:
|
760 |
msgid ""
|
761 |
"<dfn title=\"Select allowed MIME type.\">Whitelist of allowed MIME type</dfn>"
|
762 |
-
msgstr ""
|
763 |
-
"<dfn title=\"許可する MIME タイプを指定します。\">許可する MIME タイプのホワイ"
|
764 |
-
"トリスト</dfn>"
|
765 |
|
766 |
-
#: admin/includes/tab-settings.php:
|
767 |
msgid ""
|
768 |
"<dfn title=\"Put forbidden file extensions.\">Blacklist of forbidden file "
|
769 |
"extensions</dfn>"
|
770 |
msgstr ""
|
771 |
-
"<dfn title=\"禁止するファイルの拡張子を設定します。\"
|
772 |
-
"ブラックリスト</dfn>"
|
773 |
|
774 |
-
#: admin/includes/tab-settings.php:
|
775 |
msgid ""
|
776 |
"<dfn title=\"Specify the capabilities to be verified. Depending on the "
|
777 |
"particular type of uploader, certain capability may be required. Default is "
|
778 |
"“upload_files” for Administrator, Editor and Author. This "
|
779 |
"verification will be skipped if empty.\">Capabilities to be verified</dfn>"
|
780 |
msgstr ""
|
781 |
-
"<dfn title=\"
|
782 |
-
"
|
783 |
-
"
|
784 |
-
"スキップされます。\">検証する権限</dfn>"
|
785 |
|
786 |
-
#: admin/includes/tab-settings.php:
|
787 |
msgid ""
|
788 |
"( See “<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
|
789 |
"Roles_and_Capabilities\" title=\"Roles and Capabilities « WordPress "
|
790 |
"Codex\">Roles and Capabilities</a>” )"
|
791 |
msgstr ""
|
|
|
|
|
|
|
792 |
|
793 |
-
|
794 |
-
"%E3%82%B6%E3%83%BC%E3%81%AE%E7%A8%AE%E9%A1%9E%E3%81%A8%E6%A8%A9%E9%99%90\" "
|
795 |
-
"title=\"ユーザーの種類と権限 - WordPress Codex 日本語版\">ユーザーの種類と権限"
|
796 |
-
"</a>“ を参照)"
|
797 |
-
|
798 |
-
#: admin/includes/tab-settings.php:307
|
799 |
msgid ""
|
800 |
"<dfn title=\"It restricts the file types on upload in order to block malware "
|
801 |
"and backdoor via both back-end and front-end. Please consider to select "
|
@@ -803,46 +829,34 @@ msgid ""
|
|
803 |
"timing” so that other staff would not fetch the uploaded files before "
|
804 |
"this validation.\">Prevent malicious file uploading</dfn>"
|
805 |
msgstr ""
|
806 |
-
"<dfn title=\"
|
807 |
-
"
|
808 |
-
"
|
809 |
-
"
|
810 |
-
|
811 |
-
|
812 |
-
#: admin/includes/tab-settings.php:
|
813 |
-
#: admin/includes/tab-settings.php:623 admin/includes/tab-settings.php:1209
|
814 |
msgid "Disable"
|
815 |
msgstr "無効"
|
816 |
|
817 |
-
#: admin/includes/tab-settings.php:
|
818 |
msgid "Verify file extension and MIME type"
|
819 |
msgstr "拡張子と MIME タイプを検証"
|
820 |
|
821 |
-
#: admin/includes/tab-settings.php:
|
822 |
msgid "Verify file extension only"
|
823 |
msgstr "ファイル拡張子のみを検証"
|
824 |
|
825 |
-
#: admin/includes/tab-settings.php:
|
826 |
-
msgid ""
|
827 |
-
"<dfn title=\"This is applied to “XML-RPC” and “Login "
|
828 |
-
"form”. Lockout period is defined as expiration time of “IP "
|
829 |
-
"address Cache” in “Privacy and record settings” section."
|
830 |
-
"\">Max number of failed login attempts per IP address</dfn>"
|
831 |
-
msgstr ""
|
832 |
-
"<dfn title=\"[XML-RPC]と[ログイン・フォーム]に適用されます。ロックアウト時"
|
833 |
-
"間は[プライバシーと記録の設定]»[IPアドレスのキャッシュ]»[有効"
|
834 |
-
"時間]で定義します。\">IPアドレス当たりのログイン試行可能回数</dfn>"
|
835 |
-
|
836 |
-
#: admin/includes/tab-settings.php:355
|
837 |
#, php-format
|
838 |
msgid ""
|
839 |
"<dfn title=\"You can put your original 403.php and so on into your theme "
|
840 |
"directory.\">Response code</dfn> %s"
|
841 |
msgstr ""
|
842 |
-
"<dfn title=\"テーマ・ディレクトリには 403.php
|
843 |
-
"
|
844 |
|
845 |
-
#: admin/includes/tab-settings.php:
|
846 |
msgid ""
|
847 |
"<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
|
848 |
"to a public facing page, visitors would not be blocked on the page to "
|
@@ -850,231 +864,248 @@ msgid ""
|
|
850 |
"[Front-end target settings] section. Empty URL is altered to your home."
|
851 |
"\">Redirect URL</dfn>"
|
852 |
msgstr ""
|
853 |
-
"<dfn title=\"レスポンス・コード 2xx 、3xx 用のリダイレクト先 URL
|
854 |
-
"
|
855 |
-
"
|
856 |
-
"す。\">リダイレクト先 URL</dfn>"
|
857 |
|
858 |
-
#: admin/includes/tab-settings.php:
|
859 |
msgid ""
|
860 |
"<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
|
861 |
"message</dfn>"
|
862 |
msgstr ""
|
863 |
-
"<dfn title=\"レスポンス・コード 4xx、5xx 用のメッセージを指定します。\"
|
864 |
-
"ンス・メッセージ</dfn>"
|
865 |
|
866 |
-
#: admin/includes/tab-settings.php:
|
867 |
msgid "Select when to run the validation."
|
868 |
msgstr "検証を実行するタイミングを選択します。"
|
869 |
|
870 |
-
#: admin/includes/tab-settings.php:
|
871 |
msgid "Validation timing"
|
872 |
msgstr "検証のタイミング"
|
873 |
|
874 |
-
#: admin/includes/tab-settings.php:
|
875 |
msgid "“init” action hook"
|
876 |
msgstr "“init” アクション・フック"
|
877 |
|
878 |
-
#: admin/includes/tab-settings.php:
|
879 |
msgid "“mu-plugins” (ip-geo-block-mu.php)"
|
880 |
msgstr "“mu-plugins” (ip-geo-block-mu.php)"
|
881 |
|
882 |
-
#: admin/includes/tab-settings.php:
|
883 |
msgid ""
|
884 |
"Validate at “init” action hook in the same manner as typical "
|
885 |
"plugins."
|
886 |
-
msgstr ""
|
887 |
-
"標準的な他のプラグインと同様、init アクション・フックのタイミングで検証を実行"
|
888 |
-
"します。"
|
889 |
|
890 |
-
#: admin/includes/tab-settings.php:
|
891 |
msgid ""
|
892 |
"Validate at an earlier phase than other typical plugins. It can reduce load "
|
893 |
-
"on server but has <a rel='noreferrer' href='
|
894 |
"validation-timing.html' title='Validation timing | IP Geo Block'>some "
|
895 |
"restrictions</a>."
|
896 |
msgstr ""
|
897 |
-
"
|
898 |
-
"
|
899 |
-
"
|
900 |
-
"の制限事項</a> が生じます。"
|
901 |
|
902 |
-
#: admin/includes/tab-settings.php:
|
903 |
msgid "Back-end target settings"
|
904 |
msgstr "バックエンドの設定"
|
905 |
|
906 |
-
#: admin/includes/tab-settings.php:
|
907 |
#, php-format
|
908 |
msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
|
909 |
msgstr "<dfn title=\"%s へのリクエストを検証します。\">%s</dfn>"
|
910 |
|
911 |
-
#: admin/includes/tab-settings.php:
|
912 |
msgid "Other areas"
|
913 |
msgstr "その他の領域"
|
914 |
|
915 |
-
#: admin/includes/tab-settings.php:
|
916 |
msgid "public facing pages"
|
917 |
msgstr "一般公開ページ"
|
918 |
|
919 |
-
#: admin/includes/tab-settings.php:
|
920 |
-
#: admin/includes/tab-settings.php:
|
921 |
-
#: admin/includes/tab-settings.php:
|
922 |
msgid "Block by country"
|
923 |
msgstr "国コードで遮断"
|
924 |
|
925 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
926 |
msgid "Completely close"
|
927 |
msgstr "完全に閉鎖"
|
928 |
|
929 |
-
#: admin/includes/tab-settings.php:
|
930 |
msgid "Action to login as a registered user."
|
931 |
msgstr "登録済みユーザーとしてログインするアクション。"
|
932 |
|
933 |
-
#: admin/includes/tab-settings.php:
|
934 |
msgid "Log in"
|
935 |
msgstr "ログイン"
|
936 |
|
937 |
-
#: admin/includes/tab-settings.php:
|
938 |
msgid "Action to register new users."
|
939 |
msgstr "新規ユーザーを登録するアクション。"
|
940 |
|
941 |
-
#: admin/includes/tab-settings.php:
|
942 |
msgid "Register"
|
943 |
msgstr "登録"
|
944 |
|
945 |
-
#: admin/includes/tab-settings.php:
|
946 |
msgid "Action to reset a password to create a new one."
|
947 |
msgstr "パスワードをリセットし、新しいパスワードに更新するアクション。"
|
948 |
|
949 |
-
#: admin/includes/tab-settings.php:
|
950 |
msgid "Password Reset"
|
951 |
msgstr "パスワードのリセット"
|
952 |
|
953 |
-
#: admin/includes/tab-settings.php:
|
954 |
msgid "Action to email a password to a registered user."
|
955 |
msgstr "登録済みユーザーにパスワードを送付するアクション。"
|
956 |
|
957 |
-
#: admin/includes/tab-settings.php:
|
958 |
msgid "Lost Password"
|
959 |
msgstr "パスワード紛失"
|
960 |
|
961 |
-
#: admin/includes/tab-settings.php:
|
962 |
msgid ""
|
963 |
"Action to show prompt to enter a password on password protected post and "
|
964 |
"page."
|
965 |
-
msgstr ""
|
966 |
-
"パスワードで保護された投稿とページにパスワードを入力するプロンプトを表示するア"
|
967 |
-
"クション。"
|
968 |
|
969 |
-
#: admin/includes/tab-settings.php:
|
970 |
msgid "Password protected"
|
971 |
msgstr "パスワード保護"
|
972 |
|
973 |
-
#: admin/includes/tab-settings.php:
|
974 |
msgid ""
|
975 |
"<dfn title=\"Specify the individual action as a blocking target.\">Target "
|
976 |
"actions</dfn>"
|
977 |
-
msgstr ""
|
978 |
-
"<dfn title=\"遮断対象とするアクションを指定します。\">対象アクション</dfn>"
|
979 |
|
980 |
-
#: admin/includes/tab-settings.php:
|
981 |
msgid "Prevent Zero-day Exploit"
|
982 |
msgstr "ゼロデイ攻撃を遮断"
|
983 |
|
984 |
-
#: admin/includes/tab-settings.php:
|
985 |
msgid ""
|
986 |
"It will block a request related to the services for both public facing pages "
|
987 |
"and the dashboard."
|
988 |
-
msgstr ""
|
989 |
-
"一般公開ページとダッシュボード向けサービスに関連するリクエストを遮断します。"
|
990 |
|
991 |
-
#: admin/includes/tab-settings.php:
|
992 |
msgid ""
|
993 |
"Regardless of the country code, it will block a malicious request related to "
|
994 |
"the services only for the dashboard."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
995 |
msgstr ""
|
996 |
-
"
|
997 |
-
"
|
998 |
|
999 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
1000 |
msgid "admin post for logged-in user"
|
1001 |
msgstr "認証済ユーザー用 admin post"
|
1002 |
|
1003 |
-
#: admin/includes/tab-settings.php:
|
1004 |
msgid "admin post for non logged-in user"
|
1005 |
msgstr "未認証ユーザー用 admin post"
|
1006 |
|
1007 |
-
#: admin/includes/tab-settings.php:
|
1008 |
msgid "Admin ajax/post"
|
1009 |
msgstr "管理領域 ajax/post"
|
1010 |
|
1011 |
-
#: admin/includes/tab-settings.php:
|
1012 |
msgid ""
|
1013 |
"Specify the action name (“action=…”) or the page name "
|
1014 |
"(“page=…”) to prevent unintended blocking caused by "
|
1015 |
"“Block by country” (for non logged-in user) and “Prevent "
|
1016 |
"Zero-day Exploit” (for logged-in user)."
|
1017 |
msgstr ""
|
1018 |
-
"
|
1019 |
-
"
|
1020 |
-
"
|
1021 |
-
"
|
1022 |
-
|
1023 |
-
|
1024 |
-
#: admin/includes/tab-settings.php:
|
1025 |
-
#: admin/includes/tab-settings.php:747
|
1026 |
msgid "Exceptions"
|
1027 |
msgstr "例外"
|
1028 |
|
1029 |
-
#: admin/includes/tab-settings.php:
|
1030 |
msgid "Toggle with non logged-in user"
|
1031 |
msgstr "未認証ユーザー用を含む項目に限定して表示する"
|
1032 |
|
1033 |
-
#: admin/includes/tab-settings.php:
|
1034 |
msgid "Candidate actions/pages"
|
1035 |
msgstr "候補 アクション/ページ"
|
1036 |
|
1037 |
-
#: admin/includes/tab-settings.php:
|
1038 |
#, php-format
|
1039 |
msgid ""
|
1040 |
"Regardless of the country code, it will block a malicious request to <code>"
|
1041 |
"%s⋯/*.php</code>."
|
1042 |
-
msgstr ""
|
1043 |
-
"国コードに拘らず、<code>%s⋯/*.php</code>への悪意のあるリクエストを遮断し"
|
1044 |
-
"ます。"
|
1045 |
|
1046 |
-
#: admin/includes/tab-settings.php:
|
1047 |
msgid ""
|
1048 |
"Select the item which causes unintended blocking in order to exclude from "
|
1049 |
"the validation target. Grayed item indicates “INACTIVE”."
|
1050 |
msgstr ""
|
1051 |
-
"
|
1052 |
-
"
|
1053 |
|
1054 |
-
#: admin/includes/tab-settings.php:
|
1055 |
#, php-format
|
1056 |
msgid ""
|
1057 |
"It configures “%s” to validate a direct request to the PHP file "
|
1058 |
"which does not load WordPress core. Make sure to deny direct access to the "
|
1059 |
"hidden files beginning with a dot by the server's configuration."
|
1060 |
msgstr ""
|
1061 |
-
"WordPressコアを読み込まないPHP
|
1062 |
-
"
|
1063 |
-
"設定されていることを確認して下さい。"
|
1064 |
|
1065 |
-
#: admin/includes/tab-settings.php:
|
1066 |
msgid "Sorry, but your server type is not supported."
|
1067 |
msgstr "このサーバーではサポートされません。"
|
1068 |
|
1069 |
-
#: admin/includes/tab-settings.php:
|
1070 |
msgid ""
|
1071 |
-
"You need to click
|
1072 |
-
"
|
1073 |
-
msgstr ""
|
1074 |
-
"インポートされた設定を有効にするには、[変更を保存]ボタンをクリックする必要が"
|
1075 |
-
"あります。"
|
1076 |
|
1077 |
-
#: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:
|
1078 |
msgid "Force to load WP core"
|
1079 |
msgstr "WPコアの読み込みを強制"
|
1080 |
|
@@ -1082,103 +1113,105 @@ msgstr "WPコアの読み込みを強制"
|
|
1082 |
msgid "Plugins area"
|
1083 |
msgstr "プラグイン領域"
|
1084 |
|
1085 |
-
#: admin/includes/tab-settings.php:
|
1086 |
msgid "Themes area"
|
1087 |
msgstr "テーマ領域"
|
1088 |
|
1089 |
-
#: admin/includes/tab-settings.php:
|
1090 |
msgid "Front-end target settings"
|
1091 |
msgstr "フロントエンドの設定"
|
1092 |
|
1093 |
-
#: admin/includes/tab-settings.php:
|
1094 |
msgid "Follow “Validation rule settings”"
|
1095 |
msgstr "[検証ルールの設定]に従う"
|
1096 |
|
1097 |
-
#: admin/includes/tab-settings.php:
|
1098 |
#, php-format
|
1099 |
msgid ""
|
1100 |
"<dfn title=\"You can configure a different response code from the Back-end. "
|
1101 |
"This is useful to prevent violation against your affiliate program."
|
1102 |
"\">Response code</dfn> %s"
|
1103 |
msgstr ""
|
1104 |
-
"<dfn title=\"
|
1105 |
-
"
|
1106 |
-
"ス・コード</dfn> %s"
|
1107 |
|
1108 |
-
#: admin/includes/tab-settings.php:
|
1109 |
msgid ""
|
1110 |
"<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
|
1111 |
msgstr "<dfn title=\"特定のページを遮断対象に指定します。\">ページ</dfn>"
|
1112 |
|
1113 |
-
#: admin/includes/tab-settings.php:
|
1114 |
msgid ""
|
1115 |
"<dfn title=\"Specify the individual post type on a single page as a blocking "
|
1116 |
"target.\">Post type</dfn>"
|
1117 |
-
msgstr ""
|
1118 |
-
"<dfn title=\"特定の投稿タイプのシングルページを遮断対象に指定します。\">投稿タ"
|
1119 |
-
"イプ</dfn>"
|
1120 |
|
1121 |
-
#: admin/includes/tab-settings.php:
|
1122 |
msgid ""
|
1123 |
"<dfn title=\"Specify the individual category on a single page or archive "
|
1124 |
"page as a blocking target.\">Category</dfn>"
|
1125 |
msgstr ""
|
1126 |
-
"<dfn title=\"
|
1127 |
-
"
|
1128 |
|
1129 |
-
#: admin/includes/tab-settings.php:
|
1130 |
msgid ""
|
1131 |
"<dfn title=\"Specify the individual tag on a single page or archive page as "
|
1132 |
"a blocking target.\">Tag</dfn>"
|
1133 |
msgstr ""
|
1134 |
-
"<dfn title=\"
|
1135 |
-
"します。\">タグ</dfn>"
|
1136 |
|
1137 |
-
#: admin/includes/tab-settings.php:
|
1138 |
msgid "Specify the validation target on front-end."
|
1139 |
msgstr "フロントエンドの検証対象を設定します。"
|
1140 |
|
1141 |
-
#: admin/includes/tab-settings.php:
|
1142 |
msgid "Validation target"
|
1143 |
msgstr "検証対象"
|
1144 |
|
1145 |
-
#: admin/includes/tab-settings.php:
|
1146 |
msgid "All requests"
|
1147 |
msgstr "全てのリクエスト"
|
1148 |
|
1149 |
-
#: admin/includes/tab-settings.php:
|
1150 |
msgid "Specify the targets"
|
1151 |
msgstr "ターゲットを指定"
|
1152 |
|
1153 |
-
#: admin/includes/tab-settings.php:
|
1154 |
msgid ""
|
1155 |
"Notice that “Validation timing” is deferred till “"
|
1156 |
"wp” action hook. It means that this feature would not be compatible "
|
1157 |
"with any page caching."
|
1158 |
msgstr ""
|
1159 |
-
"[検証のタイミング]が “wp”
|
1160 |
-
"
|
1161 |
|
1162 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1163 |
msgid ""
|
1164 |
"<dfn title=\"Specify the frequency of request for certain period of time."
|
1165 |
"\">Blocking condition</dfn>"
|
1166 |
msgstr "<dfn title=\"特定期間のリクエスト頻度を設定します。\">遮断条件</dfn>"
|
1167 |
|
1168 |
-
#: admin/includes/tab-settings.php:
|
1169 |
#, php-format
|
1170 |
msgid "More than %1$s page view (PV) in %2$s seconds"
|
1171 |
-
msgstr "%2$s
|
1172 |
|
1173 |
-
#: admin/includes/tab-settings.php:
|
1174 |
msgid ""
|
1175 |
"<dfn title=\"It will validate the frequency of request.\">Block badly-"
|
1176 |
"behaved bots and crawlers</dfn>"
|
1177 |
-
msgstr ""
|
1178 |
-
"<dfn title=\"リクエスト頻度を検証します。\">行儀の悪いボットやクローラーを遮断"
|
1179 |
-
"</dfn>"
|
1180 |
|
1181 |
-
#: admin/includes/tab-settings.php:
|
1182 |
msgid ""
|
1183 |
"A part of user agent string and a qualification connected with a separator "
|
1184 |
"that indicates an applicable rule and can be “:” (pass) or "
|
@@ -1187,616 +1220,468 @@ msgid ""
|
|
1187 |
"negative operator “!” can be placed just before a “"
|
1188 |
"qualification”."
|
1189 |
msgstr ""
|
1190 |
-
"
|
1191 |
-
"
|
1192 |
-
"
|
1193 |
-
"を「条件」の直前に配置する事が出来ます。"
|
1194 |
|
1195 |
-
#: admin/includes/tab-settings.php:
|
1196 |
msgid "UA string and qualification"
|
1197 |
msgstr "ユーザーエージェント文字列と条件"
|
1198 |
|
1199 |
-
#: admin/includes/tab-settings.php:
|
1200 |
-
msgid "Specify the name of actions as exception that is invariably blocked."
|
1201 |
-
msgstr "常に遮断されるアクション名を例外として指定します。"
|
1202 |
-
|
1203 |
-
#: admin/includes/tab-settings.php:1036
|
1204 |
-
msgid "Excluded actions"
|
1205 |
-
msgstr "除外するアクション"
|
1206 |
-
|
1207 |
-
#: admin/includes/tab-settings.php:1055
|
1208 |
msgid ""
|
1209 |
"It enables to verify the host by reverse DNS lookup which would spend some "
|
1210 |
"server resources. If it is disabled, “HOST” and “"
|
1211 |
"HOST=…”in “UA string and qualification” will always "
|
1212 |
"return “true”."
|
1213 |
msgstr ""
|
1214 |
-
"DNS
|
1215 |
-
"
|
1216 |
-
"「HOST=…」は常に真となります。"
|
1217 |
|
1218 |
-
#: admin/includes/tab-settings.php:
|
1219 |
-
msgid "DNS
|
1220 |
msgstr "DNS 逆引き"
|
1221 |
|
1222 |
-
#: admin/includes/tab-settings.php:
|
1223 |
msgid ""
|
1224 |
"It enables to simulate validation without deployment. The results can be "
|
1225 |
"found as “public” in Logs."
|
1226 |
-
msgstr ""
|
1227 |
-
"機能を有効にする事なくリクエストの検証をシミュレートします。結果はログで確認す"
|
1228 |
-
"る事が出来ます。"
|
1229 |
|
1230 |
-
#: admin/includes/tab-settings.php:
|
1231 |
msgid "Simulation mode"
|
1232 |
msgstr "シミュレーション・モード"
|
1233 |
|
1234 |
-
#: admin/includes/tab-settings.php:
|
1235 |
msgid "Privacy and record settings"
|
1236 |
msgstr "プライバシーと記録の設定"
|
1237 |
|
1238 |
-
#: admin/includes/tab-settings.php:
|
1239 |
msgid ""
|
1240 |
"<dfn title=\"This option restricts not to send IP address to the external "
|
1241 |
"Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
|
1242 |
msgstr ""
|
1243 |
-
"<dfn title=\"このオプションは、IPアドレスを外部の位置情報API
|
1244 |
-
"
|
1245 |
|
1246 |
-
#: admin/includes/tab-settings.php:
|
1247 |
msgid ""
|
1248 |
"<dfn title=\"This option enables to record the number blocked countries and "
|
1249 |
-
"the number of blocked requests per day.\">Record “Statistics
|
1250 |
-
"dfn>"
|
1251 |
msgstr ""
|
1252 |
-
"<dfn title=\"このオプションは、国別遮断数や1
|
1253 |
-
"
|
1254 |
|
1255 |
-
#: admin/includes/tab-settings.php:
|
1256 |
msgid "Maximum period for “Statistics” [days]"
|
1257 |
msgstr "記録する統計の最大期間[日]"
|
1258 |
|
1259 |
-
#: admin/includes/tab-settings.php:
|
1260 |
msgid ""
|
1261 |
"<dfn title=\"This option enables to record the IP address, country code and "
|
1262 |
"failure counter of login attempts into the cache on database to minimize the "
|
1263 |
-
"impact on site speed.\">Record “IP address
|
1264 |
msgstr ""
|
1265 |
-
"<dfn title=\"このオプションは、IP
|
1266 |
-
"
|
1267 |
-
"をキャッシュに記録</dfn>"
|
1268 |
|
1269 |
-
#: admin/includes/tab-settings.php:
|
1270 |
msgid ""
|
1271 |
"<dfn title=\"If user authentication fails consecutively beyond “Max "
|
1272 |
"number of failed login attempts per IP address”, subsequent login will "
|
1273 |
"also be prohibited for this period.\">Expiration time [sec] for each entry</"
|
1274 |
"dfn>"
|
1275 |
msgstr ""
|
1276 |
-
"<dfn title=\"ユーザ認証が連続%d
|
1277 |
-
"
|
1278 |
-
"[秒]</dfn>"
|
1279 |
|
1280 |
-
#: admin/includes/tab-settings.php:
|
1281 |
msgid ""
|
1282 |
"<dfn title=\"This option enables to record the validation logs including IP "
|
1283 |
-
"addresses.\">Record “
|
1284 |
msgstr ""
|
1285 |
-
"<dfn title=\"このオプションは、IP
|
1286 |
-
"す。\">検証のログを記録</dfn>"
|
1287 |
|
1288 |
-
#: admin/includes/tab-settings.php:
|
1289 |
msgid "When blocked"
|
1290 |
msgstr "遮断時に記録"
|
1291 |
|
1292 |
-
#: admin/includes/tab-settings.php:
|
1293 |
msgid "When passed"
|
1294 |
msgstr "通過時に記録"
|
1295 |
|
1296 |
-
#: admin/includes/tab-settings.php:
|
1297 |
msgid "When “blocked” or “passed (not in whitelist)”"
|
1298 |
msgstr "遮断時または遮断対象国の通過時に記録"
|
1299 |
|
1300 |
-
#: admin/includes/tab-settings.php:
|
1301 |
msgid "Unauthenticated visitor"
|
1302 |
msgstr "未認証の訪問者を記録"
|
1303 |
|
1304 |
-
#: admin/includes/tab-settings.php:
|
1305 |
msgid "Authenticated user"
|
1306 |
msgstr "認証済のユーザーを記録"
|
1307 |
|
1308 |
-
#: admin/includes/tab-settings.php:
|
1309 |
msgid "All the validation"
|
1310 |
msgstr "すべての検証を記録"
|
1311 |
|
1312 |
-
#: admin/includes/tab-settings.php:
|
1313 |
#, php-format
|
1314 |
msgid ""
|
1315 |
"<dfn title=\"The maximum number of entries in the logs is also limited to %d."
|
1316 |
"\">Expiration time [days] for each entry</dfn>"
|
1317 |
-
msgstr ""
|
1318 |
-
"<dfn title=\"ログの最大エントリー数は %d に制限されます。\">各エントリーの有効"
|
1319 |
-
"期間[日]</dfn>"
|
1320 |
|
1321 |
-
#: admin/includes/tab-settings.php:
|
1322 |
msgid ""
|
1323 |
"<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
|
1324 |
"with value</dfn>"
|
1325 |
-
msgstr ""
|
1326 |
-
"<dfn title=\"例)action, comment, log, pwd, FILES\">内容を展開する$_POSTのキー"
|
1327 |
-
"</dfn>"
|
1328 |
|
1329 |
-
#: admin/includes/tab-settings.php:
|
1330 |
-
msgid "Maximum entries
|
1331 |
msgstr "記録するログの最大エントリ数"
|
1332 |
|
1333 |
-
#: admin/includes/tab-settings.php:
|
1334 |
msgid ""
|
1335 |
"<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
|
1336 |
"“Live update”</dfn>"
|
1337 |
msgstr ""
|
1338 |
-
"<dfn title=\"SQLiteデータベース・ソースを選択します。\">ライブアップデート用"
|
1339 |
-
"
|
1340 |
|
1341 |
-
#: admin/includes/tab-settings.php:
|
1342 |
msgid "Ordinary file"
|
1343 |
msgstr "通常のファイル"
|
1344 |
|
1345 |
-
#: admin/includes/tab-settings.php:
|
1346 |
msgid "In-Memory"
|
1347 |
msgstr "イン・メモリ"
|
1348 |
|
1349 |
-
#: admin/includes/tab-settings.php:
|
1350 |
msgid "PDO_SQLITE driver not available"
|
1351 |
-
msgstr "PDO_SQLITE
|
1352 |
|
1353 |
-
#: admin/includes/tab-settings.php:
|
1354 |
msgid ""
|
1355 |
"It takes a few tens of milliseconds as overhead. It can be safely used "
|
1356 |
"without conflict with other plugins."
|
1357 |
-
msgstr ""
|
1358 |
-
"数十ミリ秒のオーバーヘッドが生じますが、他のプラグインと競合することなく、安全"
|
1359 |
-
"に使用できます。"
|
1360 |
|
1361 |
-
#: admin/includes/tab-settings.php:
|
1362 |
msgid ""
|
1363 |
"It takes a few milliseconds as overhead. There is a possibility of conflict "
|
1364 |
"with other plugins using this method."
|
1365 |
-
msgstr ""
|
1366 |
-
"数ミリ秒のオーバーヘッドが生じます。同手法を用いている他のプラグインと競合する"
|
1367 |
-
"可能性があります。"
|
1368 |
|
1369 |
-
#: admin/includes/tab-settings.php:
|
1370 |
msgid "Reset database source of “Live update”"
|
1371 |
msgstr "ライブアップデートのデータソースをリセットする"
|
1372 |
|
1373 |
-
#: admin/includes/tab-settings.php:
|
1374 |
msgid "Reset now"
|
1375 |
msgstr "今すぐリセット"
|
1376 |
|
1377 |
-
#: admin/includes/tab-settings.php:
|
1378 |
msgid ""
|
1379 |
"Task could not be found in WP-Cron. Please try to deactivate this plugin "
|
1380 |
"once and activate again."
|
1381 |
msgstr ""
|
1382 |
-
"WP-Cronのタスクが見つかりません。
|
1383 |
-
"化してみてください。"
|
1384 |
|
1385 |
-
#: admin/includes/tab-settings.php:
|
1386 |
msgid ""
|
1387 |
"<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
|
1388 |
-
"expired entries in “IP address
|
1389 |
"\">Interval [sec] to cleanup expired entries of IP address</dfn>"
|
1390 |
msgstr ""
|
1391 |
-
"<dfn title=\"このオプションは、有効期限の切れたIP
|
1392 |
-
"
|
1393 |
-
"dfn>"
|
1394 |
|
1395 |
-
#: admin/includes/tab-settings.php:
|
1396 |
#, php-format
|
1397 |
msgid "Next schedule: %s"
|
1398 |
msgstr "次回日時:%s"
|
1399 |
|
1400 |
-
#: admin/includes/tab-settings.php:
|
1401 |
msgid "Remove all settings and records at uninstallation"
|
1402 |
msgstr "アンインストール時に設定と記録を全て削除"
|
1403 |
|
1404 |
-
#: admin/includes/tab-settings.php:
|
1405 |
msgid "Geolocation API settings"
|
1406 |
msgstr "位置情報APIの設定"
|
1407 |
|
1408 |
-
#: admin/includes/tab-settings.php:
|
1409 |
msgid ""
|
1410 |
-
"<dfn title=\"IP address
|
1411 |
"priority.\">API selection and key settings</dfn>"
|
1412 |
msgstr ""
|
1413 |
-
"<dfn title=\"IP
|
1414 |
-
"
|
1415 |
|
1416 |
-
#: admin/includes/tab-settings.php:
|
1417 |
msgid "Timeout for network API [sec]"
|
1418 |
msgstr "ネットワークAPIのタイムアウト[秒]"
|
1419 |
|
1420 |
-
#: admin/includes/tab-settings.php:
|
1421 |
-
#, php-format
|
1422 |
-
msgid ""
|
1423 |
-
"Can not find Geolocation API libraries in <code>%s</code>. It seems to have "
|
1424 |
-
"failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
|
1425 |
-
"tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
|
1426 |
-
"contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
|
1427 |
-
"from <a rel=\"noreferrer\" href=\"https://github.com/tokkonopapa/WordPress-"
|
1428 |
-
"IP-Geo-API\" title=\"tokkonopapa/WordPress-IP-Geo-API - GitHub\">WordPress-"
|
1429 |
-
"IP-Geo-API</a>. Please install <code>ip-geo-api</code> with write permission "
|
1430 |
-
"according to <a rel=\"noreferrer\" href=\"http://www.ipgeoblock.com/codex/"
|
1431 |
-
"how-to-fix-permission-troubles.html\" title=\"How can I fix permission "
|
1432 |
-
"troubles? | IP Geo Block\">this instruction</a>."
|
1433 |
-
msgstr ""
|
1434 |
-
"<code>%s</code> に位置情報APIライブラリが見つかりません。<a rel=\"noreferrer"
|
1435 |
-
"\" href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-API\" title="
|
1436 |
-
"\"tokkonopapa/WordPress-IP-Geo-API - GitHub\">WordPress-IP-Geo-API</a> から "
|
1437 |
-
"<a rel=\"noreferrer\" href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-"
|
1438 |
-
"API/archive/master.zip\" title=\"Download the contents of tokkonopapa/"
|
1439 |
-
"WordPress-IP-Geo-API as a zip file\">ZIP file</a> のダウンロードに失敗したよう"
|
1440 |
-
"です。<a rel=\"noreferrer\" href=\"http://www.ipgeoblock.com/codex/how-to-fix-"
|
1441 |
-
"permission-troubles.html\" title=\"How can I fix permission troubles? | IP "
|
1442 |
-
"Geo Block\">FAQ</a> を参照し、適切な書き込み権限と共に <code>ip-geo-api</"
|
1443 |
-
"code> をインストールしてください。"
|
1444 |
-
|
1445 |
-
#: admin/includes/tab-settings.php:1425
|
1446 |
msgid "Local database settings"
|
1447 |
msgstr "ローカル・データベースの設定"
|
1448 |
|
1449 |
-
#: admin/includes/tab-settings.php:
|
1450 |
msgid "database"
|
1451 |
msgstr "ファイル"
|
1452 |
|
1453 |
-
#: admin/includes/tab-settings.php:
|
1454 |
#, php-format
|
1455 |
msgid "Last update: %s"
|
1456 |
msgstr "最終更新:%s"
|
1457 |
|
1458 |
-
#: admin/includes/tab-settings.php:
|
1459 |
msgid "Auto updating (once a month)"
|
1460 |
msgstr "自動更新(月1回)"
|
1461 |
|
1462 |
-
#: admin/includes/tab-settings.php:
|
1463 |
msgid "Download database"
|
1464 |
msgstr "データベースのダウンロード"
|
1465 |
|
1466 |
-
#: admin/includes/tab-settings.php:
|
1467 |
msgid "Download now"
|
1468 |
msgstr "今すぐダウンロード"
|
1469 |
|
1470 |
-
#: admin/includes/tab-settings.php:
|
1471 |
-
msgid "Submission settings"
|
1472 |
-
msgstr "投稿時の設定"
|
1473 |
-
|
1474 |
-
#: admin/includes/tab-settings.php:1512
|
1475 |
-
msgid "The whole will be wrapped by <p> tag. Allowed tags: "
|
1476 |
-
msgstr "全体が<p>タグで囲われます。使用可能タグ:"
|
1477 |
-
|
1478 |
-
#: admin/includes/tab-settings.php:1512
|
1479 |
-
msgid "Message on comment form"
|
1480 |
-
msgstr "投稿フォーム上のメッセージ"
|
1481 |
-
|
1482 |
-
#: admin/includes/tab-settings.php:1524
|
1483 |
-
msgid "None"
|
1484 |
-
msgstr "なし"
|
1485 |
-
|
1486 |
-
#: admin/includes/tab-settings.php:1525
|
1487 |
-
msgid "Top"
|
1488 |
-
msgstr "上部"
|
1489 |
-
|
1490 |
-
#: admin/includes/tab-settings.php:1526
|
1491 |
-
msgid "Bottom"
|
1492 |
-
msgstr "下部"
|
1493 |
-
|
1494 |
-
#: admin/includes/tab-settings.php:1537
|
1495 |
msgid "Plugin settings"
|
1496 |
msgstr "プラグインの設定"
|
1497 |
|
1498 |
-
#: admin/includes/tab-settings.php:
|
1499 |
msgid ""
|
1500 |
"<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
|
1501 |
"settings</dfn>"
|
1502 |
-
msgstr ""
|
1503 |
-
"<dfn title=\"全ての設定をネットワーク全体で同期させます。\">ネットワーク内で設"
|
1504 |
-
"定を同期</dfn>"
|
1505 |
|
1506 |
-
#: admin/includes/tab-settings.php:
|
1507 |
msgid ""
|
1508 |
-
"<dfn title=\"
|
|
|
|
|
1509 |
"dfn>"
|
1510 |
msgstr ""
|
1511 |
-
"<dfn title=\"
|
1512 |
-
"dfn>"
|
1513 |
|
1514 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1515 |
msgid "Export / Import settings"
|
1516 |
msgstr "設定のエクスポート、インポート"
|
1517 |
|
1518 |
-
#: admin/includes/tab-settings.php:
|
1519 |
msgid "Export settings"
|
1520 |
msgstr "エクスポート"
|
1521 |
|
1522 |
-
#: admin/includes/tab-settings.php:
|
1523 |
msgid "Import from the local file"
|
1524 |
msgstr "ローカル・ファイルからインポートします"
|
1525 |
|
1526 |
-
#: admin/includes/tab-settings.php:
|
1527 |
msgid "Import settings"
|
1528 |
msgstr "インポート"
|
1529 |
|
1530 |
-
#: admin/includes/tab-settings.php:
|
1531 |
msgid "Import pre-defined settings"
|
1532 |
msgstr "プリセットのインポート"
|
1533 |
|
1534 |
-
#: admin/includes/tab-settings.php:
|
1535 |
msgid ""
|
1536 |
"Import the default settings to revert to the “Right after "
|
1537 |
"installing” state"
|
1538 |
msgstr "インストール直後の状態に戻すための設定値をインポートします"
|
1539 |
|
1540 |
-
#: admin/includes/tab-settings.php:
|
1541 |
msgid "Default settings"
|
1542 |
msgstr "初期設定"
|
1543 |
|
1544 |
-
#: admin/includes/tab-settings.php:
|
1545 |
msgid ""
|
1546 |
"Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
|
1547 |
"for the “Back-end target settings”"
|
1548 |
-
msgstr ""
|
1549 |
-
"「ゼロデイ攻撃の遮断」など、主に[バックエンドの設定]の推奨設定をインポートし"
|
1550 |
-
"ます。"
|
1551 |
|
1552 |
-
#: admin/includes/tab-settings.php:
|
1553 |
msgid "Best for Back-end"
|
1554 |
msgstr "バックエンドの推奨設定"
|
1555 |
|
1556 |
-
#: admin/includes/tab-settings.php:
|
1557 |
-
msgid "
|
1558 |
-
msgstr "
|
1559 |
-
|
1560 |
-
#: admin/includes/tab-settings.php:1631
|
1561 |
-
msgid "Delete now"
|
1562 |
-
msgstr "今すぐ削除"
|
1563 |
-
|
1564 |
-
#: admin/includes/tab-settings.php:1639
|
1565 |
-
msgid "Create DB tables for this plugin"
|
1566 |
-
msgstr "このプラグイン用データベース・テーブルの作成"
|
1567 |
|
1568 |
-
#: admin/includes/tab-settings.php:
|
1569 |
-
msgid "
|
1570 |
-
msgstr "
|
1571 |
|
1572 |
-
#: admin/includes/tab-settings.php:
|
1573 |
msgid ""
|
1574 |
"<dfn title=\"When you have some unexpected blocking experiences, please "
|
1575 |
"press the button to find the blocked requests at the end of dumped "
|
1576 |
"information which may help you to solve the issues.\">Diagnostic "
|
1577 |
"information</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
|
1578 |
-
"support/plugin/ip-geo-block\" title=\"
|
1579 |
-
"
|
1580 |
msgstr ""
|
1581 |
-
"<dfn title=\"
|
1582 |
-
"
|
1583 |
-
"
|
1584 |
-
"
|
1585 |
-
"フォーラム</a> ]"
|
1586 |
|
1587 |
-
#: admin/includes/tab-settings.php:
|
1588 |
-
msgid "Please copy & paste when submitting your issue to support forum
|
1589 |
-
msgstr "
|
1590 |
|
1591 |
-
#: admin/includes/tab-settings.php:
|
1592 |
msgid "Show information"
|
1593 |
msgstr "情報を表示"
|
1594 |
|
1595 |
-
#: admin/includes/tab-settings.php:
|
1596 |
-
msgid ""
|
1597 |
-
"To enhance the protection ability, please refer to “<a rel=\"noreferrer"
|
1598 |
-
"\" href=\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-"
|
1599 |
-
"settings.html\" title=\"The best practice for target settings | IP Geo Block"
|
1600 |
-
"\">The best practice for target settings</a>”."
|
1601 |
-
msgstr ""
|
1602 |
-
"防御性能をより高めるための設定については、“<a rel=\"noreferrer\" href="
|
1603 |
-
"\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-settings.html"
|
1604 |
-
"\" title=\"The best practice for target settings | IP Geo Block\">The best "
|
1605 |
-
"practice fortarget settings</a>“ を参照してください。"
|
1606 |
-
|
1607 |
-
#: admin/includes/tab-settings.php:1681
|
1608 |
-
msgid ""
|
1609 |
-
"If you have any troubles with these, please check FAQ at <a rel=\"noreferrer"
|
1610 |
-
"\" href=\"https://wordpress.org/plugins/ip-geo-block/faq/\" title=\"IP Geo "
|
1611 |
-
"Block — WordPress Plugins\">WordPress.org</a> and <a rel=\"noreferrer"
|
1612 |
-
"\" href=\"http://www.ipgeoblock.com/codex/#faq\" title=\"Codex | IP Geo Block"
|
1613 |
-
"\">Codex</a>."
|
1614 |
-
msgstr ""
|
1615 |
-
"何か問題が発生した場合は、<a rel=\"noreferrer\" href=\"https://wordpress.org/"
|
1616 |
-
"plugins/ip-geo-block/faq/\" title=\"IP Geo Block — WordPress Plugins"
|
1617 |
-
"\">WordPress.org</a> か <a rel=\"noreferrer\" href=\"http://www.ipgeoblock."
|
1618 |
-
"com/codex/#faq\" title=\"Codex | IP Geo Block\">Codex</a> の FAQ を参照してく"
|
1619 |
-
"ださい。"
|
1620 |
-
|
1621 |
-
#: admin/includes/tab-settings.php:1688
|
1622 |
msgid ""
|
1623 |
"While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
|
1624 |
"others will pass an IP address to the 3rd parties' API via HTTP."
|
1625 |
msgstr ""
|
1626 |
-
"MaxmindとIP2Locationはローカルのデータベースを検索しますが、他はHTTP
|
1627 |
-
"
|
1628 |
|
1629 |
-
#: admin/includes/tab-settings.php:
|
1630 |
msgid ""
|
1631 |
"Please select the appropriate APIs to fit the privacy law / regulation in "
|
1632 |
"your country / region."
|
1633 |
-
msgstr ""
|
1634 |
-
"あなたの国/地域におけるプライバシー保護の法規・条例に適合するよう、適切なAPI"
|
1635 |
-
"を選択して下さい。"
|
1636 |
|
1637 |
-
#: admin/includes/tab-settings.php:
|
1638 |
#, php-format
|
1639 |
msgid ""
|
1640 |
"Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
|
1641 |
"2.0.0+%s."
|
1642 |
msgstr ""
|
1643 |
-
"Maxmind GeoLite2 データベースと API には、PHP バージョン 5.4.0 以上と %sPECL "
|
1644 |
-
"
|
1645 |
-
|
1646 |
-
#: admin/includes/tab-settings.php:1706
|
1647 |
-
msgid ""
|
1648 |
-
"Please refer to the document “<a rel=\"noreferrer\" href=\"http://www."
|
1649 |
-
"ipgeoblock.com/codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block"
|
1650 |
-
"\">Blocking on front-end</a>” for details, including restrictions on "
|
1651 |
-
"cache plugin."
|
1652 |
-
msgstr ""
|
1653 |
-
"キャッシュ・プラグインに関する制限事項を含め、詳しくはドキュメント “<a "
|
1654 |
-
"rel=\"noreferrer\" href=\"http://www.ipgeoblock.com/codex/#blocking-on-front-"
|
1655 |
-
"end\" title=\"Codex | IP Geo Block\">Blocking on front-end</a>” を参照し"
|
1656 |
-
"てください。"
|
1657 |
-
|
1658 |
-
#: admin/includes/tab-settings.php:1707
|
1659 |
-
msgid ""
|
1660 |
-
"If you find any issues or have something to suggest, please feel free to "
|
1661 |
-
"open an issue at <a rel=\"noreferrer\" href=\"https://wordpress.org/support/"
|
1662 |
-
"plugin/ip-geo-block\" title=\"WordPress › Support » IP Geo Block"
|
1663 |
-
"\">support forum</a>."
|
1664 |
-
msgstr ""
|
1665 |
-
"問題を発見したり改善の提案がある場合は、お気軽に <a rel=\"noreferrer\" href="
|
1666 |
-
"\"https://wordpress.org/support/plugin/ip-geo-block\" title=\"WordPress "
|
1667 |
-
"› Support » IP Geo Block\">サポートフォーラム</a> に投稿をお願いし"
|
1668 |
-
"ます。"
|
1669 |
-
|
1670 |
-
#: admin/includes/tab-settings.php:1714
|
1671 |
-
msgid ""
|
1672 |
-
"Please refer to the document “<a rel=\"noreferrer\" href=\"http://www."
|
1673 |
-
"ipgeoblock.com/codex/record-settings-and-logs.html\" title=\"Codex | IP Geo "
|
1674 |
-
"Block\">Record settings and logs</a>” for details."
|
1675 |
-
msgstr ""
|
1676 |
-
"詳しくは “<a rel=\"noreferrer\" href=\"http://www.ipgeoblock.com/codex/"
|
1677 |
-
"record-settings-and-logs.html\" title=\"Codex | IP Geo Block\">Record "
|
1678 |
-
"settings and logs</a>” を参照ください。"
|
1679 |
|
1680 |
#: admin/includes/tab-statistics.php:19
|
1681 |
msgid "Statistics of validation"
|
1682 |
msgstr "検証の統計"
|
1683 |
|
1684 |
-
#: admin/includes/tab-statistics.php:
|
1685 |
msgid "Blocked"
|
1686 |
msgstr "全遮断数"
|
1687 |
|
1688 |
-
#: admin/includes/tab-statistics.php:
|
1689 |
msgid "Blocked by countries"
|
1690 |
msgstr "国別遮断数"
|
1691 |
|
1692 |
-
#: admin/includes/tab-statistics.php:
|
1693 |
msgid "Blocked per day"
|
1694 |
msgstr "1日あたりの遮断数"
|
1695 |
|
1696 |
-
#: admin/includes/tab-statistics.php:
|
1697 |
msgid "Blocked by type of IP address"
|
1698 |
msgstr "遮断したIPアドレスのタイプ"
|
1699 |
|
1700 |
-
#: admin/includes/tab-statistics.php:
|
1701 |
msgid "Name of API"
|
1702 |
-
msgstr "API
|
1703 |
|
1704 |
-
#: admin/includes/tab-statistics.php:
|
1705 |
msgid "Call"
|
1706 |
msgstr "リクエスト回数"
|
1707 |
|
1708 |
-
#: admin/includes/tab-statistics.php:
|
1709 |
msgid "Response [msec]"
|
1710 |
msgstr "応答時間 [msec]"
|
1711 |
|
1712 |
-
#: admin/includes/tab-statistics.php:
|
1713 |
msgid "Average response time of each API"
|
1714 |
msgstr "API毎の平均応答時間"
|
1715 |
|
1716 |
-
#: admin/includes/tab-statistics.php:
|
1717 |
msgid "Clear statistics"
|
1718 |
msgstr "統計のクリア"
|
1719 |
|
1720 |
-
#: admin/includes/tab-statistics.php:
|
1721 |
-
msgid "Statistics in
|
1722 |
msgstr "ログの統計"
|
1723 |
|
1724 |
-
#: admin/includes/tab-statistics.php:
|
1725 |
-
msgid "Statistics in IP address
|
1726 |
msgstr "キャッシュの統計"
|
1727 |
|
1728 |
-
#: admin/includes/tab-statistics.php:
|
1729 |
msgid "Search in cache"
|
1730 |
msgstr "キャッシュを検索"
|
1731 |
|
1732 |
-
#: admin/includes/tab-statistics.php:
|
1733 |
msgid "Clear cache"
|
1734 |
msgstr "キャッシュのクリア"
|
1735 |
|
1736 |
-
#: admin/includes/tab-statistics.php:
|
1737 |
msgid "Export cache"
|
1738 |
msgstr "キャッシュをエクスポート"
|
1739 |
|
1740 |
-
#: admin/includes/tab-statistics.php:
|
1741 |
msgid "Country (Top 10)"
|
1742 |
msgstr "国(トップ10)"
|
1743 |
|
1744 |
-
#: admin/includes/tab-statistics.php:
|
1745 |
msgid "AS number (Top 10)"
|
1746 |
msgstr "AS番号(トップ10)"
|
1747 |
|
1748 |
-
#: admin/includes/tab-statistics.php:
|
1749 |
msgid "IP address (Top 10)"
|
1750 |
msgstr "IPアドレス(トップ10)"
|
1751 |
|
1752 |
-
#: admin/includes/tab-statistics.php:
|
1753 |
msgid "Slug in back-end"
|
1754 |
msgstr "バックエンドのスラッグ"
|
1755 |
|
1756 |
-
#: admin/includes/tab-statistics.php:
|
1757 |
msgid "Toggle sorting order"
|
1758 |
msgstr "ソート順を切り替え"
|
1759 |
|
1760 |
-
#: admin/includes/tab-statistics.php:
|
1761 |
#, php-format
|
1762 |
-
msgid "[ %sRecord “Statistics”%s ] is disabled."
|
1763 |
msgstr "[%s検証の統計を記録%s]が無効です。"
|
1764 |
|
1765 |
-
#: admin/includes/tab-statistics.php:
|
1766 |
msgid ""
|
1767 |
"Please set the proper condition to record and analyze the validation "
|
1768 |
"statistics."
|
1769 |
msgstr "検証の統計を記録し分析するためには、適切な条件を設定して下さい。"
|
1770 |
|
1771 |
-
#: admin/includes/tab-statistics.php:
|
1772 |
#, php-format
|
1773 |
-
msgid "[ %sRecord “IP address
|
1774 |
msgstr "[%sIPアドレスをキャッシュに記録%s]が無効です。"
|
1775 |
|
1776 |
-
#: admin/includes/tab-statistics.php:
|
1777 |
msgid "Please set the proper condition to record IP address in cache."
|
1778 |
-
msgstr ""
|
1779 |
-
"キャッシュを利用しサイトの応答性を上げるためには、適切な条件を設定して下さい。"
|
1780 |
-
|
1781 |
-
#: classes/class-ip-geo-block-apis.php:661
|
1782 |
-
msgid ""
|
1783 |
-
"You need to select at least one IP Geolocation API. Otherwise <strong>you'll "
|
1784 |
-
"be blocked</strong> after the cache expires."
|
1785 |
-
msgstr ""
|
1786 |
-
"少なくとも1つ以上の位置情報APIを選択して下さい。未選択の場合、キャッシュの有効"
|
1787 |
-
"期限切れと共にロックアウトされます。"
|
1788 |
|
1789 |
-
#: classes/class-ip-geo-block-cron.php:
|
1790 |
#, php-format
|
1791 |
msgid "Can't lock <code>%s</code>. Please try again after a while."
|
1792 |
-
msgstr ""
|
1793 |
-
"<code>%s</code> をロック出来ません。パーミッションをチェックして下さい。"
|
1794 |
|
1795 |
-
#: classes/class-ip-geo-block-cron.php:
|
1796 |
msgid "Your database file is up-to-date."
|
1797 |
msgstr "データベース・ファイルは最新です。"
|
1798 |
|
1799 |
-
#: classes/class-ip-geo-block-cron.php:
|
1800 |
msgid "gz or zip is not supported on your system."
|
1801 |
msgstr "gz または zip がサポートされていません。"
|
1802 |
|
@@ -1808,10 +1693,9 @@ msgid ""
|
|
1808 |
"Editing_wp-config.php#WordPress_Upgrade_Constants\" title=\"Editing wp-"
|
1809 |
"config.php « WordPress Codex\">this document</a> for more details."
|
1810 |
msgstr ""
|
1811 |
-
"本プラグインは、メソッド「%s」による FTP あるいは SSH
|
1812 |
-
"
|
1813 |
-
"
|
1814 |
-
"php « WordPress Codex\">このドキュメント</a>を参照してください。"
|
1815 |
|
1816 |
#: classes/class-ip-geo-block-file.php:68
|
1817 |
msgid ""
|
@@ -1821,31 +1705,26 @@ msgid ""
|
|
1821 |
"\"Editing wp-config.php « WordPress Codex\">this document</a> for more "
|
1822 |
"details."
|
1823 |
msgstr ""
|
1824 |
-
"本プラグイン FTP あるいは SSH
|
1825 |
-
"
|
1826 |
-
"\"
|
1827 |
-
"
|
1828 |
-
"WordPress Codex\">このドキュメント</a>を参照してください。"
|
1829 |
|
1830 |
-
#: classes/class-ip-geo-block-logs.php:
|
1831 |
#, php-format
|
1832 |
msgid ""
|
1833 |
"Creating a DB table %s had failed. Once de-activate this plugin, and then "
|
1834 |
"activate again."
|
1835 |
-
msgstr ""
|
1836 |
-
"%s 用のテーブルが作成されていません。一旦このプラグインを無効化し、再度有効化"
|
1837 |
-
"して下さい。"
|
1838 |
|
1839 |
-
#: classes/class-ip-geo-block-logs.php:
|
1840 |
#, php-format
|
1841 |
msgid ""
|
1842 |
"Column type in %s unmatched. Once de-activate this plugin, and then activate "
|
1843 |
"again."
|
1844 |
-
msgstr ""
|
1845 |
-
"%s 用のカラム型が一致しません。一旦このプラグインを無効化し、再度有効化して下"
|
1846 |
-
"さい。"
|
1847 |
|
1848 |
-
#: classes/class-ip-geo-block.php:
|
1849 |
msgid "Dashboard"
|
1850 |
msgstr "ダッシュボード"
|
1851 |
|
@@ -1855,11 +1734,11 @@ msgstr "ダッシュボード"
|
|
1855 |
msgid "Database file does not exist."
|
1856 |
msgstr "データベース・ファイルが見つかりません。"
|
1857 |
|
1858 |
-
#: wp-content/mu-plugins/ip-geo-block-mu.php:
|
1859 |
#, php-format
|
1860 |
msgid ""
|
1861 |
"Can't find IP Geo Block in your plugins directory. Please remove <code>%s</"
|
1862 |
"code> or re-install %s."
|
1863 |
msgstr ""
|
1864 |
-
"プラグイン・ディレクトリにIP Geo Blockが見つかりません。<code>%s</code
|
1865 |
-
"
|
2 |
# This file is distributed under the same license as the IP Geo Block package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: IP Geo Block 3.0.15\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
|
7 |
+
"POT-Creation-Date: 2018-10-02 22:28+0900\n"
|
8 |
+
"PO-Revision-Date: 2018-10-02 22:31+0900\n"
|
9 |
"Language-Team: \n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 2.1.1\n"
|
14 |
"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
|
15 |
"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
18 |
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
"Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
|
20 |
+
"Language: ja\n"
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
|
23 |
#. Description of the plugin/theme
|
25 |
"It blocks any spams, login attempts and malicious access to the admin area "
|
26 |
"posted from outside your nation, and also prevents zero-day exploit."
|
27 |
msgstr ""
|
28 |
+
"自国以外から投稿されるスパム、ログインフォーム、さらにゼロデイ攻撃を含む管理領域への悪意あるアクセスか"
|
29 |
+
"らサイトを守ります。"
|
30 |
|
31 |
+
#: admin/class-ip-geo-block-admin.php:291
|
32 |
+
msgid "Are you sure ?"
|
33 |
+
msgstr "実行してもよいですか?"
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
#: admin/class-ip-geo-block-admin.php:292
|
36 |
+
#: admin/class-ip-geo-block-admin.php:793
|
37 |
+
msgid "Open a new window"
|
38 |
+
msgstr "別窓で開く"
|
39 |
|
40 |
+
#: admin/class-ip-geo-block-admin.php:293 admin/includes/tab-settings.php:1506
|
41 |
+
msgid "Generate new link"
|
42 |
+
msgstr "新しいリンクを生成"
|
43 |
|
44 |
+
#: admin/class-ip-geo-block-admin.php:294 admin/includes/tab-settings.php:1507
|
45 |
+
msgid "Delete current link"
|
46 |
+
msgstr "生成したリンクを削除"
|
47 |
|
48 |
+
#: admin/class-ip-geo-block-admin.php:295
|
49 |
+
msgid ""
|
50 |
+
"Please add the following link to favorites / bookmarks in your browser : "
|
51 |
+
msgstr "次のリンクをブラウザのお気に入り/ブックマークに追加して下さい : "
|
52 |
|
53 |
+
#: admin/class-ip-geo-block-admin.php:296
|
54 |
msgid "ajax for logged-in user"
|
55 |
msgstr "認証済ユーザー用 ajax"
|
56 |
|
57 |
+
#: admin/class-ip-geo-block-admin.php:297
|
58 |
msgid "ajax for non logged-in user"
|
59 |
msgstr "未認証ユーザー用 ajax"
|
60 |
|
61 |
+
#: admin/class-ip-geo-block-admin.php:298
|
62 |
#, php-format
|
63 |
msgid "[Found: %d]"
|
64 |
msgstr "[見つかった数:%d]"
|
65 |
|
66 |
+
#: admin/class-ip-geo-block-admin.php:299
|
67 |
#, php-format
|
68 |
msgid "Find and verify `%s` on “Logs” tab."
|
69 |
msgstr "ログから `%s` を検索し、検証して下さい。"
|
70 |
|
71 |
+
#: admin/class-ip-geo-block-admin.php:300
|
72 |
msgid "This feature is available with HTML5 compliant browsers."
|
73 |
msgstr "HTML5準拠のブラウザでのみ機能します。"
|
74 |
|
75 |
+
#: admin/class-ip-geo-block-admin.php:301
|
76 |
+
msgid "The selected row cannot be found in the table."
|
77 |
+
msgstr "テーブル中に選択された行が見つかりません。"
|
78 |
|
79 |
+
#: admin/class-ip-geo-block-admin.php:302
|
80 |
+
#: admin/class-ip-geo-block-admin.php:1571
|
81 |
#, php-format
|
82 |
msgid "An error occurred while executing the ajax command `%s`."
|
83 |
msgstr "Ajaxコマンド `%s` の実行中にエラーが発生しました。"
|
84 |
|
85 |
+
#: admin/class-ip-geo-block-admin.php:306
|
86 |
msgid "No data available in table"
|
87 |
msgstr "テーブルにデータがありません"
|
88 |
|
89 |
+
#: admin/class-ip-geo-block-admin.php:307
|
90 |
msgid "No matching records found"
|
91 |
msgstr "一致するレコードがありません"
|
92 |
|
93 |
+
#: admin/class-ip-geo-block-admin.php:308
|
94 |
+
#: admin/includes/class-admin-ajax.php:107
|
95 |
+
#: admin/includes/class-admin-ajax.php:240
|
96 |
+
#: admin/includes/tab-geolocation.php:74
|
97 |
msgid "IP address"
|
98 |
msgstr "IPアドレス"
|
99 |
|
100 |
+
#: admin/class-ip-geo-block-admin.php:309
|
101 |
+
#: admin/includes/class-admin-ajax.php:108
|
102 |
+
#: admin/includes/class-admin-ajax.php:241
|
103 |
msgid "Code"
|
104 |
msgstr "国"
|
105 |
|
106 |
+
#: admin/class-ip-geo-block-admin.php:310
|
107 |
+
#: admin/includes/class-admin-ajax.php:109
|
108 |
+
#: admin/includes/class-admin-ajax.php:242
|
109 |
msgid "ASN"
|
110 |
msgstr "AS番号"
|
111 |
|
112 |
+
#: admin/class-ip-geo-block-admin.php:311
|
113 |
+
#: admin/includes/class-admin-ajax.php:243
|
114 |
msgid "Host name"
|
115 |
msgstr "ホスト名"
|
116 |
|
117 |
+
#: admin/class-ip-geo-block-admin.php:312
|
118 |
+
#: admin/includes/class-admin-ajax.php:110
|
119 |
+
#: admin/includes/class-admin-ajax.php:244
|
120 |
msgid "Target"
|
121 |
msgstr "検証対象"
|
122 |
|
123 |
+
#: admin/class-ip-geo-block-admin.php:313
|
124 |
+
#: admin/includes/class-admin-ajax.php:245
|
125 |
msgid "Failure / Total"
|
126 |
msgstr "ログイン失敗/総計"
|
127 |
|
128 |
+
#: admin/class-ip-geo-block-admin.php:314
|
129 |
+
#: admin/includes/class-admin-ajax.php:246
|
130 |
msgid "Elapsed[sec]"
|
131 |
msgstr "経過 [秒]"
|
132 |
|
133 |
+
#: admin/class-ip-geo-block-admin.php:315
|
134 |
+
#: admin/includes/class-admin-ajax.php:106
|
135 |
msgid "Time"
|
136 |
msgstr "日時"
|
137 |
|
138 |
+
#: admin/class-ip-geo-block-admin.php:316
|
139 |
+
#: admin/includes/class-admin-ajax.php:111
|
140 |
msgid "Result"
|
141 |
msgstr "検証結果"
|
142 |
|
143 |
+
#: admin/class-ip-geo-block-admin.php:317
|
144 |
+
#: admin/includes/class-admin-ajax.php:112
|
145 |
msgid "Request"
|
146 |
msgstr "リクエスト"
|
147 |
|
148 |
+
#: admin/class-ip-geo-block-admin.php:318
|
149 |
+
#: admin/includes/class-admin-ajax.php:113
|
150 |
msgid "User agent"
|
151 |
msgstr "ユーザー・エージェント"
|
152 |
|
153 |
+
#: admin/class-ip-geo-block-admin.php:319
|
154 |
+
#: admin/includes/class-admin-ajax.php:114
|
155 |
msgid "HTTP headers"
|
156 |
msgstr "HTTP ヘッダー"
|
157 |
|
158 |
+
#: admin/class-ip-geo-block-admin.php:320
|
159 |
+
#: admin/includes/class-admin-ajax.php:115
|
160 |
msgid "$_POST data"
|
161 |
msgstr "$_POST データ"
|
162 |
|
163 |
+
#: admin/class-ip-geo-block-admin.php:346
|
164 |
msgid "Contribute on GitHub"
|
165 |
msgstr "開発に参加"
|
166 |
|
167 |
+
#: admin/class-ip-geo-block-admin.php:360
|
168 |
+
#: admin/class-ip-geo-block-admin.php:478
|
169 |
+
#: admin/class-ip-geo-block-admin.php:736
|
170 |
msgid "Settings"
|
171 |
msgstr "設定"
|
172 |
|
173 |
+
#: admin/class-ip-geo-block-admin.php:455
|
174 |
+
#: admin/class-ip-geo-block-admin.php:456
|
175 |
+
#: admin/class-ip-geo-block-admin.php:466
|
176 |
+
#: admin/class-ip-geo-block-admin.php:467
|
177 |
+
#: admin/class-ip-geo-block-admin.php:477
|
178 |
+
#: admin/class-ip-geo-block-admin.php:487
|
179 |
msgid "IP Geo Block"
|
180 |
msgstr "IP Geo Block"
|
181 |
|
182 |
+
#: admin/class-ip-geo-block-admin.php:488
|
183 |
+
#: admin/class-ip-geo-block-admin.php:741
|
184 |
msgid "Site List"
|
185 |
msgstr "サイト一覧"
|
186 |
|
187 |
+
#: admin/class-ip-geo-block-admin.php:517
|
188 |
msgid "You need WordPress 3.7+."
|
189 |
msgstr "WordPress 3.7 以上が必要です。"
|
190 |
|
191 |
+
#: admin/class-ip-geo-block-admin.php:521
|
192 |
+
#, php-format
|
193 |
+
msgid ""
|
194 |
+
"Can not load Geolocation API libraries from <code>%s</code>. It seems to "
|
195 |
+
"have failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
|
196 |
+
"tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
|
197 |
+
"contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
|
198 |
+
"from <a rel=\"noreferrer\" href=\"https://github.com/tokkonopapa/WordPress-"
|
199 |
+
"IP-Geo-API\" title=\"tokkonopapa/WordPress-IP-Geo-API - GitHub\">WordPress-"
|
200 |
+
"IP-Geo-API</a>. Please install <code>ip-geo-api</code> with write permission "
|
201 |
+
"according to <a rel=\"noreferrer\" href=\"https://www.ipgeoblock.com/codex/"
|
202 |
+
"how-to-fix-permission-troubles.html\" title=\"How can I fix permission "
|
203 |
+
"troubles? | IP Geo Block\">this instruction</a>."
|
204 |
+
msgstr ""
|
205 |
+
"<code>%s</code> に位置情報APIライブラリが見つかりません。<a rel=\"noreferrer\" href=\"https://github."
|
206 |
+
"com/tokkonopapa/WordPress-IP-Geo-API\" title=\"tokkonopapa/WordPress-IP-Geo-API - GitHub\">WordPress-"
|
207 |
+
"IP-Geo-API</a> から <a rel=\"noreferrer\" href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-API/"
|
208 |
+
"archive/master.zip\" title=\"Download the contents of tokkonopapa/WordPress-IP-Geo-API as a zip file"
|
209 |
+
"\">ZIP file</a> のダウンロードに失敗したようです。<a rel=\"noreferrer\" href=\"https://www.ipgeoblock."
|
210 |
+
"com/codex/how-to-fix-permission-troubles.html\" title=\"How can I fix permission troubles? | IP Geo "
|
211 |
+
"Block\">FAQ</a> を参照し、適切な書き込み権限と共に <code>ip-geo-api</code> をインストールしてください。"
|
212 |
+
|
213 |
+
#: admin/class-ip-geo-block-admin.php:530
|
214 |
+
#, php-format
|
215 |
+
msgid ""
|
216 |
+
"You should select at least one API at <a href=\"%s\">Geolocation API "
|
217 |
+
"settings</a>. Otherwise <strong>you'll be blocked</strong> after the cache "
|
218 |
+
"expires."
|
219 |
+
msgstr ""
|
220 |
+
"<a href=\"%s\">位置情報APIの設定</a>で、少なくとも1つ以上のAPIを選択して下さい。未選択の場合、キャッ"
|
221 |
+
"シュの有効期限切れと共にロックアウトされます。"
|
222 |
+
|
223 |
+
#: admin/class-ip-geo-block-admin.php:539
|
224 |
+
#, php-format
|
225 |
+
msgid ""
|
226 |
+
"You should select at least one API for local database at <a href=\"%s"
|
227 |
+
"\">Geolocation API settings</a>. Otherwise access to the external API may "
|
228 |
+
"slow down the site."
|
229 |
+
msgstr ""
|
230 |
+
"<a href=\"%s\">位置情報APIの設定</a>で、ローカルデータベース用のAPIを少なくとも1つ以上選択して下さい。"
|
231 |
+
"未選択の場合、外部APIへのアクセスにより、サイトの応答性が悪くなります。"
|
232 |
+
|
233 |
+
#: admin/class-ip-geo-block-admin.php:550
|
234 |
#, php-format
|
235 |
msgid ""
|
236 |
"Now downloading geolocation databases in background. After a little while, "
|
237 |
"please check your country code and “<strong>Matching rule</"
|
238 |
"strong>” at <a href=\"%s\">Validation rule settings</a>."
|
239 |
msgstr ""
|
240 |
+
"バックグラウンドで位置情報データベースをダウンロードしています。少しの間をおいた後、あなたの国コードと"
|
241 |
+
"[<strong>マッチング規則</strong>]を[<a href=\"%s\">検証ルールの設定</a>]で確認して下さい。"
|
|
|
242 |
|
243 |
+
#: admin/class-ip-geo-block-admin.php:556
|
244 |
#, php-format
|
245 |
msgid ""
|
246 |
"The “<strong>Matching rule</strong>” is not set properly. Please "
|
247 |
"confirm it at <a href=\"%s\">Validation rule settings</a>."
|
248 |
msgstr ""
|
249 |
+
"[<strong>マッチング規則</strong>]が正しく設定されていません。[<a href=\"%s\">検証ルールの設定</a>]"
|
250 |
+
"を確認して下さい。"
|
251 |
|
252 |
+
#: admin/class-ip-geo-block-admin.php:565
|
253 |
msgid "Local database and matching rule have been updated."
|
254 |
msgstr "ローカル・データベースとマッチング規則を更新しました。"
|
255 |
|
256 |
+
#: admin/class-ip-geo-block-admin.php:576
|
257 |
msgid ""
|
258 |
"Once you logout, you will be unable to login again because the number of "
|
259 |
"login attempts reaches the limit."
|
260 |
msgstr ""
|
261 |
+
"あなたのIPアドレスのログイン試行可能回数がリミットに達したため、ログアウトすると再びログインする事が出"
|
262 |
+
"来なくなります。"
|
263 |
|
264 |
+
#: admin/class-ip-geo-block-admin.php:578
|
265 |
#, php-format
|
266 |
msgid ""
|
267 |
+
"Please remove your IP address in “%1$sStatistics in IP address cache"
|
268 |
+
"%2$s” on “%3$sStatistics%4$s” tab to prevent locking "
|
269 |
+
"yourself out."
|
270 |
msgstr ""
|
271 |
+
"[%3$s統計%4$s]タブの[%1$sIPアドレスのキャッシュ%2$s]から自身のIPアドレスを削除し、ロックアウトを回"
|
272 |
+
"避してください。"
|
273 |
|
274 |
+
#: admin/class-ip-geo-block-admin.php:589
|
275 |
msgid ""
|
276 |
"Once you logout, you will be unable to login again because your country code "
|
277 |
"or IP address is in the blacklist."
|
278 |
msgstr ""
|
279 |
+
"あなたの国コードまたはIPアドレスがブラックリストに含まれているため、ログアウトすると再びログインする事"
|
280 |
+
"が出来なくなります。"
|
281 |
|
282 |
+
#: admin/class-ip-geo-block-admin.php:590
|
283 |
msgid ""
|
284 |
"Once you logout, you will be unable to login again because your country code "
|
285 |
"or IP address is not in the whitelist."
|
286 |
msgstr ""
|
287 |
+
"あなたの国コードまたはIPアドレスがホワイトリストに含まれていないため、ログアウトすると再びログインする"
|
288 |
+
"事が出来なくなります。"
|
289 |
|
290 |
+
#: admin/class-ip-geo-block-admin.php:594
|
291 |
#, php-format
|
292 |
msgid "Please check your “%sValidation rule settings%s”."
|
293 |
msgstr "[%s検証ルールの設定%s]を確認して下さい。"
|
294 |
|
295 |
+
#: admin/class-ip-geo-block-admin.php:598
|
296 |
#, php-format
|
297 |
msgid ""
|
298 |
"Please confirm your local geolocation databases at “%sLocal database "
|
299 |
"settings%s” section and remove your IP address in cache at “"
|
300 |
"%sStatistics in cache%s” section."
|
301 |
msgstr ""
|
302 |
+
"[%sローカル・データベースの設定%s]で位置情報データベースを確認し、[%sキャッシュの統計%s]でキャッ"
|
303 |
+
"シュされているあなたのIPアドレスを削除して下さい。"
|
304 |
+
|
305 |
+
#: admin/class-ip-geo-block-admin.php:620
|
306 |
+
#, php-format
|
307 |
+
msgid ""
|
308 |
+
"Emergency login link is outdated. Please delete it once and generate again "
|
309 |
+
"at “%sPlugin settings%s” section. Also do not forget to update "
|
310 |
+
"favorites / bookmarks in your browser."
|
311 |
+
msgstr ""
|
312 |
+
"緊急ログイン・リンクが古くなっています。[%sプラグインの設定%s]で一度削除してから再度生成してくださ"
|
313 |
+
"い。 またブラウザのお気に入り/ブックマークも忘れずに更新して下さい。"
|
314 |
|
315 |
+
#: admin/class-ip-geo-block-admin.php:629
|
316 |
msgid ""
|
317 |
"“mu-plugins” (ip-geo-block-mu.php) at “Validation "
|
318 |
"timing” is imcompatible with <strong>IP Geo Allow</strong>. Please "
|
319 |
"select “init” action hook."
|
320 |
msgstr ""
|
321 |
+
"[検証のタイミング]に「“mu-plugins” (ip-geo-block-mu.php)」が選択されていますが、"
|
322 |
+
"<strong>IP Geo Allow</strong> と互換性がありません。「“init” アクション・フック」を選択して"
|
323 |
+
"ください。"
|
324 |
|
325 |
+
#: admin/class-ip-geo-block-admin.php:737
|
326 |
msgid "Statistics"
|
327 |
msgstr "統計"
|
328 |
|
329 |
+
#: admin/class-ip-geo-block-admin.php:738
|
330 |
msgid "Logs"
|
331 |
msgstr "ログ"
|
332 |
|
333 |
+
#: admin/class-ip-geo-block-admin.php:739
|
334 |
msgid "Search"
|
335 |
msgstr "検索"
|
336 |
|
337 |
+
#: admin/class-ip-geo-block-admin.php:740
|
338 |
msgid "Attribution"
|
339 |
msgstr "リンク"
|
340 |
|
341 |
+
#: admin/class-ip-geo-block-admin.php:757
|
342 |
+
#: admin/class-ip-geo-block-admin.php:773
|
343 |
msgid "Network wide"
|
344 |
msgstr "ネットワーク管理"
|
345 |
|
346 |
+
#: admin/class-ip-geo-block-admin.php:786
|
347 |
msgid "Toggle all"
|
348 |
msgstr "全てを開閉"
|
349 |
|
350 |
+
#: admin/class-ip-geo-block-admin.php:789
|
351 |
msgid ""
|
352 |
"Independent of “Privacy and record settings”, you can see all "
|
353 |
"the requests validated by this plugin in almost real time."
|
354 |
msgstr ""
|
355 |
+
"[プライバシーと記録の設定]にかかわらず、このプラグインによる検証結果のすべてを、ほぼリアルタイムに表"
|
356 |
+
"示します。"
|
357 |
|
358 |
+
#: admin/class-ip-geo-block-admin.php:789 admin/includes/tab-accesslog.php:39
|
359 |
msgid "Live update"
|
360 |
msgstr "ライブアップデート"
|
361 |
|
362 |
+
#: admin/class-ip-geo-block-admin.php:793
|
363 |
msgid "Open a new window on clicking the link in the chart."
|
364 |
msgstr "チャート内のリンクをクリックすると、新しいウィンドウが開きます。"
|
365 |
|
366 |
+
#: admin/class-ip-geo-block-admin.php:817
|
|
|
|
|
|
|
|
|
367 |
msgid "Thanks for providing these great services for free."
|
368 |
msgstr "これらのすばらしいサービスの提供元に、敬意と感謝の意を表します!"
|
369 |
|
370 |
+
#: admin/class-ip-geo-block-admin.php:818
|
371 |
msgid ""
|
372 |
+
"(Most browsers will redirect you to each site <a href=\"https://www."
|
373 |
"ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
|
374 |
"when you click the link</a>.)"
|
375 |
msgstr ""
|
376 |
+
"(ほとんどのブラウザでは、<a href=\"https://www.ipgeoblock.com/etc/referer.html\" title=\"Referer "
|
377 |
+
"Checker\">参照元を残さずにリンク先にリダイレクトできます</a>。)"
|
|
|
378 |
|
379 |
+
#: admin/class-ip-geo-block-admin.php:823
|
380 |
msgid "Back to top"
|
381 |
msgstr "トップに戻る"
|
382 |
|
383 |
+
#: admin/class-ip-geo-block-admin.php:915
|
384 |
msgid "Enable"
|
385 |
msgstr "有効"
|
386 |
|
387 |
+
#: admin/class-ip-geo-block-admin.php:930
|
388 |
msgid "Select one"
|
389 |
msgstr "何れかを選択"
|
390 |
|
391 |
+
#: admin/class-ip-geo-block-admin.php:1349
|
392 |
msgid "You do not have sufficient permissions to access this page."
|
393 |
msgstr "このページにアクセスするための十分な権限がありません。"
|
394 |
|
395 |
+
#: admin/class-ip-geo-block-admin.php:1376
|
396 |
#: admin/includes/class-admin-rewrite.php:194
|
397 |
+
#: classes/class-ip-geo-block-cron.php:216
|
398 |
+
#: classes/class-ip-geo-block-cron.php:320
|
399 |
+
#: classes/class-ip-geo-block-cron.php:394
|
400 |
+
#: classes/class-ip-geo-block-opts.php:471
|
401 |
#, php-format
|
402 |
msgid "Unable to write <code>%s</code>. Please check the permission."
|
403 |
msgstr "<code>%s</code> に書き込めません。パーミッションをチェックして下さい。"
|
404 |
|
405 |
+
#: admin/class-ip-geo-block-admin.php:1406
|
406 |
msgid "Settings saved."
|
407 |
msgstr "設定を保存しました。"
|
408 |
|
409 |
#: admin/includes/class-admin-ajax.php:72
|
410 |
+
#: admin/includes/class-admin-ajax.php:75 admin/includes/tab-settings.php:84
|
411 |
+
#: admin/includes/tab-settings.php:103
|
412 |
msgid "n/a"
|
|
|
|
|
|
|
|
|
|
|
413 |
msgstr "不明"
|
414 |
|
415 |
+
#: admin/includes/class-admin-ajax.php:201
|
416 |
#, php-format
|
417 |
msgid "The user %s (user ID: %d) is in use."
|
418 |
msgstr "ユーザー %s(ユーザーID:%d)が使用中です。"
|
419 |
|
420 |
+
#: admin/includes/class-admin-ajax.php:505
|
421 |
#, php-format
|
422 |
msgid ""
|
423 |
"illegal format at %s. Please delete the corresponding line and try again."
|
424 |
msgstr "%sは誤ったフォーマットです。該当行を削除し、再実行してください。"
|
425 |
|
426 |
#: admin/includes/class-admin-rewrite.php:168
|
427 |
+
#: classes/class-ip-geo-block-cron.php:211
|
428 |
+
#: classes/class-ip-geo-block-cron.php:389
|
429 |
#, php-format
|
430 |
msgid "Unable to read <code>%s</code>. Please check the permission."
|
431 |
msgstr "<code>%s</code> が読めません。パーミッションをチェックして下さい。"
|
445 |
msgid "Validation logs"
|
446 |
msgstr "検証のログ"
|
447 |
|
448 |
+
#: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:17
|
|
|
449 |
msgid "Help"
|
450 |
msgstr "ヘルプ"
|
451 |
|
452 |
+
#: admin/includes/tab-accesslog.php:55 admin/includes/tab-settings.php:413
|
453 |
msgid "Comment post"
|
454 |
msgstr "コメント投稿"
|
455 |
|
456 |
+
#: admin/includes/tab-accesslog.php:56 admin/includes/tab-settings.php:414
|
457 |
msgid "XML-RPC"
|
458 |
msgstr "XML-RPC"
|
459 |
|
460 |
+
#: admin/includes/tab-accesslog.php:57 admin/includes/tab-settings.php:415
|
461 |
msgid "Login form"
|
462 |
msgstr "ログイン・フォーム"
|
463 |
|
464 |
+
#: admin/includes/tab-accesslog.php:58 admin/includes/tab-settings.php:416
|
465 |
msgid "Admin area"
|
466 |
msgstr "管理領域"
|
467 |
|
468 |
+
#: admin/includes/tab-accesslog.php:59 admin/includes/tab-settings.php:418
|
469 |
msgid "Public facing pages"
|
470 |
msgstr "一般公開ページ"
|
471 |
|
472 |
+
#: admin/includes/tab-accesslog.php:62 admin/includes/tab-network.php:75
|
473 |
msgid "All"
|
474 |
msgstr "全て"
|
475 |
|
477 |
msgid "Select target"
|
478 |
msgstr "対象を選択"
|
479 |
|
480 |
+
#: admin/includes/tab-accesslog.php:86
|
481 |
msgid "Search in logs"
|
482 |
msgstr "ログを検索"
|
483 |
|
484 |
+
#: admin/includes/tab-accesslog.php:95 admin/includes/tab-statistics.php:232
|
485 |
msgid "Reset"
|
486 |
msgstr "リセット"
|
487 |
|
488 |
+
#: admin/includes/tab-accesslog.php:109
|
489 |
+
msgid "Preset filters"
|
490 |
+
msgstr "プリセット・フィルタ"
|
491 |
+
|
492 |
+
#: admin/includes/tab-accesslog.php:125 admin/includes/tab-statistics.php:238
|
493 |
msgid "Bulk action"
|
494 |
msgstr "選択して実行"
|
495 |
|
496 |
+
#: admin/includes/tab-accesslog.php:136 admin/includes/tab-statistics.php:249
|
497 |
msgid "Remove entries by IP address"
|
498 |
msgstr "指定のIPアドレスでエントリを削除"
|
499 |
|
500 |
+
#: admin/includes/tab-accesslog.php:137 admin/includes/tab-statistics.php:250
|
501 |
msgid "Add IP address to “Whitelist”"
|
502 |
msgstr "IPアドレスをホワイトリストへ追加"
|
503 |
|
504 |
+
#: admin/includes/tab-accesslog.php:138 admin/includes/tab-statistics.php:251
|
505 |
msgid "Add IP address to “Blacklist”"
|
506 |
msgstr "IPアドレスをブラックリストへ追加"
|
507 |
|
508 |
+
#: admin/includes/tab-accesslog.php:139 admin/includes/tab-statistics.php:252
|
509 |
msgid "Add AS number to “Whitelist”"
|
510 |
msgstr "AS番号をホワイトリストへ追加"
|
511 |
|
512 |
+
#: admin/includes/tab-accesslog.php:140 admin/includes/tab-statistics.php:253
|
513 |
msgid "Add AS number to “Blacklist”"
|
514 |
msgstr "AS番号をブラックリストへ追加"
|
515 |
|
516 |
+
#: admin/includes/tab-accesslog.php:142 admin/includes/tab-network.php:56
|
517 |
+
#: admin/includes/tab-statistics.php:255
|
518 |
msgid "Apply"
|
519 |
msgstr "実行する"
|
520 |
|
521 |
+
#: admin/includes/tab-accesslog.php:149 admin/includes/tab-statistics.php:191
|
522 |
msgid "Clear logs"
|
523 |
msgstr "ログをクリア"
|
524 |
|
525 |
+
#: admin/includes/tab-accesslog.php:157 admin/includes/tab-statistics.php:167
|
526 |
+
#: admin/includes/tab-statistics.php:199 admin/includes/tab-statistics.php:269
|
527 |
msgid "Clear all"
|
528 |
msgstr "全てをクリア"
|
529 |
|
530 |
+
#: admin/includes/tab-accesslog.php:166
|
531 |
msgid "Export logs"
|
532 |
msgstr "ログをエクスポート"
|
533 |
|
534 |
+
#: admin/includes/tab-accesslog.php:172 admin/includes/tab-settings.php:1538
|
535 |
+
#: admin/includes/tab-statistics.php:283
|
536 |
msgid "Export to the local file"
|
537 |
msgstr "ローカル・ファイルへエクスポートする"
|
538 |
|
539 |
+
#: admin/includes/tab-accesslog.php:172 admin/includes/tab-statistics.php:283
|
540 |
msgid "Export csv"
|
541 |
msgstr "CSVへエクスポート"
|
542 |
|
543 |
+
#: admin/includes/tab-accesslog.php:193 admin/includes/tab-network.php:112
|
544 |
+
#: admin/includes/tab-statistics.php:413
|
545 |
#, php-format
|
546 |
+
msgid "[ %sRecord “Validation logs”%s ] is disabled."
|
547 |
msgstr "[%s検証のログを記録%s]が無効です。"
|
548 |
|
549 |
+
#: admin/includes/tab-accesslog.php:194 admin/includes/tab-network.php:113
|
550 |
+
#: admin/includes/tab-statistics.php:414
|
551 |
msgid ""
|
552 |
"Please set the proper condition to record and analyze the validation logs."
|
553 |
msgstr "検証のログを記録し分析するためには、適切な条件を設定して下さい。"
|
554 |
|
555 |
+
#: admin/includes/tab-attribution.php:13
|
556 |
msgid "Attribution links"
|
557 |
msgstr "リンク"
|
558 |
|
559 |
+
#: admin/includes/tab-geolocation.php:17
|
560 |
msgid "Search IP address geolocation"
|
561 |
msgstr "IPアドレスの位置情報を検索"
|
562 |
|
563 |
+
#: admin/includes/tab-geolocation.php:46
|
564 |
msgid "Geolocation API"
|
565 |
msgstr "位置情報API"
|
566 |
|
567 |
+
#: admin/includes/tab-geolocation.php:89 admin/includes/tab-settings.php:1084
|
568 |
msgid ""
|
569 |
"<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
|
570 |
"Moreover, this option replaces the end of IP address with “***” "
|
571 |
"to make it anonymous.\">Anonymize IP address</dfn>"
|
572 |
msgstr ""
|
573 |
+
"<dfn title=\"IPアドレスは、常に暗号化されてキャッシュとログに記録されます。このオプションはさらに、IPア"
|
574 |
+
"ドレスの末尾を「***」に置き換えて匿名化します。\">IPアドレスを匿名化する</dfn>"
|
|
|
575 |
|
576 |
+
#: admin/includes/tab-geolocation.php:104
|
577 |
msgid "Search geolocation"
|
578 |
msgstr "位置情報の検索"
|
579 |
|
580 |
+
#: admin/includes/tab-geolocation.php:112
|
581 |
msgid "Search now"
|
582 |
msgstr "今すぐ検索"
|
583 |
|
593 |
msgid "Columns"
|
594 |
msgstr "列数"
|
595 |
|
596 |
+
#: admin/includes/tab-network.php:61
|
597 |
msgid "Chart display layout"
|
598 |
msgstr "チャートの表示レイアウト"
|
599 |
|
600 |
+
#: admin/includes/tab-network.php:76
|
601 |
msgid "Latest 1 hour"
|
602 |
msgstr "最新の1時間"
|
603 |
|
604 |
+
#: admin/includes/tab-network.php:77
|
605 |
msgid "Latest 24 hours"
|
606 |
msgstr "最新の24時間"
|
607 |
|
608 |
+
#: admin/includes/tab-network.php:78
|
609 |
msgid "Latest 1 week"
|
610 |
msgstr "最新の1週間"
|
611 |
|
612 |
+
#: admin/includes/tab-network.php:90
|
613 |
msgid "Duration to retrieve"
|
614 |
msgstr "取得する期間"
|
615 |
|
616 |
+
#: admin/includes/tab-settings.php:13
|
617 |
+
msgid "(comma separated)"
|
618 |
+
msgstr "(カンマ区切り)"
|
619 |
+
|
620 |
+
#: admin/includes/tab-settings.php:14
|
621 |
+
msgid "(comma or RET separated)"
|
622 |
+
msgstr "(カンマ、改行区切り)"
|
623 |
+
|
624 |
+
#: admin/includes/tab-settings.php:15
|
625 |
+
msgid "Toggle selection"
|
626 |
+
msgstr "選択を切り替える"
|
627 |
+
|
628 |
+
#: admin/includes/tab-settings.php:16
|
629 |
+
msgid "Find blocked requests in “Logs“"
|
630 |
+
msgstr "ログから遮断されたリクエストを検索する"
|
631 |
+
|
632 |
+
#: admin/includes/tab-settings.php:18
|
633 |
+
msgid ""
|
634 |
+
"Before adding as “Exception”, please click on “<a class="
|
635 |
+
"\"ip-geo-block-icon ip-geo-block-icon-alert\" title=\"This button is just a "
|
636 |
+
"sample.\"><span></span></a>” button (if exists) attached to the "
|
637 |
+
"following list to confirm that the blocked request is not malicious."
|
638 |
+
msgstr ""
|
639 |
+
"[例外]に追加する前に、以下の候補に付いたボタン “<a class=\"ip-geo-block-icon ip-geo-block-icon-"
|
640 |
+
"alert\" title=\"このボタンは単なるサンプルです。\"><span></span></a>”(もしあれば)をクリックし、"
|
641 |
+
"遮断されたリクエストに悪意のないことを確認して下さい。"
|
642 |
+
|
643 |
+
#: admin/includes/tab-settings.php:19
|
644 |
+
msgid "Open CIDR calculator for IPv4 / IPv6."
|
645 |
+
msgstr "IPv4/IPv6用CIDR変換電卓を開きます。"
|
646 |
+
|
647 |
+
#: admin/includes/tab-settings.php:54
|
648 |
msgid "Validation rule settings"
|
649 |
msgstr "検証ルールの設定"
|
650 |
|
651 |
+
#: admin/includes/tab-settings.php:76
|
652 |
msgid ""
|
653 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
654 |
"code by referring “Scan country code”.\">Your IP address / "
|
655 |
"Country</dfn>"
|
656 |
msgstr ""
|
657 |
+
"<dfn title=\"[国コードを検索する]を参照し、適切な位置情報APIと国コードを設定して下さい。\">あなたのIP"
|
658 |
+
"アドレス / 国コード</dfn>"
|
659 |
|
660 |
+
#: admin/includes/tab-settings.php:85 admin/includes/tab-settings.php:104
|
661 |
msgid "Scan all the APIs you selected at Geolocation API settings"
|
662 |
msgstr "選択された位置情報APIを検索します"
|
663 |
|
664 |
+
#: admin/includes/tab-settings.php:85 admin/includes/tab-settings.php:104
|
665 |
msgid "Scan country code"
|
666 |
msgstr "国コードを検索する"
|
667 |
|
668 |
+
#: admin/includes/tab-settings.php:95
|
669 |
msgid ""
|
670 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
671 |
"code by referring “Scan country code”.\">Server IP address / "
|
672 |
"Country</dfn>"
|
673 |
msgstr ""
|
674 |
+
"<dfn title=\"[国コードを検索する]を参照し、適切な位置情報APIと国コードを設定して下さい。\">サーバーの"
|
675 |
+
"IPアドレス / 国コード</dfn>"
|
676 |
|
677 |
+
#: admin/includes/tab-settings.php:112
|
678 |
msgid "Whitelist"
|
679 |
msgstr "ホワイトリスト"
|
680 |
|
681 |
+
#: admin/includes/tab-settings.php:113
|
682 |
msgid "Blacklist"
|
683 |
msgstr "ブラックリスト"
|
684 |
|
685 |
+
#: admin/includes/tab-settings.php:117
|
686 |
msgid ""
|
687 |
"Please select either “Whitelist” or “Blacklist”."
|
688 |
+
msgstr "「ホワイトリスト」または「ブラックリスト」のどちらかを選択してください。"
|
|
|
689 |
|
690 |
+
#: admin/includes/tab-settings.php:118
|
691 |
msgid ""
|
692 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
693 |
"empty. The special code “XX” is assigned as private IP address "
|
696 |
"the code that does not correspond to any of the countries.\">Whitelist of "
|
697 |
"country code</dfn>"
|
698 |
msgstr ""
|
699 |
+
"<dfn title=\"空欄の場合、「国コードで遮断」はバイパスされます。特別なコード「XX」は、localhost を含むプ"
|
700 |
+
"ライベート・アドレスに割り当てられ、また「ZZ」は不明(位置情報データベースに未登録)を表します。どの国"
|
701 |
+
"にもマッチさせないことが必要な場合には、「YY」を指定してください。\">国コードのホワイトリスト</dfn>"
|
|
|
702 |
|
703 |
+
#: admin/includes/tab-settings.php:119
|
704 |
msgid ""
|
705 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
706 |
"empty. The special code “XX” is assigned as private IP address "
|
709 |
"the code that does not correspond to any of the countries.\">Blacklist of "
|
710 |
"country code</dfn>"
|
711 |
msgstr ""
|
712 |
+
"<dfn title=\"空欄の場合、「国コードで遮断」はバイパスされます。特別なコード「XX」は、localhost を含むプ"
|
713 |
+
"ライベート・アドレスに割り当てられ、また「ZZ」は不明(位置情報データベースに未登録)を表します。どの国"
|
714 |
+
"にもマッチさせないことが必要な場合には、「YY」を指定してください。\">国コードのブラックリスト</dfn>"
|
|
|
715 |
|
716 |
+
#: admin/includes/tab-settings.php:125 admin/includes/tab-settings.php:790
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
msgid "Matching rule"
|
718 |
msgstr "マッチング規則"
|
719 |
|
720 |
+
#: admin/includes/tab-settings.php:137
|
721 |
msgid ""
|
722 |
"A request from which the country code or IP address is <strong>NOT</strong> "
|
723 |
"in the whitelist will be blocked."
|
724 |
msgstr ""
|
725 |
+
"国コードまたはIPアドレスがホワイトリストに<strong>含まれていない</strong>リクエストを遮断します。"
|
|
|
726 |
|
727 |
+
#: admin/includes/tab-settings.php:138
|
728 |
msgid ""
|
729 |
"A request from which the country code or IP address is in the blacklist will "
|
730 |
"be blocked."
|
731 |
+
msgstr "国コードまたはIPアドレスがブラックリストに<strong>含まれている</strong>リクエストを遮断します。"
|
|
|
|
|
732 |
|
733 |
+
#: admin/includes/tab-settings.php:180
|
734 |
msgid ""
|
735 |
"<dfn title=\"It enables utilizing “AS number” in the “"
|
736 |
"Whitelist/Blacklist of extra IP addresses” to specify a group of IP "
|
737 |
"networks.\">Use Autonomous System Number</dfn>"
|
738 |
msgstr ""
|
739 |
+
"<dfn title=\"ホワイトリスト、ブラックリストにIPアドレスを指定する代わりに、ネットワークのグループを代表"
|
740 |
+
"する「AS番号」の指定を可能にします。\">AS番号を使用可能にする</dfn>"
|
|
|
741 |
|
742 |
+
#: admin/includes/tab-settings.php:191
|
743 |
#, php-format
|
744 |
msgid "Some useful tools to find ASN are introduced in “%s”."
|
745 |
msgstr "AS番号の検索に役立つツールを “%s” に紹介しています。"
|
746 |
|
747 |
+
#: admin/includes/tab-settings.php:198
|
748 |
msgid ""
|
749 |
"<dfn title=\"e.g. “192.0.64.0/18” for Jetpack server, "
|
750 |
"“69.46.36.0/27” for WordFence server or “AS32934” "
|
751 |
"for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
|
752 |
msgstr ""
|
753 |
+
"<dfn title=\"例)192.0.64.0/18(Jetpackサーバー)、69.46.36.0/27(WordFenceサーバー)、"
|
754 |
+
"AS32934(Facebook)\">国コードに優先して検証するIPアドレスのホワイトリスト</dfn>"
|
|
|
755 |
|
756 |
+
#: admin/includes/tab-settings.php:219
|
757 |
msgid ""
|
758 |
"<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
|
759 |
"\">Blacklist of extra IP addresses prior to country code</dfn>"
|
760 |
msgstr ""
|
761 |
+
"<dfn title=\"サーバー・レベルのアクセス制御の使用をお勧めします(例:.htaccess)。\">国コードに優先して"
|
762 |
+
"検証するIPアドレスのブラックリスト</dfn>"
|
763 |
|
764 |
+
#: admin/includes/tab-settings.php:240
|
765 |
msgid ""
|
766 |
"<dfn title=\"If your server is placed behind the proxy server or the load "
|
767 |
"balancing server, you need to put the appropriate key such as “"
|
769 |
"that to retrieve the client IP address.\">$_SERVER keys to retrieve extra IP "
|
770 |
"addresses</dfn>"
|
771 |
msgstr ""
|
772 |
+
"<dfn title=\"あなたのサーバーがプロキシー・サーバーやロード・バランサーの背後に位置する場合は、クライア"
|
773 |
+
"ントのIPアドレスを抽出するため「HTTP_X_FORWARDED_FOR」や「HTTP_X_REAL_IP」など、$_SERVER の適切なキーを"
|
774 |
+
"指定してください。\">IPアドレスを追加抽出する $_SERVER のキー</dfn>"
|
|
|
775 |
|
776 |
+
#: admin/includes/tab-settings.php:258
|
777 |
msgid ""
|
778 |
"<dfn title=\"It validates malicious signatures independently of “Block "
|
779 |
"by country” and “Prevent Zero-day Exploit” for the target "
|
783 |
"block-decode\" title=\"When you find ugly character string in the text area, "
|
784 |
"please click to restore.\"><span></span></a>)</nobr>"
|
785 |
msgstr ""
|
786 |
+
"<dfn title=\"「国コードで遮断」および「ゼロデイ攻撃を遮断」とは独立に、[管理領域]、[管理領域 ajax/"
|
787 |
+
"post]、[プラグイン領域]、[テーマ領域]をターゲットとした悪意のあるシグネチャを検証します。\">悪意の"
|
788 |
+
"あるシグネチャ</dfn> <nobr>(<a class=\"ip-geo-block-icon ip-geo-block-icon-cycle\" id=\"ip-geo-block-"
|
789 |
+
"decode\" title=\"文字化けした場合、クリックして復元して下さい。\"><span></span></a>)</nobr>"
|
|
|
|
|
790 |
|
791 |
+
#: admin/includes/tab-settings.php:272
|
792 |
msgid ""
|
793 |
"<dfn title=\"Select allowed MIME type.\">Whitelist of allowed MIME type</dfn>"
|
794 |
+
msgstr "<dfn title=\"許可する MIME タイプを指定します。\">許可する MIME タイプのホワイトリスト</dfn>"
|
|
|
|
|
795 |
|
796 |
+
#: admin/includes/tab-settings.php:283
|
797 |
msgid ""
|
798 |
"<dfn title=\"Put forbidden file extensions.\">Blacklist of forbidden file "
|
799 |
"extensions</dfn>"
|
800 |
msgstr ""
|
801 |
+
"<dfn title=\"禁止するファイルの拡張子を設定します。\">禁止するファイル拡張子のブラックリスト</dfn>"
|
|
|
802 |
|
803 |
+
#: admin/includes/tab-settings.php:287
|
804 |
msgid ""
|
805 |
"<dfn title=\"Specify the capabilities to be verified. Depending on the "
|
806 |
"particular type of uploader, certain capability may be required. Default is "
|
807 |
"“upload_files” for Administrator, Editor and Author. This "
|
808 |
"verification will be skipped if empty.\">Capabilities to be verified</dfn>"
|
809 |
msgstr ""
|
810 |
+
"<dfn title=\"検証する権限を指定します。アップローダーによっては、特定の権限を必要とする場合があります。"
|
811 |
+
"デフォルトは、管理者(Administrator)、編集者(Editor)、投稿者(Author)向けの「upload_files」です。空"
|
812 |
+
"欄の場合、この検証はスキップされます。\">検証する権限</dfn>"
|
|
|
813 |
|
814 |
+
#: admin/includes/tab-settings.php:287
|
815 |
msgid ""
|
816 |
"( See “<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
|
817 |
"Roles_and_Capabilities\" title=\"Roles and Capabilities « WordPress "
|
818 |
"Codex\">Roles and Capabilities</a>” )"
|
819 |
msgstr ""
|
820 |
+
"(“<a rel=\"noreferrer\" href=\"https://wpdocs.osdn.jp/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC"
|
821 |
+
"%E3%81%AE%E7%A8%AE%E9%A1%9E%E3%81%A8%E6%A8%A9%E9%99%90\" title=\"ユーザーの種類と権限 - WordPress "
|
822 |
+
"Codex 日本語版\">ユーザーの種類と権限</a>“ を参照)"
|
823 |
|
824 |
+
#: admin/includes/tab-settings.php:293
|
|
|
|
|
|
|
|
|
|
|
825 |
msgid ""
|
826 |
"<dfn title=\"It restricts the file types on upload in order to block malware "
|
827 |
"and backdoor via both back-end and front-end. Please consider to select "
|
829 |
"timing” so that other staff would not fetch the uploaded files before "
|
830 |
"this validation.\">Prevent malicious file uploading</dfn>"
|
831 |
msgstr ""
|
832 |
+
"<dfn title=\"ファイル・タイプを限定し、バックエンド、またはフロントエンドを経由するマルウェアやバックド"
|
833 |
+
"アのアップロードを遮断します。他のプラグインやテーマに先んじて確実に遮断するために、[検証のタイミン"
|
834 |
+
"グ]を「“mu-plugins” (ip-geo-block-mu.php)」に設定することを検討してください。\">悪意のある"
|
835 |
+
"アップロード防止</dfn>"
|
836 |
+
|
837 |
+
#: admin/includes/tab-settings.php:304 admin/includes/tab-settings.php:479
|
838 |
+
#: admin/includes/tab-settings.php:624 admin/includes/tab-settings.php:1189
|
|
|
839 |
msgid "Disable"
|
840 |
msgstr "無効"
|
841 |
|
842 |
+
#: admin/includes/tab-settings.php:305
|
843 |
msgid "Verify file extension and MIME type"
|
844 |
msgstr "拡張子と MIME タイプを検証"
|
845 |
|
846 |
+
#: admin/includes/tab-settings.php:306
|
847 |
msgid "Verify file extension only"
|
848 |
msgstr "ファイル拡張子のみを検証"
|
849 |
|
850 |
+
#: admin/includes/tab-settings.php:315
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
851 |
#, php-format
|
852 |
msgid ""
|
853 |
"<dfn title=\"You can put your original 403.php and so on into your theme "
|
854 |
"directory.\">Response code</dfn> %s"
|
855 |
msgstr ""
|
856 |
+
"<dfn title=\"テーマ・ディレクトリには 403.php など、独自のファイルを設置する事が出来ます。\">レスポン"
|
857 |
+
"ス・コード</dfn> %s"
|
858 |
|
859 |
+
#: admin/includes/tab-settings.php:344 admin/includes/tab-settings.php:873
|
860 |
msgid ""
|
861 |
"<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
|
862 |
"to a public facing page, visitors would not be blocked on the page to "
|
864 |
"[Front-end target settings] section. Empty URL is altered to your home."
|
865 |
"\">Redirect URL</dfn>"
|
866 |
msgstr ""
|
867 |
+
"<dfn title=\"レスポンス・コード 2xx 、3xx 用のリダイレクト先 URL を指定します。リダイレクトのループを避"
|
868 |
+
"けるため、自サイト内の URL は[フロントエンドの設定]に関わらず遮断の対象外となります。空欄の場合、サイ"
|
869 |
+
"トのホームが使用されます。\">リダイレクト先 URL</dfn>"
|
|
|
870 |
|
871 |
+
#: admin/includes/tab-settings.php:361 admin/includes/tab-settings.php:891
|
872 |
msgid ""
|
873 |
"<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
|
874 |
"message</dfn>"
|
875 |
msgstr ""
|
876 |
+
"<dfn title=\"レスポンス・コード 4xx、5xx 用のメッセージを指定します。\">レスポンス・メッセージ</dfn>"
|
|
|
877 |
|
878 |
+
#: admin/includes/tab-settings.php:379
|
879 |
msgid "Select when to run the validation."
|
880 |
msgstr "検証を実行するタイミングを選択します。"
|
881 |
|
882 |
+
#: admin/includes/tab-settings.php:379
|
883 |
msgid "Validation timing"
|
884 |
msgstr "検証のタイミング"
|
885 |
|
886 |
+
#: admin/includes/tab-settings.php:390
|
887 |
msgid "“init” action hook"
|
888 |
msgstr "“init” アクション・フック"
|
889 |
|
890 |
+
#: admin/includes/tab-settings.php:391
|
891 |
msgid "“mu-plugins” (ip-geo-block-mu.php)"
|
892 |
msgstr "“mu-plugins” (ip-geo-block-mu.php)"
|
893 |
|
894 |
+
#: admin/includes/tab-settings.php:394
|
895 |
msgid ""
|
896 |
"Validate at “init” action hook in the same manner as typical "
|
897 |
"plugins."
|
898 |
+
msgstr "標準的な他のプラグインと同様、init アクション・フックのタイミングで検証を実行します。"
|
|
|
|
|
899 |
|
900 |
+
#: admin/includes/tab-settings.php:395
|
901 |
msgid ""
|
902 |
"Validate at an earlier phase than other typical plugins. It can reduce load "
|
903 |
+
"on server but has <a rel='noreferrer' href='https://www.ipgeoblock.com/codex/"
|
904 |
"validation-timing.html' title='Validation timing | IP Geo Block'>some "
|
905 |
"restrictions</a>."
|
906 |
msgstr ""
|
907 |
+
"標準的な他のプラグインより早いタイミングで検証を実行します。これによりサーバーの負荷は軽減されますが、"
|
908 |
+
"<a rel=‘noreferrer’ href=‘https://www.ipgeoblock.com/codex/validation-timing.html' title=‘Validation "
|
909 |
+
"timing | IP Geo Block’>幾つかの制限事項</a> が生じます。"
|
|
|
910 |
|
911 |
+
#: admin/includes/tab-settings.php:405
|
912 |
msgid "Back-end target settings"
|
913 |
msgstr "バックエンドの設定"
|
914 |
|
915 |
+
#: admin/includes/tab-settings.php:411
|
916 |
#, php-format
|
917 |
msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
|
918 |
msgstr "<dfn title=\"%s へのリクエストを検証します。\">%s</dfn>"
|
919 |
|
920 |
+
#: admin/includes/tab-settings.php:417
|
921 |
msgid "Other areas"
|
922 |
msgstr "その他の領域"
|
923 |
|
924 |
+
#: admin/includes/tab-settings.php:418
|
925 |
msgid "public facing pages"
|
926 |
msgstr "一般公開ページ"
|
927 |
|
928 |
+
#: admin/includes/tab-settings.php:434 admin/includes/tab-settings.php:480
|
929 |
+
#: admin/includes/tab-settings.php:512 admin/includes/tab-settings.php:518
|
930 |
+
#: admin/includes/tab-settings.php:783
|
931 |
msgid "Block by country"
|
932 |
msgstr "国コードで遮断"
|
933 |
|
934 |
+
#: admin/includes/tab-settings.php:444
|
935 |
+
msgid "The whole will be wrapped by <p> tag. Allowed tags: "
|
936 |
+
msgstr "全体を <p> タグで囲みます。使用可能タグ:"
|
937 |
+
|
938 |
+
#: admin/includes/tab-settings.php:444
|
939 |
+
msgid "Message on comment form"
|
940 |
+
msgstr "投稿フォーム上のメッセージ"
|
941 |
+
|
942 |
+
#: admin/includes/tab-settings.php:457
|
943 |
+
msgid "None"
|
944 |
+
msgstr "なし"
|
945 |
+
|
946 |
+
#: admin/includes/tab-settings.php:458
|
947 |
+
msgid "Top"
|
948 |
+
msgstr "上部"
|
949 |
+
|
950 |
+
#: admin/includes/tab-settings.php:459
|
951 |
+
msgid "Bottom"
|
952 |
+
msgstr "下部"
|
953 |
+
|
954 |
+
#: admin/includes/tab-settings.php:481
|
955 |
msgid "Completely close"
|
956 |
msgstr "完全に閉鎖"
|
957 |
|
958 |
+
#: admin/includes/tab-settings.php:487
|
959 |
msgid "Action to login as a registered user."
|
960 |
msgstr "登録済みユーザーとしてログインするアクション。"
|
961 |
|
962 |
+
#: admin/includes/tab-settings.php:487
|
963 |
msgid "Log in"
|
964 |
msgstr "ログイン"
|
965 |
|
966 |
+
#: admin/includes/tab-settings.php:488
|
967 |
msgid "Action to register new users."
|
968 |
msgstr "新規ユーザーを登録するアクション。"
|
969 |
|
970 |
+
#: admin/includes/tab-settings.php:488
|
971 |
msgid "Register"
|
972 |
msgstr "登録"
|
973 |
|
974 |
+
#: admin/includes/tab-settings.php:489
|
975 |
msgid "Action to reset a password to create a new one."
|
976 |
msgstr "パスワードをリセットし、新しいパスワードに更新するアクション。"
|
977 |
|
978 |
+
#: admin/includes/tab-settings.php:489
|
979 |
msgid "Password Reset"
|
980 |
msgstr "パスワードのリセット"
|
981 |
|
982 |
+
#: admin/includes/tab-settings.php:490
|
983 |
msgid "Action to email a password to a registered user."
|
984 |
msgstr "登録済みユーザーにパスワードを送付するアクション。"
|
985 |
|
986 |
+
#: admin/includes/tab-settings.php:490
|
987 |
msgid "Lost Password"
|
988 |
msgstr "パスワード紛失"
|
989 |
|
990 |
+
#: admin/includes/tab-settings.php:491
|
991 |
msgid ""
|
992 |
"Action to show prompt to enter a password on password protected post and "
|
993 |
"page."
|
994 |
+
msgstr "パスワードで保護された投稿とページにパスワードを入力するプロンプトを表示するアクション。"
|
|
|
|
|
995 |
|
996 |
+
#: admin/includes/tab-settings.php:491
|
997 |
msgid "Password protected"
|
998 |
msgstr "パスワード保護"
|
999 |
|
1000 |
+
#: admin/includes/tab-settings.php:513
|
1001 |
msgid ""
|
1002 |
"<dfn title=\"Specify the individual action as a blocking target.\">Target "
|
1003 |
"actions</dfn>"
|
1004 |
+
msgstr "<dfn title=\"遮断対象とするアクションを指定します。\">対象アクション</dfn>"
|
|
|
1005 |
|
1006 |
+
#: admin/includes/tab-settings.php:519
|
1007 |
msgid "Prevent Zero-day Exploit"
|
1008 |
msgstr "ゼロデイ攻撃を遮断"
|
1009 |
|
1010 |
+
#: admin/includes/tab-settings.php:523
|
1011 |
msgid ""
|
1012 |
"It will block a request related to the services for both public facing pages "
|
1013 |
"and the dashboard."
|
1014 |
+
msgstr "一般公開ページとダッシュボード向けサービスに関連するリクエストを遮断します。"
|
|
|
1015 |
|
1016 |
+
#: admin/includes/tab-settings.php:524
|
1017 |
msgid ""
|
1018 |
"Regardless of the country code, it will block a malicious request related to "
|
1019 |
"the services only for the dashboard."
|
1020 |
+
msgstr "国コードに拘らず、ダッシュボード向けサービスだけに関連する悪意のあるリクエストを遮断します。"
|
1021 |
+
|
1022 |
+
#: admin/includes/tab-settings.php:530
|
1023 |
+
msgid ""
|
1024 |
+
"This is applied to “XML-RPC” and “Login form” when "
|
1025 |
+
"“IP address cache” in “Privacy and record settings” "
|
1026 |
+
"section is enabled. Lockout period is the same as expiration time of the "
|
1027 |
+
"cache."
|
1028 |
msgstr ""
|
1029 |
+
"[プライバシーと記録の設定]»[IPアドレスのキャッシュを記録]が有効の時、[XML-RPC]と[ログイ"
|
1030 |
+
"ン・フォーム]に適用されます。ロックアウト時間は[有効時間]で定義します。"
|
1031 |
|
1032 |
+
#: admin/includes/tab-settings.php:530
|
1033 |
+
msgid "Max failed login attempts per IP address"
|
1034 |
+
msgstr "IPアドレス当たりのログイン試行可能回数"
|
1035 |
+
|
1036 |
+
#: admin/includes/tab-settings.php:571
|
1037 |
msgid "admin post for logged-in user"
|
1038 |
msgstr "認証済ユーザー用 admin post"
|
1039 |
|
1040 |
+
#: admin/includes/tab-settings.php:572
|
1041 |
msgid "admin post for non logged-in user"
|
1042 |
msgstr "未認証ユーザー用 admin post"
|
1043 |
|
1044 |
+
#: admin/includes/tab-settings.php:594
|
1045 |
msgid "Admin ajax/post"
|
1046 |
msgstr "管理領域 ajax/post"
|
1047 |
|
1048 |
+
#: admin/includes/tab-settings.php:608
|
1049 |
msgid ""
|
1050 |
"Specify the action name (“action=…”) or the page name "
|
1051 |
"(“page=…”) to prevent unintended blocking caused by "
|
1052 |
"“Block by country” (for non logged-in user) and “Prevent "
|
1053 |
"Zero-day Exploit” (for logged-in user)."
|
1054 |
msgstr ""
|
1055 |
+
"「国コードで遮断」(未認証ユーザーの場合)および「ゼロデイ攻撃を遮断」(認証済みユーザーの場合)が、意"
|
1056 |
+
"図しない遮断の原因となる場合、アクション名(“action=…” の “…” 部"
|
1057 |
+
"分)、またはページ名(“page=…” の “…” 部分)を指定し、検証対象か"
|
1058 |
+
"ら除外します。"
|
1059 |
+
|
1060 |
+
#: admin/includes/tab-settings.php:608 admin/includes/tab-settings.php:686
|
1061 |
+
#: admin/includes/tab-settings.php:746
|
|
|
1062 |
msgid "Exceptions"
|
1063 |
msgstr "例外"
|
1064 |
|
1065 |
+
#: admin/includes/tab-settings.php:609
|
1066 |
msgid "Toggle with non logged-in user"
|
1067 |
msgstr "未認証ユーザー用を含む項目に限定して表示する"
|
1068 |
|
1069 |
+
#: admin/includes/tab-settings.php:612
|
1070 |
msgid "Candidate actions/pages"
|
1071 |
msgstr "候補 アクション/ページ"
|
1072 |
|
1073 |
+
#: admin/includes/tab-settings.php:626
|
1074 |
#, php-format
|
1075 |
msgid ""
|
1076 |
"Regardless of the country code, it will block a malicious request to <code>"
|
1077 |
"%s⋯/*.php</code>."
|
1078 |
+
msgstr "国コードに拘らず、<code>%s⋯/*.php</code>への悪意のあるリクエストを遮断します。"
|
|
|
|
|
1079 |
|
1080 |
+
#: admin/includes/tab-settings.php:627
|
1081 |
msgid ""
|
1082 |
"Select the item which causes unintended blocking in order to exclude from "
|
1083 |
"the validation target. Grayed item indicates “INACTIVE”."
|
1084 |
msgstr ""
|
1085 |
+
"意図しない遮断の原因となる項目を選択し、検証対象から除外します。灰色で表示された項目は、「非アクティ"
|
1086 |
+
"ブ」であることを示しています。"
|
1087 |
|
1088 |
+
#: admin/includes/tab-settings.php:628
|
1089 |
#, php-format
|
1090 |
msgid ""
|
1091 |
"It configures “%s” to validate a direct request to the PHP file "
|
1092 |
"which does not load WordPress core. Make sure to deny direct access to the "
|
1093 |
"hidden files beginning with a dot by the server's configuration."
|
1094 |
msgstr ""
|
1095 |
+
"WordPressコアを読み込まないPHPファイルへのリクエストを検証対象とするために、%s を設定します。ドットで始"
|
1096 |
+
"まる隠しファイルへのアクセス拒否がサーバー側で設定されていることを確認して下さい。"
|
|
|
1097 |
|
1098 |
+
#: admin/includes/tab-settings.php:629
|
1099 |
msgid "Sorry, but your server type is not supported."
|
1100 |
msgstr "このサーバーではサポートされません。"
|
1101 |
|
1102 |
+
#: admin/includes/tab-settings.php:630
|
1103 |
msgid ""
|
1104 |
+
"You need to click “Save Changes” button for imported settings to "
|
1105 |
+
"take effect."
|
1106 |
+
msgstr "インポートされた設定を有効にするには、[変更を保存]ボタンをクリックする必要があります。"
|
|
|
|
|
1107 |
|
1108 |
+
#: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:725
|
1109 |
msgid "Force to load WP core"
|
1110 |
msgstr "WPコアの読み込みを強制"
|
1111 |
|
1113 |
msgid "Plugins area"
|
1114 |
msgstr "プラグイン領域"
|
1115 |
|
1116 |
+
#: admin/includes/tab-settings.php:730
|
1117 |
msgid "Themes area"
|
1118 |
msgstr "テーマ領域"
|
1119 |
|
1120 |
+
#: admin/includes/tab-settings.php:765
|
1121 |
msgid "Front-end target settings"
|
1122 |
msgstr "フロントエンドの設定"
|
1123 |
|
1124 |
+
#: admin/includes/tab-settings.php:800
|
1125 |
msgid "Follow “Validation rule settings”"
|
1126 |
msgstr "[検証ルールの設定]に従う"
|
1127 |
|
1128 |
+
#: admin/includes/tab-settings.php:842
|
1129 |
#, php-format
|
1130 |
msgid ""
|
1131 |
"<dfn title=\"You can configure a different response code from the Back-end. "
|
1132 |
"This is useful to prevent violation against your affiliate program."
|
1133 |
"\">Response code</dfn> %s"
|
1134 |
msgstr ""
|
1135 |
+
"<dfn title=\"バックエンドと異なるレスポンス・コードを設定できます。これは、アフィリエイト・プログラムに"
|
1136 |
+
"対する違反を防止するのに役立つでしょう。\">レスポンス・コード</dfn> %s"
|
|
|
1137 |
|
1138 |
+
#: admin/includes/tab-settings.php:906
|
1139 |
msgid ""
|
1140 |
"<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
|
1141 |
msgstr "<dfn title=\"特定のページを遮断対象に指定します。\">ページ</dfn>"
|
1142 |
|
1143 |
+
#: admin/includes/tab-settings.php:918
|
1144 |
msgid ""
|
1145 |
"<dfn title=\"Specify the individual post type on a single page as a blocking "
|
1146 |
"target.\">Post type</dfn>"
|
1147 |
+
msgstr "<dfn title=\"特定の投稿タイプのシングルページを遮断対象に指定します。\">投稿タイプ</dfn>"
|
|
|
|
|
1148 |
|
1149 |
+
#: admin/includes/tab-settings.php:930
|
1150 |
msgid ""
|
1151 |
"<dfn title=\"Specify the individual category on a single page or archive "
|
1152 |
"page as a blocking target.\">Category</dfn>"
|
1153 |
msgstr ""
|
1154 |
+
"<dfn title=\"特定のカテゴリを含むシングルページかアーカイブページを遮断対象に指定します。\">カテゴリ</"
|
1155 |
+
"dfn>"
|
1156 |
|
1157 |
+
#: admin/includes/tab-settings.php:942
|
1158 |
msgid ""
|
1159 |
"<dfn title=\"Specify the individual tag on a single page or archive page as "
|
1160 |
"a blocking target.\">Tag</dfn>"
|
1161 |
msgstr ""
|
1162 |
+
"<dfn title=\"特定のタグを含むシングルページかアーカイブページを遮断対象に指定します。\">タグ</dfn>"
|
|
|
1163 |
|
1164 |
+
#: admin/includes/tab-settings.php:956
|
1165 |
msgid "Specify the validation target on front-end."
|
1166 |
msgstr "フロントエンドの検証対象を設定します。"
|
1167 |
|
1168 |
+
#: admin/includes/tab-settings.php:956
|
1169 |
msgid "Validation target"
|
1170 |
msgstr "検証対象"
|
1171 |
|
1172 |
+
#: admin/includes/tab-settings.php:967
|
1173 |
msgid "All requests"
|
1174 |
msgstr "全てのリクエスト"
|
1175 |
|
1176 |
+
#: admin/includes/tab-settings.php:968
|
1177 |
msgid "Specify the targets"
|
1178 |
msgstr "ターゲットを指定"
|
1179 |
|
1180 |
+
#: admin/includes/tab-settings.php:971
|
1181 |
msgid ""
|
1182 |
"Notice that “Validation timing” is deferred till “"
|
1183 |
"wp” action hook. It means that this feature would not be compatible "
|
1184 |
"with any page caching."
|
1185 |
msgstr ""
|
1186 |
+
"[検証のタイミング]が “wp” アクション・フックまで遅延されます。これにより、ページ・キャッ"
|
1187 |
+
"シュとの互換性がなくなることに注意してください。"
|
1188 |
|
1189 |
+
#: admin/includes/tab-settings.php:981
|
1190 |
+
msgid "Specify the name of actions as exception that is invariably blocked."
|
1191 |
+
msgstr "常に遮断されるアクション名を例外として指定します。"
|
1192 |
+
|
1193 |
+
#: admin/includes/tab-settings.php:981
|
1194 |
+
msgid "Excluded actions"
|
1195 |
+
msgstr "除外するアクション"
|
1196 |
+
|
1197 |
+
#: admin/includes/tab-settings.php:997
|
1198 |
msgid ""
|
1199 |
"<dfn title=\"Specify the frequency of request for certain period of time."
|
1200 |
"\">Blocking condition</dfn>"
|
1201 |
msgstr "<dfn title=\"特定期間のリクエスト頻度を設定します。\">遮断条件</dfn>"
|
1202 |
|
1203 |
+
#: admin/includes/tab-settings.php:999
|
1204 |
#, php-format
|
1205 |
msgid "More than %1$s page view (PV) in %2$s seconds"
|
1206 |
+
msgstr "%2$s 秒間で %1$s を超えるページビュー (PV)"
|
1207 |
|
1208 |
+
#: admin/includes/tab-settings.php:1007
|
1209 |
msgid ""
|
1210 |
"<dfn title=\"It will validate the frequency of request.\">Block badly-"
|
1211 |
"behaved bots and crawlers</dfn>"
|
1212 |
+
msgstr "<dfn title=\"リクエスト頻度を検証します。\">行儀の悪いボットやクローラーを遮断</dfn>"
|
|
|
|
|
1213 |
|
1214 |
+
#: admin/includes/tab-settings.php:1024
|
1215 |
msgid ""
|
1216 |
"A part of user agent string and a qualification connected with a separator "
|
1217 |
"that indicates an applicable rule and can be “:” (pass) or "
|
1220 |
"negative operator “!” can be placed just before a “"
|
1221 |
"qualification”."
|
1222 |
msgstr ""
|
1223 |
+
"適用されるルールを表す記号(「:」は通過、「#」は遮断)で区切られたユーザーエージェント文字列の一部と"
|
1224 |
+
"「条件」のペアです。「条件」には「DNS」、「FEED」、国コード、または IPアドレス(CIDR記法)が使えま"
|
1225 |
+
"す。また否定を表す記号「!」を「条件」の直前に配置する事が出来ます。"
|
|
|
1226 |
|
1227 |
+
#: admin/includes/tab-settings.php:1024
|
1228 |
msgid "UA string and qualification"
|
1229 |
msgstr "ユーザーエージェント文字列と条件"
|
1230 |
|
1231 |
+
#: admin/includes/tab-settings.php:1041
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1232 |
msgid ""
|
1233 |
"It enables to verify the host by reverse DNS lookup which would spend some "
|
1234 |
"server resources. If it is disabled, “HOST” and “"
|
1235 |
"HOST=…”in “UA string and qualification” will always "
|
1236 |
"return “true”."
|
1237 |
msgstr ""
|
1238 |
+
"DNS 逆引きによりホストを検証します(幾らかのサーバー・リソースを消費します)。無効にした場合、[ユー"
|
1239 |
+
"ザーエージェント文字列と条件]中の「HOST」および「HOST=…」は常に真となります。"
|
|
|
1240 |
|
1241 |
+
#: admin/includes/tab-settings.php:1041
|
1242 |
+
msgid "Reverse DNS lookup"
|
1243 |
msgstr "DNS 逆引き"
|
1244 |
|
1245 |
+
#: admin/includes/tab-settings.php:1058
|
1246 |
msgid ""
|
1247 |
"It enables to simulate validation without deployment. The results can be "
|
1248 |
"found as “public” in Logs."
|
1249 |
+
msgstr "機能を有効にする事なくリクエストの検証をシミュレートします。結果はログで確認する事が出来ます。"
|
|
|
|
|
1250 |
|
1251 |
+
#: admin/includes/tab-settings.php:1058
|
1252 |
msgid "Simulation mode"
|
1253 |
msgstr "シミュレーション・モード"
|
1254 |
|
1255 |
+
#: admin/includes/tab-settings.php:1076
|
1256 |
msgid "Privacy and record settings"
|
1257 |
msgstr "プライバシーと記録の設定"
|
1258 |
|
1259 |
+
#: admin/includes/tab-settings.php:1099
|
1260 |
msgid ""
|
1261 |
"<dfn title=\"This option restricts not to send IP address to the external "
|
1262 |
"Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
|
1263 |
msgstr ""
|
1264 |
+
"<dfn title=\"このオプションは、IPアドレスを外部の位置情報APIへ送信することを制限します。\">外部APIへの"
|
1265 |
+
"送信を制限する</dfn>"
|
1266 |
|
1267 |
+
#: admin/includes/tab-settings.php:1114
|
1268 |
msgid ""
|
1269 |
"<dfn title=\"This option enables to record the number blocked countries and "
|
1270 |
+
"the number of blocked requests per day.\">Record “Statistics of "
|
1271 |
+
"validation”</dfn>"
|
1272 |
msgstr ""
|
1273 |
+
"<dfn title=\"このオプションは、国別遮断数や1日あたりの遮断数など、統計の記録を有効にします。\">検証の統"
|
1274 |
+
"計を記録</dfn>"
|
1275 |
|
1276 |
+
#: admin/includes/tab-settings.php:1129
|
1277 |
msgid "Maximum period for “Statistics” [days]"
|
1278 |
msgstr "記録する統計の最大期間[日]"
|
1279 |
|
1280 |
+
#: admin/includes/tab-settings.php:1147
|
1281 |
msgid ""
|
1282 |
"<dfn title=\"This option enables to record the IP address, country code and "
|
1283 |
"failure counter of login attempts into the cache on database to minimize the "
|
1284 |
+
"impact on site speed.\">Record “IP address cache”</dfn>"
|
1285 |
msgstr ""
|
1286 |
+
"<dfn title=\"このオプションは、IPアドレス、国コード、ログイン失敗回数等のキャッシュへの記録を有効にし、"
|
1287 |
+
"サイト速度への影響を最小化します。\">IPアドレスをキャッシュに記録</dfn>"
|
|
|
1288 |
|
1289 |
+
#: admin/includes/tab-settings.php:1162
|
1290 |
msgid ""
|
1291 |
"<dfn title=\"If user authentication fails consecutively beyond “Max "
|
1292 |
"number of failed login attempts per IP address”, subsequent login will "
|
1293 |
"also be prohibited for this period.\">Expiration time [sec] for each entry</"
|
1294 |
"dfn>"
|
1295 |
msgstr ""
|
1296 |
+
"<dfn title=\"ユーザ認証が連続%d回失敗した場合も、以降のログインがこの期間だけ(ガベージコレクション周期"
|
1297 |
+
"を含む)禁止されます。\">各エントリーの有効期間 [秒]</dfn>"
|
|
|
1298 |
|
1299 |
+
#: admin/includes/tab-settings.php:1178
|
1300 |
msgid ""
|
1301 |
"<dfn title=\"This option enables to record the validation logs including IP "
|
1302 |
+
"addresses.\">Record “Validation logs”</dfn>"
|
1303 |
msgstr ""
|
1304 |
+
"<dfn title=\"このオプションは、IPアドレスを含む検証ログの記録を有効にします。\">検証のログを記録</dfn>"
|
|
|
1305 |
|
1306 |
+
#: admin/includes/tab-settings.php:1190
|
1307 |
msgid "When blocked"
|
1308 |
msgstr "遮断時に記録"
|
1309 |
|
1310 |
+
#: admin/includes/tab-settings.php:1191
|
1311 |
msgid "When passed"
|
1312 |
msgstr "通過時に記録"
|
1313 |
|
1314 |
+
#: admin/includes/tab-settings.php:1192
|
1315 |
msgid "When “blocked” or “passed (not in whitelist)”"
|
1316 |
msgstr "遮断時または遮断対象国の通過時に記録"
|
1317 |
|
1318 |
+
#: admin/includes/tab-settings.php:1193
|
1319 |
msgid "Unauthenticated visitor"
|
1320 |
msgstr "未認証の訪問者を記録"
|
1321 |
|
1322 |
+
#: admin/includes/tab-settings.php:1194
|
1323 |
msgid "Authenticated user"
|
1324 |
msgstr "認証済のユーザーを記録"
|
1325 |
|
1326 |
+
#: admin/includes/tab-settings.php:1195
|
1327 |
msgid "All the validation"
|
1328 |
msgstr "すべての検証を記録"
|
1329 |
|
1330 |
+
#: admin/includes/tab-settings.php:1203
|
1331 |
#, php-format
|
1332 |
msgid ""
|
1333 |
"<dfn title=\"The maximum number of entries in the logs is also limited to %d."
|
1334 |
"\">Expiration time [days] for each entry</dfn>"
|
1335 |
+
msgstr "<dfn title=\"ログの最大エントリー数は %d に制限されます。\">各エントリーの有効期間[日]</dfn>"
|
|
|
|
|
1336 |
|
1337 |
+
#: admin/includes/tab-settings.php:1220
|
1338 |
msgid ""
|
1339 |
"<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
|
1340 |
"with value</dfn>"
|
1341 |
+
msgstr "<dfn title=\"例)action, comment, log, pwd, FILES\">内容を展開する$_POSTのキー</dfn>"
|
|
|
|
|
1342 |
|
1343 |
+
#: admin/includes/tab-settings.php:1239
|
1344 |
+
msgid "Maximum entries in “Logs”"
|
1345 |
msgstr "記録するログの最大エントリ数"
|
1346 |
|
1347 |
+
#: admin/includes/tab-settings.php:1256
|
1348 |
msgid ""
|
1349 |
"<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
|
1350 |
"“Live update”</dfn>"
|
1351 |
msgstr ""
|
1352 |
+
"<dfn title=\"SQLiteデータベース・ソースを選択します。\">ライブアップデート用SQLiteデータベース・ソース"
|
1353 |
+
"の選択</dfn>"
|
1354 |
|
1355 |
+
#: admin/includes/tab-settings.php:1269
|
1356 |
msgid "Ordinary file"
|
1357 |
msgstr "通常のファイル"
|
1358 |
|
1359 |
+
#: admin/includes/tab-settings.php:1270
|
1360 |
msgid "In-Memory"
|
1361 |
msgstr "イン・メモリ"
|
1362 |
|
1363 |
+
#: admin/includes/tab-settings.php:1273
|
1364 |
msgid "PDO_SQLITE driver not available"
|
1365 |
+
msgstr "PDO_SQLITEドライバが利用出来ません"
|
1366 |
|
1367 |
+
#: admin/includes/tab-settings.php:1274
|
1368 |
msgid ""
|
1369 |
"It takes a few tens of milliseconds as overhead. It can be safely used "
|
1370 |
"without conflict with other plugins."
|
1371 |
+
msgstr "数十ミリ秒のオーバーヘッドが生じますが、他のプラグインと競合することなく、安全に使用できます。"
|
|
|
|
|
1372 |
|
1373 |
+
#: admin/includes/tab-settings.php:1275
|
1374 |
msgid ""
|
1375 |
"It takes a few milliseconds as overhead. There is a possibility of conflict "
|
1376 |
"with other plugins using this method."
|
1377 |
+
msgstr "数ミリ秒のオーバーヘッドが生じます。同手法を用いている他のプラグインと競合する可能性があります。"
|
|
|
|
|
1378 |
|
1379 |
+
#: admin/includes/tab-settings.php:1283
|
1380 |
msgid "Reset database source of “Live update”"
|
1381 |
msgstr "ライブアップデートのデータソースをリセットする"
|
1382 |
|
1383 |
+
#: admin/includes/tab-settings.php:1291
|
1384 |
msgid "Reset now"
|
1385 |
msgstr "今すぐリセット"
|
1386 |
|
1387 |
+
#: admin/includes/tab-settings.php:1300 admin/includes/tab-settings.php:1427
|
1388 |
msgid ""
|
1389 |
"Task could not be found in WP-Cron. Please try to deactivate this plugin "
|
1390 |
"once and activate again."
|
1391 |
msgstr ""
|
1392 |
+
"WP-Cronのタスクが見つかりません。 一旦このプラグインを停止させた後、再度、有効化してみてください。"
|
|
|
1393 |
|
1394 |
+
#: admin/includes/tab-settings.php:1305
|
1395 |
msgid ""
|
1396 |
"<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
|
1397 |
+
"expired entries in “IP address cache” and “Logs”."
|
1398 |
"\">Interval [sec] to cleanup expired entries of IP address</dfn>"
|
1399 |
msgstr ""
|
1400 |
+
"<dfn title=\"このオプションは、有効期限の切れたIPアドレスのエントリーを削除するWP-Cronイベントの起動周"
|
1401 |
+
"期を設定します。\">ガベージコレクション周期[秒]</dfn>"
|
|
|
1402 |
|
1403 |
+
#: admin/includes/tab-settings.php:1314 admin/includes/tab-settings.php:1443
|
1404 |
#, php-format
|
1405 |
msgid "Next schedule: %s"
|
1406 |
msgstr "次回日時:%s"
|
1407 |
|
1408 |
+
#: admin/includes/tab-settings.php:1321
|
1409 |
msgid "Remove all settings and records at uninstallation"
|
1410 |
msgstr "アンインストール時に設定と記録を全て削除"
|
1411 |
|
1412 |
+
#: admin/includes/tab-settings.php:1338
|
1413 |
msgid "Geolocation API settings"
|
1414 |
msgstr "位置情報APIの設定"
|
1415 |
|
1416 |
+
#: admin/includes/tab-settings.php:1358
|
1417 |
msgid ""
|
1418 |
+
"<dfn title=\"IP address cache and local databases are scanned at the top "
|
1419 |
"priority.\">API selection and key settings</dfn>"
|
1420 |
msgstr ""
|
1421 |
+
"<dfn title=\"IPアドレスのキャッシュとローカルのデータベースが最優先で検索されます。\">APIの選択とキーの"
|
1422 |
+
"設定</dfn>"
|
1423 |
|
1424 |
+
#: admin/includes/tab-settings.php:1377
|
1425 |
msgid "Timeout for network API [sec]"
|
1426 |
msgstr "ネットワークAPIのタイムアウト[秒]"
|
1427 |
|
1428 |
+
#: admin/includes/tab-settings.php:1395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1429 |
msgid "Local database settings"
|
1430 |
msgstr "ローカル・データベースの設定"
|
1431 |
|
1432 |
+
#: admin/includes/tab-settings.php:1409
|
1433 |
msgid "database"
|
1434 |
msgstr "ファイル"
|
1435 |
|
1436 |
+
#: admin/includes/tab-settings.php:1410 classes/class-ip-geo-block-cron.php:418
|
1437 |
#, php-format
|
1438 |
msgid "Last update: %s"
|
1439 |
msgstr "最終更新:%s"
|
1440 |
|
1441 |
+
#: admin/includes/tab-settings.php:1432
|
1442 |
msgid "Auto updating (once a month)"
|
1443 |
msgstr "自動更新(月1回)"
|
1444 |
|
1445 |
+
#: admin/includes/tab-settings.php:1450
|
1446 |
msgid "Download database"
|
1447 |
msgstr "データベースのダウンロード"
|
1448 |
|
1449 |
+
#: admin/includes/tab-settings.php:1458
|
1450 |
msgid "Download now"
|
1451 |
msgstr "今すぐダウンロード"
|
1452 |
|
1453 |
+
#: admin/includes/tab-settings.php:1469
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1454 |
msgid "Plugin settings"
|
1455 |
msgstr "プラグインの設定"
|
1456 |
|
1457 |
+
#: admin/includes/tab-settings.php:1481
|
1458 |
msgid ""
|
1459 |
"<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
|
1460 |
"settings</dfn>"
|
1461 |
+
msgstr "<dfn title=\"全ての設定をネットワーク全体で同期させます。\">ネットワーク内で設定を同期</dfn>"
|
|
|
|
|
1462 |
|
1463 |
+
#: admin/includes/tab-settings.php:1499
|
1464 |
msgid ""
|
1465 |
+
"<dfn title=\"You can access to the login form with a specific key at "
|
1466 |
+
"emergency. Please add the generated link to favorites / bookmarks in your "
|
1467 |
+
"browser as this plugin does not keep the key itself.\">Emergency login link</"
|
1468 |
"dfn>"
|
1469 |
msgstr ""
|
1470 |
+
"<dfn title=\"緊急時にもログイン可能なリンクを生成します。キー自体は保存されないので、生成したリンクをブ"
|
1471 |
+
"ラウザのお気に入り/ブックマークに追加してください。\">緊急時用ログイン・リンク</dfn>"
|
1472 |
|
1473 |
+
#: admin/includes/tab-settings.php:1515
|
1474 |
+
msgid ""
|
1475 |
+
"<dfn title=\"Valid key for Google Maps JavaScript API. A free tier has limit "
|
1476 |
+
"even if it's “default”. Maps Embed API without key can be "
|
1477 |
+
"available in case of empty.\">Google Maps API key</dfn>"
|
1478 |
+
msgstr ""
|
1479 |
+
"<dfn title=\"Google Maps JavaScript API の有効なキー。「default」であっても一定の使用制限があります。空"
|
1480 |
+
"欄にするとキーなしの Maps Embed API が使用可能です。\">Google Maps API キー</dfn>"
|
1481 |
+
|
1482 |
+
#: admin/includes/tab-settings.php:1531
|
1483 |
msgid "Export / Import settings"
|
1484 |
msgstr "設定のエクスポート、インポート"
|
1485 |
|
1486 |
+
#: admin/includes/tab-settings.php:1538
|
1487 |
msgid "Export settings"
|
1488 |
msgstr "エクスポート"
|
1489 |
|
1490 |
+
#: admin/includes/tab-settings.php:1539
|
1491 |
msgid "Import from the local file"
|
1492 |
msgstr "ローカル・ファイルからインポートします"
|
1493 |
|
1494 |
+
#: admin/includes/tab-settings.php:1539
|
1495 |
msgid "Import settings"
|
1496 |
msgstr "インポート"
|
1497 |
|
1498 |
+
#: admin/includes/tab-settings.php:1547
|
1499 |
msgid "Import pre-defined settings"
|
1500 |
msgstr "プリセットのインポート"
|
1501 |
|
1502 |
+
#: admin/includes/tab-settings.php:1554
|
1503 |
msgid ""
|
1504 |
"Import the default settings to revert to the “Right after "
|
1505 |
"installing” state"
|
1506 |
msgstr "インストール直後の状態に戻すための設定値をインポートします"
|
1507 |
|
1508 |
+
#: admin/includes/tab-settings.php:1554
|
1509 |
msgid "Default settings"
|
1510 |
msgstr "初期設定"
|
1511 |
|
1512 |
+
#: admin/includes/tab-settings.php:1555
|
1513 |
msgid ""
|
1514 |
"Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
|
1515 |
"for the “Back-end target settings”"
|
1516 |
+
msgstr "「ゼロデイ攻撃の遮断」など、主に[バックエンドの設定]の推奨設定をインポートします"
|
|
|
|
|
1517 |
|
1518 |
+
#: admin/includes/tab-settings.php:1555
|
1519 |
msgid "Best for Back-end"
|
1520 |
msgstr "バックエンドの推奨設定"
|
1521 |
|
1522 |
+
#: admin/includes/tab-settings.php:1564
|
1523 |
+
msgid "DB tables for this plugin"
|
1524 |
+
msgstr "このプラグイン用データベース・テーブル"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1525 |
|
1526 |
+
#: admin/includes/tab-settings.php:1572
|
1527 |
+
msgid "Initialize now"
|
1528 |
+
msgstr "今すぐ初期化"
|
1529 |
|
1530 |
+
#: admin/includes/tab-settings.php:1581
|
1531 |
msgid ""
|
1532 |
"<dfn title=\"When you have some unexpected blocking experiences, please "
|
1533 |
"press the button to find the blocked requests at the end of dumped "
|
1534 |
"information which may help you to solve the issues.\">Diagnostic "
|
1535 |
"information</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
|
1536 |
+
"support/plugin/ip-geo-block\" title=\"[IP Geo Block] Support | WordPress.org"
|
1537 |
+
"\">support forum</a> ]"
|
1538 |
msgstr ""
|
1539 |
+
"<dfn title=\"予期しない遮断が発生した場合は、ダンプされた診断情報を元にリクエストの遮断理由を推定し、問"
|
1540 |
+
"題解決に役立ててください。\">診断情報</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
|
1541 |
+
"support/plugin/ip-geo-block\" title=\"[IP Geo Block] Support | WordPress.org\">サポート・フォーラム</"
|
1542 |
+
"a> ]"
|
|
|
1543 |
|
1544 |
+
#: admin/includes/tab-settings.php:1588
|
1545 |
+
msgid "Please copy & paste when submitting your issue to support forum"
|
1546 |
+
msgstr "フォーラムに問題を投稿する際、コピーして張り付けてください"
|
1547 |
|
1548 |
+
#: admin/includes/tab-settings.php:1588
|
1549 |
msgid "Show information"
|
1550 |
msgstr "情報を表示"
|
1551 |
|
1552 |
+
#: admin/includes/tab-settings.php:1605
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1553 |
msgid ""
|
1554 |
"While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
|
1555 |
"others will pass an IP address to the 3rd parties' API via HTTP."
|
1556 |
msgstr ""
|
1557 |
+
"MaxmindとIP2Locationはローカルのデータベースを検索しますが、他はHTTPを介して外部のAPIにIPアドレスを渡し"
|
1558 |
+
"ます。"
|
1559 |
|
1560 |
+
#: admin/includes/tab-settings.php:1606
|
1561 |
msgid ""
|
1562 |
"Please select the appropriate APIs to fit the privacy law / regulation in "
|
1563 |
"your country / region."
|
1564 |
+
msgstr "あなたの国/地域におけるプライバシー保護の法規・条例に適合するよう、適切なAPIを選択して下さい。"
|
|
|
|
|
1565 |
|
1566 |
+
#: admin/includes/tab-settings.php:1615
|
1567 |
#, php-format
|
1568 |
msgid ""
|
1569 |
"Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
|
1570 |
"2.0.0+%s."
|
1571 |
msgstr ""
|
1572 |
+
"Maxmind GeoLite2 データベースと API には、PHP バージョン 5.4.0 以上と %sPECL phar 2.0.0 以上%sが必要で"
|
1573 |
+
"す。"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1574 |
|
1575 |
#: admin/includes/tab-statistics.php:19
|
1576 |
msgid "Statistics of validation"
|
1577 |
msgstr "検証の統計"
|
1578 |
|
1579 |
+
#: admin/includes/tab-statistics.php:32
|
1580 |
msgid "Blocked"
|
1581 |
msgstr "全遮断数"
|
1582 |
|
1583 |
+
#: admin/includes/tab-statistics.php:56
|
1584 |
msgid "Blocked by countries"
|
1585 |
msgstr "国別遮断数"
|
1586 |
|
1587 |
+
#: admin/includes/tab-statistics.php:96
|
1588 |
msgid "Blocked per day"
|
1589 |
msgstr "1日あたりの遮断数"
|
1590 |
|
1591 |
+
#: admin/includes/tab-statistics.php:111
|
1592 |
msgid "Blocked by type of IP address"
|
1593 |
msgstr "遮断したIPアドレスのタイプ"
|
1594 |
|
1595 |
+
#: admin/includes/tab-statistics.php:128
|
1596 |
msgid "Name of API"
|
1597 |
+
msgstr "Name of API"
|
1598 |
|
1599 |
+
#: admin/includes/tab-statistics.php:129
|
1600 |
msgid "Call"
|
1601 |
msgstr "リクエスト回数"
|
1602 |
|
1603 |
+
#: admin/includes/tab-statistics.php:130
|
1604 |
msgid "Response [msec]"
|
1605 |
msgstr "応答時間 [msec]"
|
1606 |
|
1607 |
+
#: admin/includes/tab-statistics.php:144
|
1608 |
msgid "Average response time of each API"
|
1609 |
msgstr "API毎の平均応答時間"
|
1610 |
|
1611 |
+
#: admin/includes/tab-statistics.php:159
|
1612 |
msgid "Clear statistics"
|
1613 |
msgstr "統計のクリア"
|
1614 |
|
1615 |
+
#: admin/includes/tab-statistics.php:179
|
1616 |
+
msgid "Statistics in validation logs"
|
1617 |
msgstr "ログの統計"
|
1618 |
|
1619 |
+
#: admin/includes/tab-statistics.php:210
|
1620 |
+
msgid "Statistics in IP address cache"
|
1621 |
msgstr "キャッシュの統計"
|
1622 |
|
1623 |
+
#: admin/includes/tab-statistics.php:222
|
1624 |
msgid "Search in cache"
|
1625 |
msgstr "キャッシュを検索"
|
1626 |
|
1627 |
+
#: admin/includes/tab-statistics.php:261
|
1628 |
msgid "Clear cache"
|
1629 |
msgstr "キャッシュのクリア"
|
1630 |
|
1631 |
+
#: admin/includes/tab-statistics.php:277
|
1632 |
msgid "Export cache"
|
1633 |
msgstr "キャッシュをエクスポート"
|
1634 |
|
1635 |
+
#: admin/includes/tab-statistics.php:300
|
1636 |
msgid "Country (Top 10)"
|
1637 |
msgstr "国(トップ10)"
|
1638 |
|
1639 |
+
#: admin/includes/tab-statistics.php:301
|
1640 |
msgid "AS number (Top 10)"
|
1641 |
msgstr "AS番号(トップ10)"
|
1642 |
|
1643 |
+
#: admin/includes/tab-statistics.php:302
|
1644 |
msgid "IP address (Top 10)"
|
1645 |
msgstr "IPアドレス(トップ10)"
|
1646 |
|
1647 |
+
#: admin/includes/tab-statistics.php:303
|
1648 |
msgid "Slug in back-end"
|
1649 |
msgstr "バックエンドのスラッグ"
|
1650 |
|
1651 |
+
#: admin/includes/tab-statistics.php:355
|
1652 |
msgid "Toggle sorting order"
|
1653 |
msgstr "ソート順を切り替え"
|
1654 |
|
1655 |
+
#: admin/includes/tab-statistics.php:406
|
1656 |
#, php-format
|
1657 |
+
msgid "[ %sRecord “Statistics of validation”%s ] is disabled."
|
1658 |
msgstr "[%s検証の統計を記録%s]が無効です。"
|
1659 |
|
1660 |
+
#: admin/includes/tab-statistics.php:407
|
1661 |
msgid ""
|
1662 |
"Please set the proper condition to record and analyze the validation "
|
1663 |
"statistics."
|
1664 |
msgstr "検証の統計を記録し分析するためには、適切な条件を設定して下さい。"
|
1665 |
|
1666 |
+
#: admin/includes/tab-statistics.php:420
|
1667 |
#, php-format
|
1668 |
+
msgid "[ %sRecord “IP address cache”%s ] is disabled."
|
1669 |
msgstr "[%sIPアドレスをキャッシュに記録%s]が無効です。"
|
1670 |
|
1671 |
+
#: admin/includes/tab-statistics.php:421
|
1672 |
msgid "Please set the proper condition to record IP address in cache."
|
1673 |
+
msgstr "キャッシュを利用しサイトの応答性を上げるためには、適切な条件を設定して下さい。"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1674 |
|
1675 |
+
#: classes/class-ip-geo-block-cron.php:221
|
1676 |
#, php-format
|
1677 |
msgid "Can't lock <code>%s</code>. Please try again after a while."
|
1678 |
+
msgstr "<code>%s</code> をロック出来ません。パーミッションをチェックして下さい。"
|
|
|
1679 |
|
1680 |
+
#: classes/class-ip-geo-block-cron.php:300
|
1681 |
msgid "Your database file is up-to-date."
|
1682 |
msgstr "データベース・ファイルは最新です。"
|
1683 |
|
1684 |
+
#: classes/class-ip-geo-block-cron.php:399
|
1685 |
msgid "gz or zip is not supported on your system."
|
1686 |
msgstr "gz または zip がサポートされていません。"
|
1687 |
|
1693 |
"Editing_wp-config.php#WordPress_Upgrade_Constants\" title=\"Editing wp-"
|
1694 |
"config.php « WordPress Codex\">this document</a> for more details."
|
1695 |
msgstr ""
|
1696 |
+
"本プラグインは、メソッド「%s」による FTP あるいは SSH を使ったファイル操作をサポートしていません。詳し"
|
1697 |
+
"くは、<a href=\"https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants\" title="
|
1698 |
+
"\"Editing wp-config.php « WordPress Codex\">このドキュメント</a>を参照してください。"
|
|
|
1699 |
|
1700 |
#: classes/class-ip-geo-block-file.php:68
|
1701 |
msgid ""
|
1705 |
"\"Editing wp-config.php « WordPress Codex\">this document</a> for more "
|
1706 |
"details."
|
1707 |
msgstr ""
|
1708 |
+
"本プラグイン FTP あるいは SSH を使ったファイル操作を有効にするためには、<code>wp-config.php</code> に幾"
|
1709 |
+
"つかの定義が必要です。詳しくは、<a href=\"https://codex.wordpress.org/Editing_wp-config."
|
1710 |
+
"php#WordPress_Upgrade_Constants\" title=\"Editing wp-config.php « WordPress Codex\">このドキュメ"
|
1711 |
+
"ント</a>を参照してください。"
|
|
|
1712 |
|
1713 |
+
#: classes/class-ip-geo-block-logs.php:236
|
1714 |
#, php-format
|
1715 |
msgid ""
|
1716 |
"Creating a DB table %s had failed. Once de-activate this plugin, and then "
|
1717 |
"activate again."
|
1718 |
+
msgstr "%s 用のテーブルが作成されていません。一旦このプラグインを無効化し、再度有効化して下さい。"
|
|
|
|
|
1719 |
|
1720 |
+
#: classes/class-ip-geo-block-logs.php:241
|
1721 |
#, php-format
|
1722 |
msgid ""
|
1723 |
"Column type in %s unmatched. Once de-activate this plugin, and then activate "
|
1724 |
"again."
|
1725 |
+
msgstr "%s 用のカラム型が一致しません。一旦このプラグインを無効化し、再度有効化して下さい。"
|
|
|
|
|
1726 |
|
1727 |
+
#: classes/class-ip-geo-block.php:417
|
1728 |
msgid "Dashboard"
|
1729 |
msgstr "ダッシュボード"
|
1730 |
|
1734 |
msgid "Database file does not exist."
|
1735 |
msgstr "データベース・ファイルが見つかりません。"
|
1736 |
|
1737 |
+
#: wp-content/mu-plugins/ip-geo-block-mu.php:72
|
1738 |
#, php-format
|
1739 |
msgid ""
|
1740 |
"Can't find IP Geo Block in your plugins directory. Please remove <code>%s</"
|
1741 |
"code> or re-install %s."
|
1742 |
msgstr ""
|
1743 |
+
"プラグイン・ディレクトリにIP Geo Blockが見つかりません。<code>%s</code>を削除するか、%sを再インストール"
|
1744 |
+
"してください。"
|
languages/ip-geo-block.mo
CHANGED
Binary file
|
languages/ip-geo-block.po
CHANGED
@@ -2,15 +2,15 @@
|
|
2 |
# This file is distributed under the same license as the IP Geo Block package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: IP Geo Block 3.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
|
7 |
-
"POT-Creation-Date: 2018-
|
8 |
-
"PO-Revision-Date: 2018-
|
9 |
"Language-Team: \n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Generator: Poedit 2.
|
14 |
"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
|
15 |
"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
@@ -26,169 +26,198 @@ msgid ""
|
|
26 |
"posted from outside your nation, and also prevents zero-day exploit."
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: admin/class-ip-geo-block-admin.php:
|
30 |
-
msgid "
|
31 |
-
msgstr ""
|
32 |
-
|
33 |
-
#: admin/class-ip-geo-block-admin.php:287
|
34 |
-
msgid "Create table ?"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: admin/class-ip-geo-block-admin.php:
|
38 |
-
|
|
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: admin/class-ip-geo-block-admin.php:
|
42 |
-
msgid "
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: admin/class-ip-geo-block-admin.php:
|
46 |
-
msgid "
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: admin/class-ip-geo-block-admin.php:
|
50 |
-
msgid "
|
|
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: admin/class-ip-geo-block-admin.php:
|
54 |
msgid "ajax for logged-in user"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: admin/class-ip-geo-block-admin.php:
|
58 |
msgid "ajax for non logged-in user"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: admin/class-ip-geo-block-admin.php:
|
62 |
#, php-format
|
63 |
msgid "[Found: %d]"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: admin/class-ip-geo-block-admin.php:
|
67 |
#, php-format
|
68 |
msgid "Find and verify `%s` on “Logs” tab."
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: admin/class-ip-geo-block-admin.php:
|
72 |
msgid "This feature is available with HTML5 compliant browsers."
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: admin/class-ip-geo-block-admin.php:
|
76 |
-
msgid "The selected row cannot be found in the
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: admin/class-ip-geo-block-admin.php:
|
80 |
-
#: admin/class-ip-geo-block-admin.php:
|
81 |
#, php-format
|
82 |
msgid "An error occurred while executing the ajax command `%s`."
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: admin/class-ip-geo-block-admin.php:
|
86 |
msgid "No data available in table"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: admin/class-ip-geo-block-admin.php:
|
90 |
msgid "No matching records found"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: admin/class-ip-geo-block-admin.php:
|
94 |
-
#: admin/includes/class-admin-ajax.php:
|
95 |
-
#: admin/includes/class-admin-ajax.php:
|
96 |
-
#: admin/includes/tab-geolocation.php:
|
97 |
msgid "IP address"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: admin/class-ip-geo-block-admin.php:
|
101 |
-
#: admin/includes/class-admin-ajax.php:
|
102 |
-
#: admin/includes/class-admin-ajax.php:
|
103 |
msgid "Code"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: admin/class-ip-geo-block-admin.php:
|
107 |
-
#: admin/includes/class-admin-ajax.php:
|
108 |
-
#: admin/includes/class-admin-ajax.php:
|
109 |
msgid "ASN"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: admin/class-ip-geo-block-admin.php:
|
113 |
-
#: admin/includes/class-admin-ajax.php:
|
114 |
msgid "Host name"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: admin/class-ip-geo-block-admin.php:
|
118 |
-
#: admin/includes/class-admin-ajax.php:
|
119 |
-
#: admin/includes/class-admin-ajax.php:
|
120 |
msgid "Target"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: admin/class-ip-geo-block-admin.php:
|
124 |
-
#: admin/includes/class-admin-ajax.php:
|
125 |
msgid "Failure / Total"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: admin/class-ip-geo-block-admin.php:
|
129 |
-
#: admin/includes/class-admin-ajax.php:
|
130 |
msgid "Elapsed[sec]"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: admin/class-ip-geo-block-admin.php:
|
134 |
-
#: admin/includes/class-admin-ajax.php:
|
135 |
msgid "Time"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: admin/class-ip-geo-block-admin.php:
|
139 |
-
#: admin/includes/class-admin-ajax.php:
|
140 |
msgid "Result"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: admin/class-ip-geo-block-admin.php:
|
144 |
-
#: admin/includes/class-admin-ajax.php:
|
145 |
msgid "Request"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: admin/class-ip-geo-block-admin.php:
|
149 |
-
#: admin/includes/class-admin-ajax.php:
|
150 |
msgid "User agent"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: admin/class-ip-geo-block-admin.php:
|
154 |
-
#: admin/includes/class-admin-ajax.php:
|
155 |
msgid "HTTP headers"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: admin/class-ip-geo-block-admin.php:
|
159 |
-
#: admin/includes/class-admin-ajax.php:
|
160 |
msgid "$_POST data"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: admin/class-ip-geo-block-admin.php:
|
164 |
msgid "Contribute on GitHub"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: admin/class-ip-geo-block-admin.php:
|
168 |
-
#: admin/class-ip-geo-block-admin.php:
|
169 |
-
#: admin/class-ip-geo-block-admin.php:
|
170 |
msgid "Settings"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: admin/class-ip-geo-block-admin.php:
|
174 |
-
#: admin/class-ip-geo-block-admin.php:
|
175 |
-
#: admin/class-ip-geo-block-admin.php:
|
176 |
-
#: admin/class-ip-geo-block-admin.php:
|
177 |
-
#: admin/class-ip-geo-block-admin.php:
|
178 |
-
#: admin/class-ip-geo-block-admin.php:
|
179 |
msgid "IP Geo Block"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: admin/class-ip-geo-block-admin.php:
|
183 |
-
#: admin/class-ip-geo-block-admin.php:
|
184 |
msgid "Site List"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: admin/class-ip-geo-block-admin.php:
|
188 |
msgid "You need WordPress 3.7+."
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: admin/class-ip-geo-block-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
#, php-format
|
193 |
msgid ""
|
194 |
"Now downloading geolocation databases in background. After a little while, "
|
@@ -196,48 +225,49 @@ msgid ""
|
|
196 |
"strong>” at <a href=\"%s\">Validation rule settings</a>."
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: admin/class-ip-geo-block-admin.php:
|
200 |
#, php-format
|
201 |
msgid ""
|
202 |
"The “<strong>Matching rule</strong>” is not set properly. Please "
|
203 |
"confirm it at <a href=\"%s\">Validation rule settings</a>."
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: admin/class-ip-geo-block-admin.php:
|
207 |
msgid "Local database and matching rule have been updated."
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: admin/class-ip-geo-block-admin.php:
|
211 |
msgid ""
|
212 |
"Once you logout, you will be unable to login again because the number of "
|
213 |
"login attempts reaches the limit."
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: admin/class-ip-geo-block-admin.php:
|
217 |
#, php-format
|
218 |
msgid ""
|
219 |
-
"Please
|
220 |
-
"tab
|
|
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: admin/class-ip-geo-block-admin.php:
|
224 |
msgid ""
|
225 |
"Once you logout, you will be unable to login again because your country code "
|
226 |
"or IP address is in the blacklist."
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: admin/class-ip-geo-block-admin.php:
|
230 |
msgid ""
|
231 |
"Once you logout, you will be unable to login again because your country code "
|
232 |
"or IP address is not in the whitelist."
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: admin/class-ip-geo-block-admin.php:
|
236 |
#, php-format
|
237 |
msgid "Please check your “%sValidation rule settings%s”."
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: admin/class-ip-geo-block-admin.php:
|
241 |
#, php-format
|
242 |
msgid ""
|
243 |
"Please confirm your local geolocation databases at “%sLocal database "
|
@@ -245,120 +275,121 @@ msgid ""
|
|
245 |
"%sStatistics in cache%s” section."
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: admin/class-ip-geo-block-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
msgid ""
|
250 |
"“mu-plugins” (ip-geo-block-mu.php) at “Validation "
|
251 |
"timing” is imcompatible with <strong>IP Geo Allow</strong>. Please "
|
252 |
"select “init” action hook."
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: admin/class-ip-geo-block-admin.php:
|
256 |
msgid "Statistics"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: admin/class-ip-geo-block-admin.php:
|
260 |
msgid "Logs"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: admin/class-ip-geo-block-admin.php:
|
264 |
msgid "Search"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: admin/class-ip-geo-block-admin.php:
|
268 |
msgid "Attribution"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: admin/class-ip-geo-block-admin.php:
|
272 |
-
#: admin/class-ip-geo-block-admin.php:
|
273 |
msgid "Network wide"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: admin/class-ip-geo-block-admin.php:
|
277 |
msgid "Toggle all"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: admin/class-ip-geo-block-admin.php:
|
281 |
msgid ""
|
282 |
"Independent of “Privacy and record settings”, you can see all "
|
283 |
"the requests validated by this plugin in almost real time."
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: admin/class-ip-geo-block-admin.php:
|
287 |
msgid "Live update"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: admin/class-ip-geo-block-admin.php:
|
291 |
msgid "Open a new window on clicking the link in the chart."
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: admin/class-ip-geo-block-admin.php:
|
295 |
-
msgid "Open a new window"
|
296 |
-
msgstr ""
|
297 |
-
|
298 |
-
#: admin/class-ip-geo-block-admin.php:773
|
299 |
msgid "Thanks for providing these great services for free."
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: admin/class-ip-geo-block-admin.php:
|
303 |
msgid ""
|
304 |
-
"(Most browsers will redirect you to each site <a href=\"
|
305 |
"ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
|
306 |
"when you click the link</a>.)"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: admin/class-ip-geo-block-admin.php:
|
310 |
msgid "Back to top"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: admin/class-ip-geo-block-admin.php:
|
314 |
msgid "Enable"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: admin/class-ip-geo-block-admin.php:
|
318 |
msgid "Select one"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: admin/class-ip-geo-block-admin.php:
|
322 |
msgid "You do not have sufficient permissions to access this page."
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: admin/class-ip-geo-block-admin.php:
|
326 |
#: admin/includes/class-admin-rewrite.php:194
|
327 |
-
#: classes/class-ip-geo-block-cron.php:
|
328 |
-
#: classes/class-ip-geo-block-cron.php:
|
329 |
-
#: classes/class-ip-geo-block-cron.php:
|
330 |
-
#: classes/class-ip-geo-block-opts.php:
|
331 |
#, php-format
|
332 |
msgid "Unable to write <code>%s</code>. Please check the permission."
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: admin/class-ip-geo-block-admin.php:
|
336 |
msgid "Settings saved."
|
337 |
msgstr ""
|
338 |
|
339 |
#: admin/includes/class-admin-ajax.php:72
|
|
|
|
|
340 |
msgid "n/a"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: admin/includes/class-admin-ajax.php:
|
344 |
-
#: admin/includes/tab-settings.php:95
|
345 |
-
msgid "UNKNOWN"
|
346 |
-
msgstr ""
|
347 |
-
|
348 |
-
#: admin/includes/class-admin-ajax.php:203
|
349 |
#, php-format
|
350 |
msgid "The user %s (user ID: %d) is in use."
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: admin/includes/class-admin-ajax.php:
|
354 |
#, php-format
|
355 |
msgid ""
|
356 |
"illegal format at %s. Please delete the corresponding line and try again."
|
357 |
msgstr ""
|
358 |
|
359 |
#: admin/includes/class-admin-rewrite.php:168
|
360 |
-
#: classes/class-ip-geo-block-cron.php:
|
361 |
-
#: classes/class-ip-geo-block-cron.php:
|
362 |
#, php-format
|
363 |
msgid "Unable to read <code>%s</code>. Please check the permission."
|
364 |
msgstr ""
|
@@ -378,32 +409,31 @@ msgstr ""
|
|
378 |
msgid "Validation logs"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:
|
382 |
-
#: admin/includes/tab-settings.php:1425
|
383 |
msgid "Help"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: admin/includes/tab-accesslog.php:
|
387 |
msgid "Comment post"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: admin/includes/tab-accesslog.php:
|
391 |
msgid "XML-RPC"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: admin/includes/tab-accesslog.php:
|
395 |
msgid "Login form"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: admin/includes/tab-accesslog.php:
|
399 |
msgid "Admin area"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: admin/includes/tab-accesslog.php:
|
403 |
msgid "Public facing pages"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: admin/includes/tab-accesslog.php:
|
407 |
msgid "All"
|
408 |
msgstr ""
|
409 |
|
@@ -411,101 +441,105 @@ msgstr ""
|
|
411 |
msgid "Select target"
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: admin/includes/tab-accesslog.php:
|
415 |
msgid "Search in logs"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: admin/includes/tab-accesslog.php:
|
419 |
msgid "Reset"
|
420 |
msgstr ""
|
421 |
|
422 |
-
#: admin/includes/tab-accesslog.php:
|
|
|
|
|
|
|
|
|
423 |
msgid "Bulk action"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: admin/includes/tab-accesslog.php:
|
427 |
msgid "Remove entries by IP address"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: admin/includes/tab-accesslog.php:
|
431 |
msgid "Add IP address to “Whitelist”"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: admin/includes/tab-accesslog.php:
|
435 |
msgid "Add IP address to “Blacklist”"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: admin/includes/tab-accesslog.php:
|
439 |
msgid "Add AS number to “Whitelist”"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#: admin/includes/tab-accesslog.php:
|
443 |
msgid "Add AS number to “Blacklist”"
|
444 |
msgstr ""
|
445 |
|
446 |
-
#: admin/includes/tab-accesslog.php:
|
447 |
-
#: admin/includes/tab-statistics.php:
|
448 |
msgid "Apply"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: admin/includes/tab-accesslog.php:
|
452 |
msgid "Clear logs"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: admin/includes/tab-accesslog.php:
|
456 |
-
#: admin/includes/tab-statistics.php:
|
457 |
msgid "Clear all"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: admin/includes/tab-accesslog.php:
|
461 |
msgid "Export logs"
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: admin/includes/tab-accesslog.php:
|
465 |
-
#: admin/includes/tab-statistics.php:
|
466 |
msgid "Export to the local file"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: admin/includes/tab-accesslog.php:
|
470 |
msgid "Export csv"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: admin/includes/tab-accesslog.php:
|
474 |
-
#: admin/includes/tab-statistics.php:
|
475 |
#, php-format
|
476 |
-
msgid "[ %sRecord “
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: admin/includes/tab-accesslog.php:
|
480 |
-
#: admin/includes/tab-statistics.php:
|
481 |
msgid ""
|
482 |
"Please set the proper condition to record and analyze the validation logs."
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: admin/includes/tab-attribution.php:
|
486 |
msgid "Attribution links"
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: admin/includes/tab-geolocation.php:
|
490 |
msgid "Search IP address geolocation"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: admin/includes/tab-geolocation.php:
|
494 |
msgid "Geolocation API"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: admin/includes/tab-geolocation.php:
|
498 |
msgid ""
|
499 |
"<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
|
500 |
"Moreover, this option replaces the end of IP address with “***” "
|
501 |
"to make it anonymous.\">Anonymize IP address</dfn>"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: admin/includes/tab-geolocation.php:
|
505 |
msgid "Search geolocation"
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: admin/includes/tab-geolocation.php:
|
509 |
msgid "Search now"
|
510 |
msgstr ""
|
511 |
|
@@ -521,66 +555,94 @@ msgstr ""
|
|
521 |
msgid "Columns"
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: admin/includes/tab-network.php:
|
525 |
msgid "Chart display layout"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: admin/includes/tab-network.php:
|
529 |
msgid "Latest 1 hour"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: admin/includes/tab-network.php:
|
533 |
msgid "Latest 24 hours"
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: admin/includes/tab-network.php:
|
537 |
msgid "Latest 1 week"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: admin/includes/tab-network.php:
|
541 |
msgid "Duration to retrieve"
|
542 |
msgstr ""
|
543 |
|
544 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
msgid "Validation rule settings"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: admin/includes/tab-settings.php:
|
549 |
msgid ""
|
550 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
551 |
"code by referring “Scan country code”.\">Your IP address / "
|
552 |
"Country</dfn>"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: admin/includes/tab-settings.php:
|
556 |
msgid "Scan all the APIs you selected at Geolocation API settings"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: admin/includes/tab-settings.php:
|
560 |
msgid "Scan country code"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: admin/includes/tab-settings.php:
|
564 |
msgid ""
|
565 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
566 |
"code by referring “Scan country code”.\">Server IP address / "
|
567 |
"Country</dfn>"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: admin/includes/tab-settings.php:
|
571 |
msgid "Whitelist"
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: admin/includes/tab-settings.php:
|
575 |
msgid "Blacklist"
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: admin/includes/tab-settings.php:
|
579 |
msgid ""
|
580 |
"Please select either “Whitelist” or “Blacklist”."
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: admin/includes/tab-settings.php:
|
584 |
msgid ""
|
585 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
586 |
"empty. The special code “XX” is assigned as private IP address "
|
@@ -590,7 +652,7 @@ msgid ""
|
|
590 |
"country code</dfn>"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: admin/includes/tab-settings.php:
|
594 |
msgid ""
|
595 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
596 |
"empty. The special code “XX” is assigned as private IP address "
|
@@ -600,76 +662,48 @@ msgid ""
|
|
600 |
"country code</dfn>"
|
601 |
msgstr ""
|
602 |
|
603 |
-
#: admin/includes/tab-settings.php:
|
604 |
-
msgid "(comma separated)"
|
605 |
-
msgstr ""
|
606 |
-
|
607 |
-
#: admin/includes/tab-settings.php:116
|
608 |
-
msgid "(comma or RET separated)"
|
609 |
-
msgstr ""
|
610 |
-
|
611 |
-
#: admin/includes/tab-settings.php:117
|
612 |
-
msgid "Toggle selection"
|
613 |
-
msgstr ""
|
614 |
-
|
615 |
-
#: admin/includes/tab-settings.php:118
|
616 |
-
msgid "Find blocked requests in “Logs“"
|
617 |
-
msgstr ""
|
618 |
-
|
619 |
-
#: admin/includes/tab-settings.php:119
|
620 |
-
msgid ""
|
621 |
-
"Before adding as “Exception”, please click on “<a class="
|
622 |
-
"\"ip-geo-block-icon ip-geo-block-icon-alert\" title=\"This button is just a "
|
623 |
-
"sample.\"><span></span></a>” button (if exists) attached to the "
|
624 |
-
"following list to confirm that the blocked request is not malicious."
|
625 |
-
msgstr ""
|
626 |
-
|
627 |
-
#: admin/includes/tab-settings.php:120
|
628 |
-
msgid "Open CIDR calculator for IPv4 / IPv6."
|
629 |
-
msgstr ""
|
630 |
-
|
631 |
-
#: admin/includes/tab-settings.php:127 admin/includes/tab-settings.php:794
|
632 |
msgid "Matching rule"
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: admin/includes/tab-settings.php:
|
636 |
msgid ""
|
637 |
"A request from which the country code or IP address is <strong>NOT</strong> "
|
638 |
"in the whitelist will be blocked."
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: admin/includes/tab-settings.php:
|
642 |
msgid ""
|
643 |
"A request from which the country code or IP address is in the blacklist will "
|
644 |
"be blocked."
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: admin/includes/tab-settings.php:
|
648 |
msgid ""
|
649 |
"<dfn title=\"It enables utilizing “AS number” in the “"
|
650 |
"Whitelist/Blacklist of extra IP addresses” to specify a group of IP "
|
651 |
"networks.\">Use Autonomous System Number</dfn>"
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: admin/includes/tab-settings.php:
|
655 |
#, php-format
|
656 |
msgid "Some useful tools to find ASN are introduced in “%s”."
|
657 |
msgstr ""
|
658 |
|
659 |
-
#: admin/includes/tab-settings.php:
|
660 |
msgid ""
|
661 |
"<dfn title=\"e.g. “192.0.64.0/18” for Jetpack server, "
|
662 |
"“69.46.36.0/27” for WordFence server or “AS32934” "
|
663 |
"for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: admin/includes/tab-settings.php:
|
667 |
msgid ""
|
668 |
"<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
|
669 |
"\">Blacklist of extra IP addresses prior to country code</dfn>"
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: admin/includes/tab-settings.php:
|
673 |
msgid ""
|
674 |
"<dfn title=\"If your server is placed behind the proxy server or the load "
|
675 |
"balancing server, you need to put the appropriate key such as “"
|
@@ -678,7 +712,7 @@ msgid ""
|
|
678 |
"addresses</dfn>"
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: admin/includes/tab-settings.php:
|
682 |
msgid ""
|
683 |
"<dfn title=\"It validates malicious signatures independently of “Block "
|
684 |
"by country” and “Prevent Zero-day Exploit” for the target "
|
@@ -689,18 +723,18 @@ msgid ""
|
|
689 |
"please click to restore.\"><span></span></a>)</nobr>"
|
690 |
msgstr ""
|
691 |
|
692 |
-
#: admin/includes/tab-settings.php:
|
693 |
msgid ""
|
694 |
"<dfn title=\"Select allowed MIME type.\">Whitelist of allowed MIME type</dfn>"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: admin/includes/tab-settings.php:
|
698 |
msgid ""
|
699 |
"<dfn title=\"Put forbidden file extensions.\">Blacklist of forbidden file "
|
700 |
"extensions</dfn>"
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: admin/includes/tab-settings.php:
|
704 |
msgid ""
|
705 |
"<dfn title=\"Specify the capabilities to be verified. Depending on the "
|
706 |
"particular type of uploader, certain capability may be required. Default is "
|
@@ -708,14 +742,14 @@ msgid ""
|
|
708 |
"verification will be skipped if empty.\">Capabilities to be verified</dfn>"
|
709 |
msgstr ""
|
710 |
|
711 |
-
#: admin/includes/tab-settings.php:
|
712 |
msgid ""
|
713 |
"( See “<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
|
714 |
"Roles_and_Capabilities\" title=\"Roles and Capabilities « WordPress "
|
715 |
"Codex\">Roles and Capabilities</a>” )"
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: admin/includes/tab-settings.php:
|
719 |
msgid ""
|
720 |
"<dfn title=\"It restricts the file types on upload in order to block malware "
|
721 |
"and backdoor via both back-end and front-end. Please consider to select "
|
@@ -724,35 +758,27 @@ msgid ""
|
|
724 |
"this validation.\">Prevent malicious file uploading</dfn>"
|
725 |
msgstr ""
|
726 |
|
727 |
-
#: admin/includes/tab-settings.php:
|
728 |
-
#: admin/includes/tab-settings.php:
|
729 |
msgid "Disable"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: admin/includes/tab-settings.php:
|
733 |
msgid "Verify file extension and MIME type"
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: admin/includes/tab-settings.php:
|
737 |
msgid "Verify file extension only"
|
738 |
msgstr ""
|
739 |
|
740 |
-
#: admin/includes/tab-settings.php:
|
741 |
-
msgid ""
|
742 |
-
"<dfn title=\"This is applied to “XML-RPC” and “Login "
|
743 |
-
"form”. Lockout period is defined as expiration time of “IP "
|
744 |
-
"address Cache” in “Privacy and record settings” section."
|
745 |
-
"\">Max number of failed login attempts per IP address</dfn>"
|
746 |
-
msgstr ""
|
747 |
-
|
748 |
-
#: admin/includes/tab-settings.php:355
|
749 |
#, php-format
|
750 |
msgid ""
|
751 |
"<dfn title=\"You can put your original 403.php and so on into your theme "
|
752 |
"directory.\">Response code</dfn> %s"
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: admin/includes/tab-settings.php:
|
756 |
msgid ""
|
757 |
"<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
|
758 |
"to a public facing page, visitors would not be blocked on the page to "
|
@@ -761,146 +787,178 @@ msgid ""
|
|
761 |
"\">Redirect URL</dfn>"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: admin/includes/tab-settings.php:
|
765 |
msgid ""
|
766 |
"<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
|
767 |
"message</dfn>"
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: admin/includes/tab-settings.php:
|
771 |
msgid "Select when to run the validation."
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: admin/includes/tab-settings.php:
|
775 |
msgid "Validation timing"
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: admin/includes/tab-settings.php:
|
779 |
msgid "“init” action hook"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: admin/includes/tab-settings.php:
|
783 |
msgid "“mu-plugins” (ip-geo-block-mu.php)"
|
784 |
msgstr ""
|
785 |
|
786 |
-
#: admin/includes/tab-settings.php:
|
787 |
msgid ""
|
788 |
"Validate at “init” action hook in the same manner as typical "
|
789 |
"plugins."
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: admin/includes/tab-settings.php:
|
793 |
msgid ""
|
794 |
"Validate at an earlier phase than other typical plugins. It can reduce load "
|
795 |
-
"on server but has <a rel='noreferrer' href='
|
796 |
"validation-timing.html' title='Validation timing | IP Geo Block'>some "
|
797 |
"restrictions</a>."
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: admin/includes/tab-settings.php:
|
801 |
msgid "Back-end target settings"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: admin/includes/tab-settings.php:
|
805 |
#, php-format
|
806 |
msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: admin/includes/tab-settings.php:
|
810 |
msgid "Other areas"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: admin/includes/tab-settings.php:
|
814 |
msgid "public facing pages"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: admin/includes/tab-settings.php:
|
818 |
-
#: admin/includes/tab-settings.php:
|
819 |
-
#: admin/includes/tab-settings.php:
|
820 |
msgid "Block by country"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
824 |
msgid "Completely close"
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: admin/includes/tab-settings.php:
|
828 |
msgid "Action to login as a registered user."
|
829 |
msgstr ""
|
830 |
|
831 |
-
#: admin/includes/tab-settings.php:
|
832 |
msgid "Log in"
|
833 |
msgstr ""
|
834 |
|
835 |
-
#: admin/includes/tab-settings.php:
|
836 |
msgid "Action to register new users."
|
837 |
msgstr ""
|
838 |
|
839 |
-
#: admin/includes/tab-settings.php:
|
840 |
msgid "Register"
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: admin/includes/tab-settings.php:
|
844 |
msgid "Action to reset a password to create a new one."
|
845 |
msgstr ""
|
846 |
|
847 |
-
#: admin/includes/tab-settings.php:
|
848 |
msgid "Password Reset"
|
849 |
msgstr ""
|
850 |
|
851 |
-
#: admin/includes/tab-settings.php:
|
852 |
msgid "Action to email a password to a registered user."
|
853 |
msgstr ""
|
854 |
|
855 |
-
#: admin/includes/tab-settings.php:
|
856 |
msgid "Lost Password"
|
857 |
msgstr ""
|
858 |
|
859 |
-
#: admin/includes/tab-settings.php:
|
860 |
msgid ""
|
861 |
"Action to show prompt to enter a password on password protected post and "
|
862 |
"page."
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: admin/includes/tab-settings.php:
|
866 |
msgid "Password protected"
|
867 |
msgstr ""
|
868 |
|
869 |
-
#: admin/includes/tab-settings.php:
|
870 |
msgid ""
|
871 |
"<dfn title=\"Specify the individual action as a blocking target.\">Target "
|
872 |
"actions</dfn>"
|
873 |
msgstr ""
|
874 |
|
875 |
-
#: admin/includes/tab-settings.php:
|
876 |
msgid "Prevent Zero-day Exploit"
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: admin/includes/tab-settings.php:
|
880 |
msgid ""
|
881 |
"It will block a request related to the services for both public facing pages "
|
882 |
"and the dashboard."
|
883 |
msgstr ""
|
884 |
|
885 |
-
#: admin/includes/tab-settings.php:
|
886 |
msgid ""
|
887 |
"Regardless of the country code, it will block a malicious request related to "
|
888 |
"the services only for the dashboard."
|
889 |
msgstr ""
|
890 |
|
891 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
msgid "admin post for logged-in user"
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: admin/includes/tab-settings.php:
|
896 |
msgid "admin post for non logged-in user"
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: admin/includes/tab-settings.php:
|
900 |
msgid "Admin ajax/post"
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: admin/includes/tab-settings.php:
|
904 |
msgid ""
|
905 |
"Specify the action name (“action=…”) or the page name "
|
906 |
"(“page=…”) to prevent unintended blocking caused by "
|
@@ -908,33 +966,33 @@ msgid ""
|
|
908 |
"Zero-day Exploit” (for logged-in user)."
|
909 |
msgstr ""
|
910 |
|
911 |
-
#: admin/includes/tab-settings.php:
|
912 |
-
#: admin/includes/tab-settings.php:
|
913 |
msgid "Exceptions"
|
914 |
msgstr ""
|
915 |
|
916 |
-
#: admin/includes/tab-settings.php:
|
917 |
msgid "Toggle with non logged-in user"
|
918 |
msgstr ""
|
919 |
|
920 |
-
#: admin/includes/tab-settings.php:
|
921 |
msgid "Candidate actions/pages"
|
922 |
msgstr ""
|
923 |
|
924 |
-
#: admin/includes/tab-settings.php:
|
925 |
#, php-format
|
926 |
msgid ""
|
927 |
"Regardless of the country code, it will block a malicious request to <code>"
|
928 |
"%s⋯/*.php</code>."
|
929 |
msgstr ""
|
930 |
|
931 |
-
#: admin/includes/tab-settings.php:
|
932 |
msgid ""
|
933 |
"Select the item which causes unintended blocking in order to exclude from "
|
934 |
"the validation target. Grayed item indicates “INACTIVE”."
|
935 |
msgstr ""
|
936 |
|
937 |
-
#: admin/includes/tab-settings.php:
|
938 |
#, php-format
|
939 |
msgid ""
|
940 |
"It configures “%s” to validate a direct request to the PHP file "
|
@@ -942,17 +1000,17 @@ msgid ""
|
|
942 |
"hidden files beginning with a dot by the server's configuration."
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: admin/includes/tab-settings.php:
|
946 |
msgid "Sorry, but your server type is not supported."
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: admin/includes/tab-settings.php:
|
950 |
msgid ""
|
951 |
-
"You need to click
|
952 |
-
"
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:
|
956 |
msgid "Force to load WP core"
|
957 |
msgstr ""
|
958 |
|
@@ -960,19 +1018,19 @@ msgstr ""
|
|
960 |
msgid "Plugins area"
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: admin/includes/tab-settings.php:
|
964 |
msgid "Themes area"
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: admin/includes/tab-settings.php:
|
968 |
msgid "Front-end target settings"
|
969 |
msgstr ""
|
970 |
|
971 |
-
#: admin/includes/tab-settings.php:
|
972 |
msgid "Follow “Validation rule settings”"
|
973 |
msgstr ""
|
974 |
|
975 |
-
#: admin/includes/tab-settings.php:
|
976 |
#, php-format
|
977 |
msgid ""
|
978 |
"<dfn title=\"You can configure a different response code from the Back-end. "
|
@@ -980,70 +1038,78 @@ msgid ""
|
|
980 |
"\">Response code</dfn> %s"
|
981 |
msgstr ""
|
982 |
|
983 |
-
#: admin/includes/tab-settings.php:
|
984 |
msgid ""
|
985 |
"<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: admin/includes/tab-settings.php:
|
989 |
msgid ""
|
990 |
"<dfn title=\"Specify the individual post type on a single page as a blocking "
|
991 |
"target.\">Post type</dfn>"
|
992 |
msgstr ""
|
993 |
|
994 |
-
#: admin/includes/tab-settings.php:
|
995 |
msgid ""
|
996 |
"<dfn title=\"Specify the individual category on a single page or archive "
|
997 |
"page as a blocking target.\">Category</dfn>"
|
998 |
msgstr ""
|
999 |
|
1000 |
-
#: admin/includes/tab-settings.php:
|
1001 |
msgid ""
|
1002 |
"<dfn title=\"Specify the individual tag on a single page or archive page as "
|
1003 |
"a blocking target.\">Tag</dfn>"
|
1004 |
msgstr ""
|
1005 |
|
1006 |
-
#: admin/includes/tab-settings.php:
|
1007 |
msgid "Specify the validation target on front-end."
|
1008 |
msgstr ""
|
1009 |
|
1010 |
-
#: admin/includes/tab-settings.php:
|
1011 |
msgid "Validation target"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
-
#: admin/includes/tab-settings.php:
|
1015 |
msgid "All requests"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
-
#: admin/includes/tab-settings.php:
|
1019 |
msgid "Specify the targets"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
-
#: admin/includes/tab-settings.php:
|
1023 |
msgid ""
|
1024 |
"Notice that “Validation timing” is deferred till “"
|
1025 |
"wp” action hook. It means that this feature would not be compatible "
|
1026 |
"with any page caching."
|
1027 |
msgstr ""
|
1028 |
|
1029 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1030 |
msgid ""
|
1031 |
"<dfn title=\"Specify the frequency of request for certain period of time."
|
1032 |
"\">Blocking condition</dfn>"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#: admin/includes/tab-settings.php:
|
1036 |
#, php-format
|
1037 |
msgid "More than %1$s page view (PV) in %2$s seconds"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
-
#: admin/includes/tab-settings.php:
|
1041 |
msgid ""
|
1042 |
"<dfn title=\"It will validate the frequency of request.\">Block badly-"
|
1043 |
"behaved bots and crawlers</dfn>"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
-
#: admin/includes/tab-settings.php:
|
1047 |
msgid ""
|
1048 |
"A part of user agent string and a qualification connected with a separator "
|
1049 |
"that indicates an applicable rule and can be “:” (pass) or "
|
@@ -1053,19 +1119,11 @@ msgid ""
|
|
1053 |
"qualification”."
|
1054 |
msgstr ""
|
1055 |
|
1056 |
-
#: admin/includes/tab-settings.php:
|
1057 |
msgid "UA string and qualification"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
-
#: admin/includes/tab-settings.php:
|
1061 |
-
msgid "Specify the name of actions as exception that is invariably blocked."
|
1062 |
-
msgstr ""
|
1063 |
-
|
1064 |
-
#: admin/includes/tab-settings.php:1036
|
1065 |
-
msgid "Excluded actions"
|
1066 |
-
msgstr ""
|
1067 |
-
|
1068 |
-
#: admin/includes/tab-settings.php:1055
|
1069 |
msgid ""
|
1070 |
"It enables to verify the host by reverse DNS lookup which would spend some "
|
1071 |
"server resources. If it is disabled, “HOST” and “"
|
@@ -1073,49 +1131,49 @@ msgid ""
|
|
1073 |
"return “true”."
|
1074 |
msgstr ""
|
1075 |
|
1076 |
-
#: admin/includes/tab-settings.php:
|
1077 |
-
msgid "DNS
|
1078 |
msgstr ""
|
1079 |
|
1080 |
-
#: admin/includes/tab-settings.php:
|
1081 |
msgid ""
|
1082 |
"It enables to simulate validation without deployment. The results can be "
|
1083 |
"found as “public” in Logs."
|
1084 |
msgstr ""
|
1085 |
|
1086 |
-
#: admin/includes/tab-settings.php:
|
1087 |
msgid "Simulation mode"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
-
#: admin/includes/tab-settings.php:
|
1091 |
msgid "Privacy and record settings"
|
1092 |
msgstr ""
|
1093 |
|
1094 |
-
#: admin/includes/tab-settings.php:
|
1095 |
msgid ""
|
1096 |
"<dfn title=\"This option restricts not to send IP address to the external "
|
1097 |
"Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
-
#: admin/includes/tab-settings.php:
|
1101 |
msgid ""
|
1102 |
"<dfn title=\"This option enables to record the number blocked countries and "
|
1103 |
-
"the number of blocked requests per day.\">Record “Statistics
|
1104 |
-
"dfn>"
|
1105 |
msgstr ""
|
1106 |
|
1107 |
-
#: admin/includes/tab-settings.php:
|
1108 |
msgid "Maximum period for “Statistics” [days]"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
-
#: admin/includes/tab-settings.php:
|
1112 |
msgid ""
|
1113 |
"<dfn title=\"This option enables to record the IP address, country code and "
|
1114 |
"failure counter of login attempts into the cache on database to minimize the "
|
1115 |
-
"impact on site speed.\">Record “IP address
|
1116 |
msgstr ""
|
1117 |
|
1118 |
-
#: admin/includes/tab-settings.php:
|
1119 |
msgid ""
|
1120 |
"<dfn title=\"If user authentication fails consecutively beyond “Max "
|
1121 |
"number of failed login attempts per IP address”, subsequent login will "
|
@@ -1123,456 +1181,372 @@ msgid ""
|
|
1123 |
"dfn>"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
-
#: admin/includes/tab-settings.php:
|
1127 |
msgid ""
|
1128 |
"<dfn title=\"This option enables to record the validation logs including IP "
|
1129 |
-
"addresses.\">Record “
|
1130 |
msgstr ""
|
1131 |
|
1132 |
-
#: admin/includes/tab-settings.php:
|
1133 |
msgid "When blocked"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
-
#: admin/includes/tab-settings.php:
|
1137 |
msgid "When passed"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
-
#: admin/includes/tab-settings.php:
|
1141 |
msgid "When “blocked” or “passed (not in whitelist)”"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
-
#: admin/includes/tab-settings.php:
|
1145 |
msgid "Unauthenticated visitor"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
-
#: admin/includes/tab-settings.php:
|
1149 |
msgid "Authenticated user"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
-
#: admin/includes/tab-settings.php:
|
1153 |
msgid "All the validation"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
-
#: admin/includes/tab-settings.php:
|
1157 |
#, php-format
|
1158 |
msgid ""
|
1159 |
"<dfn title=\"The maximum number of entries in the logs is also limited to %d."
|
1160 |
"\">Expiration time [days] for each entry</dfn>"
|
1161 |
msgstr ""
|
1162 |
|
1163 |
-
#: admin/includes/tab-settings.php:
|
1164 |
msgid ""
|
1165 |
"<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
|
1166 |
"with value</dfn>"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
-
#: admin/includes/tab-settings.php:
|
1170 |
-
msgid "Maximum entries
|
1171 |
msgstr ""
|
1172 |
|
1173 |
-
#: admin/includes/tab-settings.php:
|
1174 |
msgid ""
|
1175 |
"<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
|
1176 |
"“Live update”</dfn>"
|
1177 |
msgstr ""
|
1178 |
|
1179 |
-
#: admin/includes/tab-settings.php:
|
1180 |
msgid "Ordinary file"
|
1181 |
msgstr ""
|
1182 |
|
1183 |
-
#: admin/includes/tab-settings.php:
|
1184 |
msgid "In-Memory"
|
1185 |
msgstr ""
|
1186 |
|
1187 |
-
#: admin/includes/tab-settings.php:
|
1188 |
msgid "PDO_SQLITE driver not available"
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#: admin/includes/tab-settings.php:
|
1192 |
msgid ""
|
1193 |
"It takes a few tens of milliseconds as overhead. It can be safely used "
|
1194 |
"without conflict with other plugins."
|
1195 |
msgstr ""
|
1196 |
|
1197 |
-
#: admin/includes/tab-settings.php:
|
1198 |
msgid ""
|
1199 |
"It takes a few milliseconds as overhead. There is a possibility of conflict "
|
1200 |
"with other plugins using this method."
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#: admin/includes/tab-settings.php:
|
1204 |
msgid "Reset database source of “Live update”"
|
1205 |
msgstr ""
|
1206 |
|
1207 |
-
#: admin/includes/tab-settings.php:
|
1208 |
msgid "Reset now"
|
1209 |
msgstr ""
|
1210 |
|
1211 |
-
#: admin/includes/tab-settings.php:
|
1212 |
msgid ""
|
1213 |
"Task could not be found in WP-Cron. Please try to deactivate this plugin "
|
1214 |
"once and activate again."
|
1215 |
msgstr ""
|
1216 |
|
1217 |
-
#: admin/includes/tab-settings.php:
|
1218 |
msgid ""
|
1219 |
"<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
|
1220 |
-
"expired entries in “IP address
|
1221 |
"\">Interval [sec] to cleanup expired entries of IP address</dfn>"
|
1222 |
msgstr ""
|
1223 |
|
1224 |
-
#: admin/includes/tab-settings.php:
|
1225 |
#, php-format
|
1226 |
msgid "Next schedule: %s"
|
1227 |
msgstr ""
|
1228 |
|
1229 |
-
#: admin/includes/tab-settings.php:
|
1230 |
msgid "Remove all settings and records at uninstallation"
|
1231 |
msgstr ""
|
1232 |
|
1233 |
-
#: admin/includes/tab-settings.php:
|
1234 |
msgid "Geolocation API settings"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
-
#: admin/includes/tab-settings.php:
|
1238 |
msgid ""
|
1239 |
-
"<dfn title=\"IP address
|
1240 |
"priority.\">API selection and key settings</dfn>"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#: admin/includes/tab-settings.php:
|
1244 |
msgid "Timeout for network API [sec]"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
-
#: admin/includes/tab-settings.php:
|
1248 |
-
#, php-format
|
1249 |
-
msgid ""
|
1250 |
-
"Can not find Geolocation API libraries in <code>%s</code>. It seems to have "
|
1251 |
-
"failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
|
1252 |
-
"tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
|
1253 |
-
"contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
|
1254 |
-
"from <a rel=\"noreferrer\" href=\"https://github.com/tokkonopapa/WordPress-"
|
1255 |
-
"IP-Geo-API\" title=\"tokkonopapa/WordPress-IP-Geo-API - GitHub\">WordPress-"
|
1256 |
-
"IP-Geo-API</a>. Please install <code>ip-geo-api</code> with write permission "
|
1257 |
-
"according to <a rel=\"noreferrer\" href=\"http://www.ipgeoblock.com/codex/"
|
1258 |
-
"how-to-fix-permission-troubles.html\" title=\"How can I fix permission "
|
1259 |
-
"troubles? | IP Geo Block\">this instruction</a>."
|
1260 |
-
msgstr ""
|
1261 |
-
|
1262 |
-
#: admin/includes/tab-settings.php:1425
|
1263 |
msgid "Local database settings"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: admin/includes/tab-settings.php:
|
1267 |
msgid "database"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
-
#: admin/includes/tab-settings.php:
|
1271 |
#, php-format
|
1272 |
msgid "Last update: %s"
|
1273 |
msgstr ""
|
1274 |
|
1275 |
-
#: admin/includes/tab-settings.php:
|
1276 |
msgid "Auto updating (once a month)"
|
1277 |
msgstr ""
|
1278 |
|
1279 |
-
#: admin/includes/tab-settings.php:
|
1280 |
msgid "Download database"
|
1281 |
msgstr ""
|
1282 |
|
1283 |
-
#: admin/includes/tab-settings.php:
|
1284 |
msgid "Download now"
|
1285 |
msgstr ""
|
1286 |
|
1287 |
-
#: admin/includes/tab-settings.php:
|
1288 |
-
msgid "Submission settings"
|
1289 |
-
msgstr ""
|
1290 |
-
|
1291 |
-
#: admin/includes/tab-settings.php:1512
|
1292 |
-
msgid "The whole will be wrapped by <p> tag. Allowed tags: "
|
1293 |
-
msgstr ""
|
1294 |
-
|
1295 |
-
#: admin/includes/tab-settings.php:1512
|
1296 |
-
msgid "Message on comment form"
|
1297 |
-
msgstr ""
|
1298 |
-
|
1299 |
-
#: admin/includes/tab-settings.php:1524
|
1300 |
-
msgid "None"
|
1301 |
-
msgstr ""
|
1302 |
-
|
1303 |
-
#: admin/includes/tab-settings.php:1525
|
1304 |
-
msgid "Top"
|
1305 |
-
msgstr ""
|
1306 |
-
|
1307 |
-
#: admin/includes/tab-settings.php:1526
|
1308 |
-
msgid "Bottom"
|
1309 |
-
msgstr ""
|
1310 |
-
|
1311 |
-
#: admin/includes/tab-settings.php:1537
|
1312 |
msgid "Plugin settings"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
-
#: admin/includes/tab-settings.php:
|
1316 |
msgid ""
|
1317 |
"<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
|
1318 |
"settings</dfn>"
|
1319 |
msgstr ""
|
1320 |
|
1321 |
-
#: admin/includes/tab-settings.php:
|
1322 |
msgid ""
|
1323 |
-
"<dfn title=\"
|
|
|
|
|
1324 |
"dfn>"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1328 |
msgid "Export / Import settings"
|
1329 |
msgstr ""
|
1330 |
|
1331 |
-
#: admin/includes/tab-settings.php:
|
1332 |
msgid "Export settings"
|
1333 |
msgstr ""
|
1334 |
|
1335 |
-
#: admin/includes/tab-settings.php:
|
1336 |
msgid "Import from the local file"
|
1337 |
msgstr ""
|
1338 |
|
1339 |
-
#: admin/includes/tab-settings.php:
|
1340 |
msgid "Import settings"
|
1341 |
msgstr ""
|
1342 |
|
1343 |
-
#: admin/includes/tab-settings.php:
|
1344 |
msgid "Import pre-defined settings"
|
1345 |
msgstr ""
|
1346 |
|
1347 |
-
#: admin/includes/tab-settings.php:
|
1348 |
msgid ""
|
1349 |
"Import the default settings to revert to the “Right after "
|
1350 |
"installing” state"
|
1351 |
msgstr ""
|
1352 |
|
1353 |
-
#: admin/includes/tab-settings.php:
|
1354 |
msgid "Default settings"
|
1355 |
msgstr ""
|
1356 |
|
1357 |
-
#: admin/includes/tab-settings.php:
|
1358 |
msgid ""
|
1359 |
"Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
|
1360 |
"for the “Back-end target settings”"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
-
#: admin/includes/tab-settings.php:
|
1364 |
msgid "Best for Back-end"
|
1365 |
msgstr ""
|
1366 |
|
1367 |
-
#: admin/includes/tab-settings.php:
|
1368 |
-
msgid "
|
1369 |
-
msgstr ""
|
1370 |
-
|
1371 |
-
#: admin/includes/tab-settings.php:1631
|
1372 |
-
msgid "Delete now"
|
1373 |
-
msgstr ""
|
1374 |
-
|
1375 |
-
#: admin/includes/tab-settings.php:1639
|
1376 |
-
msgid "Create DB tables for this plugin"
|
1377 |
msgstr ""
|
1378 |
|
1379 |
-
#: admin/includes/tab-settings.php:
|
1380 |
-
msgid "
|
1381 |
msgstr ""
|
1382 |
|
1383 |
-
#: admin/includes/tab-settings.php:
|
1384 |
msgid ""
|
1385 |
"<dfn title=\"When you have some unexpected blocking experiences, please "
|
1386 |
"press the button to find the blocked requests at the end of dumped "
|
1387 |
"information which may help you to solve the issues.\">Diagnostic "
|
1388 |
"information</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
|
1389 |
-
"support/plugin/ip-geo-block\" title=\"
|
1390 |
-
"
|
1391 |
msgstr ""
|
1392 |
|
1393 |
-
#: admin/includes/tab-settings.php:
|
1394 |
-
msgid "Please copy & paste when submitting your issue to support forum
|
1395 |
msgstr ""
|
1396 |
|
1397 |
-
#: admin/includes/tab-settings.php:
|
1398 |
msgid "Show information"
|
1399 |
msgstr ""
|
1400 |
|
1401 |
-
#: admin/includes/tab-settings.php:
|
1402 |
-
msgid ""
|
1403 |
-
"To enhance the protection ability, please refer to “<a rel=\"noreferrer"
|
1404 |
-
"\" href=\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-"
|
1405 |
-
"settings.html\" title=\"The best practice for target settings | IP Geo Block"
|
1406 |
-
"\">The best practice for target settings</a>”."
|
1407 |
-
msgstr ""
|
1408 |
-
|
1409 |
-
#: admin/includes/tab-settings.php:1681
|
1410 |
-
msgid ""
|
1411 |
-
"If you have any troubles with these, please check FAQ at <a rel=\"noreferrer"
|
1412 |
-
"\" href=\"https://wordpress.org/plugins/ip-geo-block/faq/\" title=\"IP Geo "
|
1413 |
-
"Block — WordPress Plugins\">WordPress.org</a> and <a rel=\"noreferrer"
|
1414 |
-
"\" href=\"http://www.ipgeoblock.com/codex/#faq\" title=\"Codex | IP Geo Block"
|
1415 |
-
"\">Codex</a>."
|
1416 |
-
msgstr ""
|
1417 |
-
|
1418 |
-
#: admin/includes/tab-settings.php:1688
|
1419 |
msgid ""
|
1420 |
"While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
|
1421 |
"others will pass an IP address to the 3rd parties' API via HTTP."
|
1422 |
msgstr ""
|
1423 |
|
1424 |
-
#: admin/includes/tab-settings.php:
|
1425 |
msgid ""
|
1426 |
"Please select the appropriate APIs to fit the privacy law / regulation in "
|
1427 |
"your country / region."
|
1428 |
msgstr ""
|
1429 |
|
1430 |
-
#: admin/includes/tab-settings.php:
|
1431 |
#, php-format
|
1432 |
msgid ""
|
1433 |
"Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
|
1434 |
"2.0.0+%s."
|
1435 |
msgstr ""
|
1436 |
|
1437 |
-
#: admin/includes/tab-settings.php:1706
|
1438 |
-
msgid ""
|
1439 |
-
"Please refer to the document “<a rel=\"noreferrer\" href=\"http://www."
|
1440 |
-
"ipgeoblock.com/codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block"
|
1441 |
-
"\">Blocking on front-end</a>” for details, including restrictions on "
|
1442 |
-
"cache plugin."
|
1443 |
-
msgstr ""
|
1444 |
-
|
1445 |
-
#: admin/includes/tab-settings.php:1707
|
1446 |
-
msgid ""
|
1447 |
-
"If you find any issues or have something to suggest, please feel free to "
|
1448 |
-
"open an issue at <a rel=\"noreferrer\" href=\"https://wordpress.org/support/"
|
1449 |
-
"plugin/ip-geo-block\" title=\"WordPress › Support » IP Geo Block"
|
1450 |
-
"\">support forum</a>."
|
1451 |
-
msgstr ""
|
1452 |
-
|
1453 |
-
#: admin/includes/tab-settings.php:1714
|
1454 |
-
msgid ""
|
1455 |
-
"Please refer to the document “<a rel=\"noreferrer\" href=\"http://www."
|
1456 |
-
"ipgeoblock.com/codex/record-settings-and-logs.html\" title=\"Codex | IP Geo "
|
1457 |
-
"Block\">Record settings and logs</a>” for details."
|
1458 |
-
msgstr ""
|
1459 |
-
|
1460 |
#: admin/includes/tab-statistics.php:19
|
1461 |
msgid "Statistics of validation"
|
1462 |
msgstr ""
|
1463 |
|
1464 |
-
#: admin/includes/tab-statistics.php:
|
1465 |
msgid "Blocked"
|
1466 |
msgstr ""
|
1467 |
|
1468 |
-
#: admin/includes/tab-statistics.php:
|
1469 |
msgid "Blocked by countries"
|
1470 |
msgstr ""
|
1471 |
|
1472 |
-
#: admin/includes/tab-statistics.php:
|
1473 |
msgid "Blocked per day"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
-
#: admin/includes/tab-statistics.php:
|
1477 |
msgid "Blocked by type of IP address"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
-
#: admin/includes/tab-statistics.php:
|
1481 |
msgid "Name of API"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
-
#: admin/includes/tab-statistics.php:
|
1485 |
msgid "Call"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
-
#: admin/includes/tab-statistics.php:
|
1489 |
msgid "Response [msec]"
|
1490 |
msgstr ""
|
1491 |
|
1492 |
-
#: admin/includes/tab-statistics.php:
|
1493 |
msgid "Average response time of each API"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
-
#: admin/includes/tab-statistics.php:
|
1497 |
msgid "Clear statistics"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
-
#: admin/includes/tab-statistics.php:
|
1501 |
-
msgid "Statistics in
|
1502 |
msgstr ""
|
1503 |
|
1504 |
-
#: admin/includes/tab-statistics.php:
|
1505 |
-
msgid "Statistics in IP address
|
1506 |
msgstr ""
|
1507 |
|
1508 |
-
#: admin/includes/tab-statistics.php:
|
1509 |
msgid "Search in cache"
|
1510 |
msgstr ""
|
1511 |
|
1512 |
-
#: admin/includes/tab-statistics.php:
|
1513 |
msgid "Clear cache"
|
1514 |
msgstr ""
|
1515 |
|
1516 |
-
#: admin/includes/tab-statistics.php:
|
1517 |
msgid "Export cache"
|
1518 |
msgstr ""
|
1519 |
|
1520 |
-
#: admin/includes/tab-statistics.php:
|
1521 |
msgid "Country (Top 10)"
|
1522 |
msgstr ""
|
1523 |
|
1524 |
-
#: admin/includes/tab-statistics.php:
|
1525 |
msgid "AS number (Top 10)"
|
1526 |
msgstr ""
|
1527 |
|
1528 |
-
#: admin/includes/tab-statistics.php:
|
1529 |
msgid "IP address (Top 10)"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
-
#: admin/includes/tab-statistics.php:
|
1533 |
msgid "Slug in back-end"
|
1534 |
msgstr ""
|
1535 |
|
1536 |
-
#: admin/includes/tab-statistics.php:
|
1537 |
msgid "Toggle sorting order"
|
1538 |
msgstr ""
|
1539 |
|
1540 |
-
#: admin/includes/tab-statistics.php:
|
1541 |
#, php-format
|
1542 |
-
msgid "[ %sRecord “Statistics”%s ] is disabled."
|
1543 |
msgstr ""
|
1544 |
|
1545 |
-
#: admin/includes/tab-statistics.php:
|
1546 |
msgid ""
|
1547 |
"Please set the proper condition to record and analyze the validation "
|
1548 |
"statistics."
|
1549 |
msgstr ""
|
1550 |
|
1551 |
-
#: admin/includes/tab-statistics.php:
|
1552 |
#, php-format
|
1553 |
-
msgid "[ %sRecord “IP address
|
1554 |
msgstr ""
|
1555 |
|
1556 |
-
#: admin/includes/tab-statistics.php:
|
1557 |
msgid "Please set the proper condition to record IP address in cache."
|
1558 |
msgstr ""
|
1559 |
|
1560 |
-
#: classes/class-ip-geo-block-
|
1561 |
-
msgid ""
|
1562 |
-
"You need to select at least one IP Geolocation API. Otherwise <strong>you'll "
|
1563 |
-
"be blocked</strong> after the cache expires."
|
1564 |
-
msgstr ""
|
1565 |
-
|
1566 |
-
#: classes/class-ip-geo-block-cron.php:222
|
1567 |
#, php-format
|
1568 |
msgid "Can't lock <code>%s</code>. Please try again after a while."
|
1569 |
msgstr ""
|
1570 |
|
1571 |
-
#: classes/class-ip-geo-block-cron.php:
|
1572 |
msgid "Your database file is up-to-date."
|
1573 |
msgstr ""
|
1574 |
|
1575 |
-
#: classes/class-ip-geo-block-cron.php:
|
1576 |
msgid "gz or zip is not supported on your system."
|
1577 |
msgstr ""
|
1578 |
|
@@ -1594,21 +1568,21 @@ msgid ""
|
|
1594 |
"details."
|
1595 |
msgstr ""
|
1596 |
|
1597 |
-
#: classes/class-ip-geo-block-logs.php:
|
1598 |
#, php-format
|
1599 |
msgid ""
|
1600 |
"Creating a DB table %s had failed. Once de-activate this plugin, and then "
|
1601 |
"activate again."
|
1602 |
msgstr ""
|
1603 |
|
1604 |
-
#: classes/class-ip-geo-block-logs.php:
|
1605 |
#, php-format
|
1606 |
msgid ""
|
1607 |
"Column type in %s unmatched. Once de-activate this plugin, and then activate "
|
1608 |
"again."
|
1609 |
msgstr ""
|
1610 |
|
1611 |
-
#: classes/class-ip-geo-block.php:
|
1612 |
msgid "Dashboard"
|
1613 |
msgstr ""
|
1614 |
|
@@ -1618,7 +1592,7 @@ msgstr ""
|
|
1618 |
msgid "Database file does not exist."
|
1619 |
msgstr ""
|
1620 |
|
1621 |
-
#: wp-content/mu-plugins/ip-geo-block-mu.php:
|
1622 |
#, php-format
|
1623 |
msgid ""
|
1624 |
"Can't find IP Geo Block in your plugins directory. Please remove <code>%s</"
|
2 |
# This file is distributed under the same license as the IP Geo Block package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: IP Geo Block 3.0.15\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
|
7 |
+
"POT-Creation-Date: 2018-10-02 22:28+0900\n"
|
8 |
+
"PO-Revision-Date: 2018-10-02 22:31+0900\n"
|
9 |
"Language-Team: \n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 2.1.1\n"
|
14 |
"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
|
15 |
"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
26 |
"posted from outside your nation, and also prevents zero-day exploit."
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: admin/class-ip-geo-block-admin.php:291
|
30 |
+
msgid "Are you sure ?"
|
|
|
|
|
|
|
|
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: admin/class-ip-geo-block-admin.php:292
|
34 |
+
#: admin/class-ip-geo-block-admin.php:793
|
35 |
+
msgid "Open a new window"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: admin/class-ip-geo-block-admin.php:293 admin/includes/tab-settings.php:1506
|
39 |
+
msgid "Generate new link"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: admin/class-ip-geo-block-admin.php:294 admin/includes/tab-settings.php:1507
|
43 |
+
msgid "Delete current link"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: admin/class-ip-geo-block-admin.php:295
|
47 |
+
msgid ""
|
48 |
+
"Please add the following link to favorites / bookmarks in your browser : "
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: admin/class-ip-geo-block-admin.php:296
|
52 |
msgid "ajax for logged-in user"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: admin/class-ip-geo-block-admin.php:297
|
56 |
msgid "ajax for non logged-in user"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: admin/class-ip-geo-block-admin.php:298
|
60 |
#, php-format
|
61 |
msgid "[Found: %d]"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: admin/class-ip-geo-block-admin.php:299
|
65 |
#, php-format
|
66 |
msgid "Find and verify `%s` on “Logs” tab."
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: admin/class-ip-geo-block-admin.php:300
|
70 |
msgid "This feature is available with HTML5 compliant browsers."
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: admin/class-ip-geo-block-admin.php:301
|
74 |
+
msgid "The selected row cannot be found in the table."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: admin/class-ip-geo-block-admin.php:302
|
78 |
+
#: admin/class-ip-geo-block-admin.php:1571
|
79 |
#, php-format
|
80 |
msgid "An error occurred while executing the ajax command `%s`."
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: admin/class-ip-geo-block-admin.php:306
|
84 |
msgid "No data available in table"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: admin/class-ip-geo-block-admin.php:307
|
88 |
msgid "No matching records found"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: admin/class-ip-geo-block-admin.php:308
|
92 |
+
#: admin/includes/class-admin-ajax.php:107
|
93 |
+
#: admin/includes/class-admin-ajax.php:240
|
94 |
+
#: admin/includes/tab-geolocation.php:74
|
95 |
msgid "IP address"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: admin/class-ip-geo-block-admin.php:309
|
99 |
+
#: admin/includes/class-admin-ajax.php:108
|
100 |
+
#: admin/includes/class-admin-ajax.php:241
|
101 |
msgid "Code"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: admin/class-ip-geo-block-admin.php:310
|
105 |
+
#: admin/includes/class-admin-ajax.php:109
|
106 |
+
#: admin/includes/class-admin-ajax.php:242
|
107 |
msgid "ASN"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: admin/class-ip-geo-block-admin.php:311
|
111 |
+
#: admin/includes/class-admin-ajax.php:243
|
112 |
msgid "Host name"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: admin/class-ip-geo-block-admin.php:312
|
116 |
+
#: admin/includes/class-admin-ajax.php:110
|
117 |
+
#: admin/includes/class-admin-ajax.php:244
|
118 |
msgid "Target"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: admin/class-ip-geo-block-admin.php:313
|
122 |
+
#: admin/includes/class-admin-ajax.php:245
|
123 |
msgid "Failure / Total"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: admin/class-ip-geo-block-admin.php:314
|
127 |
+
#: admin/includes/class-admin-ajax.php:246
|
128 |
msgid "Elapsed[sec]"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: admin/class-ip-geo-block-admin.php:315
|
132 |
+
#: admin/includes/class-admin-ajax.php:106
|
133 |
msgid "Time"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: admin/class-ip-geo-block-admin.php:316
|
137 |
+
#: admin/includes/class-admin-ajax.php:111
|
138 |
msgid "Result"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: admin/class-ip-geo-block-admin.php:317
|
142 |
+
#: admin/includes/class-admin-ajax.php:112
|
143 |
msgid "Request"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: admin/class-ip-geo-block-admin.php:318
|
147 |
+
#: admin/includes/class-admin-ajax.php:113
|
148 |
msgid "User agent"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: admin/class-ip-geo-block-admin.php:319
|
152 |
+
#: admin/includes/class-admin-ajax.php:114
|
153 |
msgid "HTTP headers"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: admin/class-ip-geo-block-admin.php:320
|
157 |
+
#: admin/includes/class-admin-ajax.php:115
|
158 |
msgid "$_POST data"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: admin/class-ip-geo-block-admin.php:346
|
162 |
msgid "Contribute on GitHub"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: admin/class-ip-geo-block-admin.php:360
|
166 |
+
#: admin/class-ip-geo-block-admin.php:478
|
167 |
+
#: admin/class-ip-geo-block-admin.php:736
|
168 |
msgid "Settings"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: admin/class-ip-geo-block-admin.php:455
|
172 |
+
#: admin/class-ip-geo-block-admin.php:456
|
173 |
+
#: admin/class-ip-geo-block-admin.php:466
|
174 |
+
#: admin/class-ip-geo-block-admin.php:467
|
175 |
+
#: admin/class-ip-geo-block-admin.php:477
|
176 |
+
#: admin/class-ip-geo-block-admin.php:487
|
177 |
msgid "IP Geo Block"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: admin/class-ip-geo-block-admin.php:488
|
181 |
+
#: admin/class-ip-geo-block-admin.php:741
|
182 |
msgid "Site List"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: admin/class-ip-geo-block-admin.php:517
|
186 |
msgid "You need WordPress 3.7+."
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: admin/class-ip-geo-block-admin.php:521
|
190 |
+
#, php-format
|
191 |
+
msgid ""
|
192 |
+
"Can not load Geolocation API libraries from <code>%s</code>. It seems to "
|
193 |
+
"have failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
|
194 |
+
"tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
|
195 |
+
"contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
|
196 |
+
"from <a rel=\"noreferrer\" href=\"https://github.com/tokkonopapa/WordPress-"
|
197 |
+
"IP-Geo-API\" title=\"tokkonopapa/WordPress-IP-Geo-API - GitHub\">WordPress-"
|
198 |
+
"IP-Geo-API</a>. Please install <code>ip-geo-api</code> with write permission "
|
199 |
+
"according to <a rel=\"noreferrer\" href=\"https://www.ipgeoblock.com/codex/"
|
200 |
+
"how-to-fix-permission-troubles.html\" title=\"How can I fix permission "
|
201 |
+
"troubles? | IP Geo Block\">this instruction</a>."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: admin/class-ip-geo-block-admin.php:530
|
205 |
+
#, php-format
|
206 |
+
msgid ""
|
207 |
+
"You should select at least one API at <a href=\"%s\">Geolocation API "
|
208 |
+
"settings</a>. Otherwise <strong>you'll be blocked</strong> after the cache "
|
209 |
+
"expires."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: admin/class-ip-geo-block-admin.php:539
|
213 |
+
#, php-format
|
214 |
+
msgid ""
|
215 |
+
"You should select at least one API for local database at <a href=\"%s"
|
216 |
+
"\">Geolocation API settings</a>. Otherwise access to the external API may "
|
217 |
+
"slow down the site."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: admin/class-ip-geo-block-admin.php:550
|
221 |
#, php-format
|
222 |
msgid ""
|
223 |
"Now downloading geolocation databases in background. After a little while, "
|
225 |
"strong>” at <a href=\"%s\">Validation rule settings</a>."
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: admin/class-ip-geo-block-admin.php:556
|
229 |
#, php-format
|
230 |
msgid ""
|
231 |
"The “<strong>Matching rule</strong>” is not set properly. Please "
|
232 |
"confirm it at <a href=\"%s\">Validation rule settings</a>."
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: admin/class-ip-geo-block-admin.php:565
|
236 |
msgid "Local database and matching rule have been updated."
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: admin/class-ip-geo-block-admin.php:576
|
240 |
msgid ""
|
241 |
"Once you logout, you will be unable to login again because the number of "
|
242 |
"login attempts reaches the limit."
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: admin/class-ip-geo-block-admin.php:578
|
246 |
#, php-format
|
247 |
msgid ""
|
248 |
+
"Please remove your IP address in “%1$sStatistics in IP address cache"
|
249 |
+
"%2$s” on “%3$sStatistics%4$s” tab to prevent locking "
|
250 |
+
"yourself out."
|
251 |
msgstr ""
|
252 |
|
253 |
+
#: admin/class-ip-geo-block-admin.php:589
|
254 |
msgid ""
|
255 |
"Once you logout, you will be unable to login again because your country code "
|
256 |
"or IP address is in the blacklist."
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: admin/class-ip-geo-block-admin.php:590
|
260 |
msgid ""
|
261 |
"Once you logout, you will be unable to login again because your country code "
|
262 |
"or IP address is not in the whitelist."
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: admin/class-ip-geo-block-admin.php:594
|
266 |
#, php-format
|
267 |
msgid "Please check your “%sValidation rule settings%s”."
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: admin/class-ip-geo-block-admin.php:598
|
271 |
#, php-format
|
272 |
msgid ""
|
273 |
"Please confirm your local geolocation databases at “%sLocal database "
|
275 |
"%sStatistics in cache%s” section."
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: admin/class-ip-geo-block-admin.php:620
|
279 |
+
#, php-format
|
280 |
+
msgid ""
|
281 |
+
"Emergency login link is outdated. Please delete it once and generate again "
|
282 |
+
"at “%sPlugin settings%s” section. Also do not forget to update "
|
283 |
+
"favorites / bookmarks in your browser."
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: admin/class-ip-geo-block-admin.php:629
|
287 |
msgid ""
|
288 |
"“mu-plugins” (ip-geo-block-mu.php) at “Validation "
|
289 |
"timing” is imcompatible with <strong>IP Geo Allow</strong>. Please "
|
290 |
"select “init” action hook."
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: admin/class-ip-geo-block-admin.php:737
|
294 |
msgid "Statistics"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: admin/class-ip-geo-block-admin.php:738
|
298 |
msgid "Logs"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: admin/class-ip-geo-block-admin.php:739
|
302 |
msgid "Search"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: admin/class-ip-geo-block-admin.php:740
|
306 |
msgid "Attribution"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: admin/class-ip-geo-block-admin.php:757
|
310 |
+
#: admin/class-ip-geo-block-admin.php:773
|
311 |
msgid "Network wide"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: admin/class-ip-geo-block-admin.php:786
|
315 |
msgid "Toggle all"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: admin/class-ip-geo-block-admin.php:789
|
319 |
msgid ""
|
320 |
"Independent of “Privacy and record settings”, you can see all "
|
321 |
"the requests validated by this plugin in almost real time."
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: admin/class-ip-geo-block-admin.php:789 admin/includes/tab-accesslog.php:39
|
325 |
msgid "Live update"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: admin/class-ip-geo-block-admin.php:793
|
329 |
msgid "Open a new window on clicking the link in the chart."
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: admin/class-ip-geo-block-admin.php:817
|
|
|
|
|
|
|
|
|
333 |
msgid "Thanks for providing these great services for free."
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: admin/class-ip-geo-block-admin.php:818
|
337 |
msgid ""
|
338 |
+
"(Most browsers will redirect you to each site <a href=\"https://www."
|
339 |
"ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
|
340 |
"when you click the link</a>.)"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: admin/class-ip-geo-block-admin.php:823
|
344 |
msgid "Back to top"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: admin/class-ip-geo-block-admin.php:915
|
348 |
msgid "Enable"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: admin/class-ip-geo-block-admin.php:930
|
352 |
msgid "Select one"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: admin/class-ip-geo-block-admin.php:1349
|
356 |
msgid "You do not have sufficient permissions to access this page."
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: admin/class-ip-geo-block-admin.php:1376
|
360 |
#: admin/includes/class-admin-rewrite.php:194
|
361 |
+
#: classes/class-ip-geo-block-cron.php:216
|
362 |
+
#: classes/class-ip-geo-block-cron.php:320
|
363 |
+
#: classes/class-ip-geo-block-cron.php:394
|
364 |
+
#: classes/class-ip-geo-block-opts.php:471
|
365 |
#, php-format
|
366 |
msgid "Unable to write <code>%s</code>. Please check the permission."
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: admin/class-ip-geo-block-admin.php:1406
|
370 |
msgid "Settings saved."
|
371 |
msgstr ""
|
372 |
|
373 |
#: admin/includes/class-admin-ajax.php:72
|
374 |
+
#: admin/includes/class-admin-ajax.php:75 admin/includes/tab-settings.php:84
|
375 |
+
#: admin/includes/tab-settings.php:103
|
376 |
msgid "n/a"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: admin/includes/class-admin-ajax.php:201
|
|
|
|
|
|
|
|
|
|
|
380 |
#, php-format
|
381 |
msgid "The user %s (user ID: %d) is in use."
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: admin/includes/class-admin-ajax.php:505
|
385 |
#, php-format
|
386 |
msgid ""
|
387 |
"illegal format at %s. Please delete the corresponding line and try again."
|
388 |
msgstr ""
|
389 |
|
390 |
#: admin/includes/class-admin-rewrite.php:168
|
391 |
+
#: classes/class-ip-geo-block-cron.php:211
|
392 |
+
#: classes/class-ip-geo-block-cron.php:389
|
393 |
#, php-format
|
394 |
msgid "Unable to read <code>%s</code>. Please check the permission."
|
395 |
msgstr ""
|
409 |
msgid "Validation logs"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:17
|
|
|
413 |
msgid "Help"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: admin/includes/tab-accesslog.php:55 admin/includes/tab-settings.php:413
|
417 |
msgid "Comment post"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: admin/includes/tab-accesslog.php:56 admin/includes/tab-settings.php:414
|
421 |
msgid "XML-RPC"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: admin/includes/tab-accesslog.php:57 admin/includes/tab-settings.php:415
|
425 |
msgid "Login form"
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: admin/includes/tab-accesslog.php:58 admin/includes/tab-settings.php:416
|
429 |
msgid "Admin area"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: admin/includes/tab-accesslog.php:59 admin/includes/tab-settings.php:418
|
433 |
msgid "Public facing pages"
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: admin/includes/tab-accesslog.php:62 admin/includes/tab-network.php:75
|
437 |
msgid "All"
|
438 |
msgstr ""
|
439 |
|
441 |
msgid "Select target"
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: admin/includes/tab-accesslog.php:86
|
445 |
msgid "Search in logs"
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: admin/includes/tab-accesslog.php:95 admin/includes/tab-statistics.php:232
|
449 |
msgid "Reset"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: admin/includes/tab-accesslog.php:109
|
453 |
+
msgid "Preset filters"
|
454 |
+
msgstr ""
|
455 |
+
|
456 |
+
#: admin/includes/tab-accesslog.php:125 admin/includes/tab-statistics.php:238
|
457 |
msgid "Bulk action"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: admin/includes/tab-accesslog.php:136 admin/includes/tab-statistics.php:249
|
461 |
msgid "Remove entries by IP address"
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: admin/includes/tab-accesslog.php:137 admin/includes/tab-statistics.php:250
|
465 |
msgid "Add IP address to “Whitelist”"
|
466 |
msgstr ""
|
467 |
|
468 |
+
#: admin/includes/tab-accesslog.php:138 admin/includes/tab-statistics.php:251
|
469 |
msgid "Add IP address to “Blacklist”"
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: admin/includes/tab-accesslog.php:139 admin/includes/tab-statistics.php:252
|
473 |
msgid "Add AS number to “Whitelist”"
|
474 |
msgstr ""
|
475 |
|
476 |
+
#: admin/includes/tab-accesslog.php:140 admin/includes/tab-statistics.php:253
|
477 |
msgid "Add AS number to “Blacklist”"
|
478 |
msgstr ""
|
479 |
|
480 |
+
#: admin/includes/tab-accesslog.php:142 admin/includes/tab-network.php:56
|
481 |
+
#: admin/includes/tab-statistics.php:255
|
482 |
msgid "Apply"
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: admin/includes/tab-accesslog.php:149 admin/includes/tab-statistics.php:191
|
486 |
msgid "Clear logs"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: admin/includes/tab-accesslog.php:157 admin/includes/tab-statistics.php:167
|
490 |
+
#: admin/includes/tab-statistics.php:199 admin/includes/tab-statistics.php:269
|
491 |
msgid "Clear all"
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: admin/includes/tab-accesslog.php:166
|
495 |
msgid "Export logs"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: admin/includes/tab-accesslog.php:172 admin/includes/tab-settings.php:1538
|
499 |
+
#: admin/includes/tab-statistics.php:283
|
500 |
msgid "Export to the local file"
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: admin/includes/tab-accesslog.php:172 admin/includes/tab-statistics.php:283
|
504 |
msgid "Export csv"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: admin/includes/tab-accesslog.php:193 admin/includes/tab-network.php:112
|
508 |
+
#: admin/includes/tab-statistics.php:413
|
509 |
#, php-format
|
510 |
+
msgid "[ %sRecord “Validation logs”%s ] is disabled."
|
511 |
msgstr ""
|
512 |
|
513 |
+
#: admin/includes/tab-accesslog.php:194 admin/includes/tab-network.php:113
|
514 |
+
#: admin/includes/tab-statistics.php:414
|
515 |
msgid ""
|
516 |
"Please set the proper condition to record and analyze the validation logs."
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: admin/includes/tab-attribution.php:13
|
520 |
msgid "Attribution links"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: admin/includes/tab-geolocation.php:17
|
524 |
msgid "Search IP address geolocation"
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: admin/includes/tab-geolocation.php:46
|
528 |
msgid "Geolocation API"
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: admin/includes/tab-geolocation.php:89 admin/includes/tab-settings.php:1084
|
532 |
msgid ""
|
533 |
"<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
|
534 |
"Moreover, this option replaces the end of IP address with “***” "
|
535 |
"to make it anonymous.\">Anonymize IP address</dfn>"
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: admin/includes/tab-geolocation.php:104
|
539 |
msgid "Search geolocation"
|
540 |
msgstr ""
|
541 |
|
542 |
+
#: admin/includes/tab-geolocation.php:112
|
543 |
msgid "Search now"
|
544 |
msgstr ""
|
545 |
|
555 |
msgid "Columns"
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: admin/includes/tab-network.php:61
|
559 |
msgid "Chart display layout"
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: admin/includes/tab-network.php:76
|
563 |
msgid "Latest 1 hour"
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: admin/includes/tab-network.php:77
|
567 |
msgid "Latest 24 hours"
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: admin/includes/tab-network.php:78
|
571 |
msgid "Latest 1 week"
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: admin/includes/tab-network.php:90
|
575 |
msgid "Duration to retrieve"
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: admin/includes/tab-settings.php:13
|
579 |
+
msgid "(comma separated)"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: admin/includes/tab-settings.php:14
|
583 |
+
msgid "(comma or RET separated)"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: admin/includes/tab-settings.php:15
|
587 |
+
msgid "Toggle selection"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: admin/includes/tab-settings.php:16
|
591 |
+
msgid "Find blocked requests in “Logs“"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: admin/includes/tab-settings.php:18
|
595 |
+
msgid ""
|
596 |
+
"Before adding as “Exception”, please click on “<a class="
|
597 |
+
"\"ip-geo-block-icon ip-geo-block-icon-alert\" title=\"This button is just a "
|
598 |
+
"sample.\"><span></span></a>” button (if exists) attached to the "
|
599 |
+
"following list to confirm that the blocked request is not malicious."
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: admin/includes/tab-settings.php:19
|
603 |
+
msgid "Open CIDR calculator for IPv4 / IPv6."
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: admin/includes/tab-settings.php:54
|
607 |
msgid "Validation rule settings"
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: admin/includes/tab-settings.php:76
|
611 |
msgid ""
|
612 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
613 |
"code by referring “Scan country code”.\">Your IP address / "
|
614 |
"Country</dfn>"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: admin/includes/tab-settings.php:85 admin/includes/tab-settings.php:104
|
618 |
msgid "Scan all the APIs you selected at Geolocation API settings"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: admin/includes/tab-settings.php:85 admin/includes/tab-settings.php:104
|
622 |
msgid "Scan country code"
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: admin/includes/tab-settings.php:95
|
626 |
msgid ""
|
627 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
628 |
"code by referring “Scan country code”.\">Server IP address / "
|
629 |
"Country</dfn>"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: admin/includes/tab-settings.php:112
|
633 |
msgid "Whitelist"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: admin/includes/tab-settings.php:113
|
637 |
msgid "Blacklist"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: admin/includes/tab-settings.php:117
|
641 |
msgid ""
|
642 |
"Please select either “Whitelist” or “Blacklist”."
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: admin/includes/tab-settings.php:118
|
646 |
msgid ""
|
647 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
648 |
"empty. The special code “XX” is assigned as private IP address "
|
652 |
"country code</dfn>"
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: admin/includes/tab-settings.php:119
|
656 |
msgid ""
|
657 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
658 |
"empty. The special code “XX” is assigned as private IP address "
|
662 |
"country code</dfn>"
|
663 |
msgstr ""
|
664 |
|
665 |
+
#: admin/includes/tab-settings.php:125 admin/includes/tab-settings.php:790
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
666 |
msgid "Matching rule"
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: admin/includes/tab-settings.php:137
|
670 |
msgid ""
|
671 |
"A request from which the country code or IP address is <strong>NOT</strong> "
|
672 |
"in the whitelist will be blocked."
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: admin/includes/tab-settings.php:138
|
676 |
msgid ""
|
677 |
"A request from which the country code or IP address is in the blacklist will "
|
678 |
"be blocked."
|
679 |
msgstr ""
|
680 |
|
681 |
+
#: admin/includes/tab-settings.php:180
|
682 |
msgid ""
|
683 |
"<dfn title=\"It enables utilizing “AS number” in the “"
|
684 |
"Whitelist/Blacklist of extra IP addresses” to specify a group of IP "
|
685 |
"networks.\">Use Autonomous System Number</dfn>"
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: admin/includes/tab-settings.php:191
|
689 |
#, php-format
|
690 |
msgid "Some useful tools to find ASN are introduced in “%s”."
|
691 |
msgstr ""
|
692 |
|
693 |
+
#: admin/includes/tab-settings.php:198
|
694 |
msgid ""
|
695 |
"<dfn title=\"e.g. “192.0.64.0/18” for Jetpack server, "
|
696 |
"“69.46.36.0/27” for WordFence server or “AS32934” "
|
697 |
"for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: admin/includes/tab-settings.php:219
|
701 |
msgid ""
|
702 |
"<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
|
703 |
"\">Blacklist of extra IP addresses prior to country code</dfn>"
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: admin/includes/tab-settings.php:240
|
707 |
msgid ""
|
708 |
"<dfn title=\"If your server is placed behind the proxy server or the load "
|
709 |
"balancing server, you need to put the appropriate key such as “"
|
712 |
"addresses</dfn>"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: admin/includes/tab-settings.php:258
|
716 |
msgid ""
|
717 |
"<dfn title=\"It validates malicious signatures independently of “Block "
|
718 |
"by country” and “Prevent Zero-day Exploit” for the target "
|
723 |
"please click to restore.\"><span></span></a>)</nobr>"
|
724 |
msgstr ""
|
725 |
|
726 |
+
#: admin/includes/tab-settings.php:272
|
727 |
msgid ""
|
728 |
"<dfn title=\"Select allowed MIME type.\">Whitelist of allowed MIME type</dfn>"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: admin/includes/tab-settings.php:283
|
732 |
msgid ""
|
733 |
"<dfn title=\"Put forbidden file extensions.\">Blacklist of forbidden file "
|
734 |
"extensions</dfn>"
|
735 |
msgstr ""
|
736 |
|
737 |
+
#: admin/includes/tab-settings.php:287
|
738 |
msgid ""
|
739 |
"<dfn title=\"Specify the capabilities to be verified. Depending on the "
|
740 |
"particular type of uploader, certain capability may be required. Default is "
|
742 |
"verification will be skipped if empty.\">Capabilities to be verified</dfn>"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: admin/includes/tab-settings.php:287
|
746 |
msgid ""
|
747 |
"( See “<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
|
748 |
"Roles_and_Capabilities\" title=\"Roles and Capabilities « WordPress "
|
749 |
"Codex\">Roles and Capabilities</a>” )"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: admin/includes/tab-settings.php:293
|
753 |
msgid ""
|
754 |
"<dfn title=\"It restricts the file types on upload in order to block malware "
|
755 |
"and backdoor via both back-end and front-end. Please consider to select "
|
758 |
"this validation.\">Prevent malicious file uploading</dfn>"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: admin/includes/tab-settings.php:304 admin/includes/tab-settings.php:479
|
762 |
+
#: admin/includes/tab-settings.php:624 admin/includes/tab-settings.php:1189
|
763 |
msgid "Disable"
|
764 |
msgstr ""
|
765 |
|
766 |
+
#: admin/includes/tab-settings.php:305
|
767 |
msgid "Verify file extension and MIME type"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: admin/includes/tab-settings.php:306
|
771 |
msgid "Verify file extension only"
|
772 |
msgstr ""
|
773 |
|
774 |
+
#: admin/includes/tab-settings.php:315
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
775 |
#, php-format
|
776 |
msgid ""
|
777 |
"<dfn title=\"You can put your original 403.php and so on into your theme "
|
778 |
"directory.\">Response code</dfn> %s"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: admin/includes/tab-settings.php:344 admin/includes/tab-settings.php:873
|
782 |
msgid ""
|
783 |
"<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
|
784 |
"to a public facing page, visitors would not be blocked on the page to "
|
787 |
"\">Redirect URL</dfn>"
|
788 |
msgstr ""
|
789 |
|
790 |
+
#: admin/includes/tab-settings.php:361 admin/includes/tab-settings.php:891
|
791 |
msgid ""
|
792 |
"<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
|
793 |
"message</dfn>"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: admin/includes/tab-settings.php:379
|
797 |
msgid "Select when to run the validation."
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: admin/includes/tab-settings.php:379
|
801 |
msgid "Validation timing"
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: admin/includes/tab-settings.php:390
|
805 |
msgid "“init” action hook"
|
806 |
msgstr ""
|
807 |
|
808 |
+
#: admin/includes/tab-settings.php:391
|
809 |
msgid "“mu-plugins” (ip-geo-block-mu.php)"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: admin/includes/tab-settings.php:394
|
813 |
msgid ""
|
814 |
"Validate at “init” action hook in the same manner as typical "
|
815 |
"plugins."
|
816 |
msgstr ""
|
817 |
|
818 |
+
#: admin/includes/tab-settings.php:395
|
819 |
msgid ""
|
820 |
"Validate at an earlier phase than other typical plugins. It can reduce load "
|
821 |
+
"on server but has <a rel='noreferrer' href='https://www.ipgeoblock.com/codex/"
|
822 |
"validation-timing.html' title='Validation timing | IP Geo Block'>some "
|
823 |
"restrictions</a>."
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: admin/includes/tab-settings.php:405
|
827 |
msgid "Back-end target settings"
|
828 |
msgstr ""
|
829 |
|
830 |
+
#: admin/includes/tab-settings.php:411
|
831 |
#, php-format
|
832 |
msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: admin/includes/tab-settings.php:417
|
836 |
msgid "Other areas"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: admin/includes/tab-settings.php:418
|
840 |
msgid "public facing pages"
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: admin/includes/tab-settings.php:434 admin/includes/tab-settings.php:480
|
844 |
+
#: admin/includes/tab-settings.php:512 admin/includes/tab-settings.php:518
|
845 |
+
#: admin/includes/tab-settings.php:783
|
846 |
msgid "Block by country"
|
847 |
msgstr ""
|
848 |
|
849 |
+
#: admin/includes/tab-settings.php:444
|
850 |
+
msgid "The whole will be wrapped by <p> tag. Allowed tags: "
|
851 |
+
msgstr ""
|
852 |
+
|
853 |
+
#: admin/includes/tab-settings.php:444
|
854 |
+
msgid "Message on comment form"
|
855 |
+
msgstr ""
|
856 |
+
|
857 |
+
#: admin/includes/tab-settings.php:457
|
858 |
+
msgid "None"
|
859 |
+
msgstr ""
|
860 |
+
|
861 |
+
#: admin/includes/tab-settings.php:458
|
862 |
+
msgid "Top"
|
863 |
+
msgstr ""
|
864 |
+
|
865 |
+
#: admin/includes/tab-settings.php:459
|
866 |
+
msgid "Bottom"
|
867 |
+
msgstr ""
|
868 |
+
|
869 |
+
#: admin/includes/tab-settings.php:481
|
870 |
msgid "Completely close"
|
871 |
msgstr ""
|
872 |
|
873 |
+
#: admin/includes/tab-settings.php:487
|
874 |
msgid "Action to login as a registered user."
|
875 |
msgstr ""
|
876 |
|
877 |
+
#: admin/includes/tab-settings.php:487
|
878 |
msgid "Log in"
|
879 |
msgstr ""
|
880 |
|
881 |
+
#: admin/includes/tab-settings.php:488
|
882 |
msgid "Action to register new users."
|
883 |
msgstr ""
|
884 |
|
885 |
+
#: admin/includes/tab-settings.php:488
|
886 |
msgid "Register"
|
887 |
msgstr ""
|
888 |
|
889 |
+
#: admin/includes/tab-settings.php:489
|
890 |
msgid "Action to reset a password to create a new one."
|
891 |
msgstr ""
|
892 |
|
893 |
+
#: admin/includes/tab-settings.php:489
|
894 |
msgid "Password Reset"
|
895 |
msgstr ""
|
896 |
|
897 |
+
#: admin/includes/tab-settings.php:490
|
898 |
msgid "Action to email a password to a registered user."
|
899 |
msgstr ""
|
900 |
|
901 |
+
#: admin/includes/tab-settings.php:490
|
902 |
msgid "Lost Password"
|
903 |
msgstr ""
|
904 |
|
905 |
+
#: admin/includes/tab-settings.php:491
|
906 |
msgid ""
|
907 |
"Action to show prompt to enter a password on password protected post and "
|
908 |
"page."
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: admin/includes/tab-settings.php:491
|
912 |
msgid "Password protected"
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: admin/includes/tab-settings.php:513
|
916 |
msgid ""
|
917 |
"<dfn title=\"Specify the individual action as a blocking target.\">Target "
|
918 |
"actions</dfn>"
|
919 |
msgstr ""
|
920 |
|
921 |
+
#: admin/includes/tab-settings.php:519
|
922 |
msgid "Prevent Zero-day Exploit"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: admin/includes/tab-settings.php:523
|
926 |
msgid ""
|
927 |
"It will block a request related to the services for both public facing pages "
|
928 |
"and the dashboard."
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: admin/includes/tab-settings.php:524
|
932 |
msgid ""
|
933 |
"Regardless of the country code, it will block a malicious request related to "
|
934 |
"the services only for the dashboard."
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: admin/includes/tab-settings.php:530
|
938 |
+
msgid ""
|
939 |
+
"This is applied to “XML-RPC” and “Login form” when "
|
940 |
+
"“IP address cache” in “Privacy and record settings” "
|
941 |
+
"section is enabled. Lockout period is the same as expiration time of the "
|
942 |
+
"cache."
|
943 |
+
msgstr ""
|
944 |
+
|
945 |
+
#: admin/includes/tab-settings.php:530
|
946 |
+
msgid "Max failed login attempts per IP address"
|
947 |
+
msgstr ""
|
948 |
+
|
949 |
+
#: admin/includes/tab-settings.php:571
|
950 |
msgid "admin post for logged-in user"
|
951 |
msgstr ""
|
952 |
|
953 |
+
#: admin/includes/tab-settings.php:572
|
954 |
msgid "admin post for non logged-in user"
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: admin/includes/tab-settings.php:594
|
958 |
msgid "Admin ajax/post"
|
959 |
msgstr ""
|
960 |
|
961 |
+
#: admin/includes/tab-settings.php:608
|
962 |
msgid ""
|
963 |
"Specify the action name (“action=…”) or the page name "
|
964 |
"(“page=…”) to prevent unintended blocking caused by "
|
966 |
"Zero-day Exploit” (for logged-in user)."
|
967 |
msgstr ""
|
968 |
|
969 |
+
#: admin/includes/tab-settings.php:608 admin/includes/tab-settings.php:686
|
970 |
+
#: admin/includes/tab-settings.php:746
|
971 |
msgid "Exceptions"
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: admin/includes/tab-settings.php:609
|
975 |
msgid "Toggle with non logged-in user"
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: admin/includes/tab-settings.php:612
|
979 |
msgid "Candidate actions/pages"
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: admin/includes/tab-settings.php:626
|
983 |
#, php-format
|
984 |
msgid ""
|
985 |
"Regardless of the country code, it will block a malicious request to <code>"
|
986 |
"%s⋯/*.php</code>."
|
987 |
msgstr ""
|
988 |
|
989 |
+
#: admin/includes/tab-settings.php:627
|
990 |
msgid ""
|
991 |
"Select the item which causes unintended blocking in order to exclude from "
|
992 |
"the validation target. Grayed item indicates “INACTIVE”."
|
993 |
msgstr ""
|
994 |
|
995 |
+
#: admin/includes/tab-settings.php:628
|
996 |
#, php-format
|
997 |
msgid ""
|
998 |
"It configures “%s” to validate a direct request to the PHP file "
|
1000 |
"hidden files beginning with a dot by the server's configuration."
|
1001 |
msgstr ""
|
1002 |
|
1003 |
+
#: admin/includes/tab-settings.php:629
|
1004 |
msgid "Sorry, but your server type is not supported."
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: admin/includes/tab-settings.php:630
|
1008 |
msgid ""
|
1009 |
+
"You need to click “Save Changes” button for imported settings to "
|
1010 |
+
"take effect."
|
1011 |
msgstr ""
|
1012 |
|
1013 |
+
#: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:725
|
1014 |
msgid "Force to load WP core"
|
1015 |
msgstr ""
|
1016 |
|
1018 |
msgid "Plugins area"
|
1019 |
msgstr ""
|
1020 |
|
1021 |
+
#: admin/includes/tab-settings.php:730
|
1022 |
msgid "Themes area"
|
1023 |
msgstr ""
|
1024 |
|
1025 |
+
#: admin/includes/tab-settings.php:765
|
1026 |
msgid "Front-end target settings"
|
1027 |
msgstr ""
|
1028 |
|
1029 |
+
#: admin/includes/tab-settings.php:800
|
1030 |
msgid "Follow “Validation rule settings”"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
+
#: admin/includes/tab-settings.php:842
|
1034 |
#, php-format
|
1035 |
msgid ""
|
1036 |
"<dfn title=\"You can configure a different response code from the Back-end. "
|
1038 |
"\">Response code</dfn> %s"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
+
#: admin/includes/tab-settings.php:906
|
1042 |
msgid ""
|
1043 |
"<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
+
#: admin/includes/tab-settings.php:918
|
1047 |
msgid ""
|
1048 |
"<dfn title=\"Specify the individual post type on a single page as a blocking "
|
1049 |
"target.\">Post type</dfn>"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: admin/includes/tab-settings.php:930
|
1053 |
msgid ""
|
1054 |
"<dfn title=\"Specify the individual category on a single page or archive "
|
1055 |
"page as a blocking target.\">Category</dfn>"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
+
#: admin/includes/tab-settings.php:942
|
1059 |
msgid ""
|
1060 |
"<dfn title=\"Specify the individual tag on a single page or archive page as "
|
1061 |
"a blocking target.\">Tag</dfn>"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: admin/includes/tab-settings.php:956
|
1065 |
msgid "Specify the validation target on front-end."
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: admin/includes/tab-settings.php:956
|
1069 |
msgid "Validation target"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: admin/includes/tab-settings.php:967
|
1073 |
msgid "All requests"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: admin/includes/tab-settings.php:968
|
1077 |
msgid "Specify the targets"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: admin/includes/tab-settings.php:971
|
1081 |
msgid ""
|
1082 |
"Notice that “Validation timing” is deferred till “"
|
1083 |
"wp” action hook. It means that this feature would not be compatible "
|
1084 |
"with any page caching."
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: admin/includes/tab-settings.php:981
|
1088 |
+
msgid "Specify the name of actions as exception that is invariably blocked."
|
1089 |
+
msgstr ""
|
1090 |
+
|
1091 |
+
#: admin/includes/tab-settings.php:981
|
1092 |
+
msgid "Excluded actions"
|
1093 |
+
msgstr ""
|
1094 |
+
|
1095 |
+
#: admin/includes/tab-settings.php:997
|
1096 |
msgid ""
|
1097 |
"<dfn title=\"Specify the frequency of request for certain period of time."
|
1098 |
"\">Blocking condition</dfn>"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
+
#: admin/includes/tab-settings.php:999
|
1102 |
#, php-format
|
1103 |
msgid "More than %1$s page view (PV) in %2$s seconds"
|
1104 |
msgstr ""
|
1105 |
|
1106 |
+
#: admin/includes/tab-settings.php:1007
|
1107 |
msgid ""
|
1108 |
"<dfn title=\"It will validate the frequency of request.\">Block badly-"
|
1109 |
"behaved bots and crawlers</dfn>"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: admin/includes/tab-settings.php:1024
|
1113 |
msgid ""
|
1114 |
"A part of user agent string and a qualification connected with a separator "
|
1115 |
"that indicates an applicable rule and can be “:” (pass) or "
|
1119 |
"qualification”."
|
1120 |
msgstr ""
|
1121 |
|
1122 |
+
#: admin/includes/tab-settings.php:1024
|
1123 |
msgid "UA string and qualification"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
+
#: admin/includes/tab-settings.php:1041
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1127 |
msgid ""
|
1128 |
"It enables to verify the host by reverse DNS lookup which would spend some "
|
1129 |
"server resources. If it is disabled, “HOST” and “"
|
1131 |
"return “true”."
|
1132 |
msgstr ""
|
1133 |
|
1134 |
+
#: admin/includes/tab-settings.php:1041
|
1135 |
+
msgid "Reverse DNS lookup"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: admin/includes/tab-settings.php:1058
|
1139 |
msgid ""
|
1140 |
"It enables to simulate validation without deployment. The results can be "
|
1141 |
"found as “public” in Logs."
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: admin/includes/tab-settings.php:1058
|
1145 |
msgid "Simulation mode"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: admin/includes/tab-settings.php:1076
|
1149 |
msgid "Privacy and record settings"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
+
#: admin/includes/tab-settings.php:1099
|
1153 |
msgid ""
|
1154 |
"<dfn title=\"This option restricts not to send IP address to the external "
|
1155 |
"Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
+
#: admin/includes/tab-settings.php:1114
|
1159 |
msgid ""
|
1160 |
"<dfn title=\"This option enables to record the number blocked countries and "
|
1161 |
+
"the number of blocked requests per day.\">Record “Statistics of "
|
1162 |
+
"validation”</dfn>"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
+
#: admin/includes/tab-settings.php:1129
|
1166 |
msgid "Maximum period for “Statistics” [days]"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
+
#: admin/includes/tab-settings.php:1147
|
1170 |
msgid ""
|
1171 |
"<dfn title=\"This option enables to record the IP address, country code and "
|
1172 |
"failure counter of login attempts into the cache on database to minimize the "
|
1173 |
+
"impact on site speed.\">Record “IP address cache”</dfn>"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
+
#: admin/includes/tab-settings.php:1162
|
1177 |
msgid ""
|
1178 |
"<dfn title=\"If user authentication fails consecutively beyond “Max "
|
1179 |
"number of failed login attempts per IP address”, subsequent login will "
|
1181 |
"dfn>"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
+
#: admin/includes/tab-settings.php:1178
|
1185 |
msgid ""
|
1186 |
"<dfn title=\"This option enables to record the validation logs including IP "
|
1187 |
+
"addresses.\">Record “Validation logs”</dfn>"
|
1188 |
msgstr ""
|
1189 |
|
1190 |
+
#: admin/includes/tab-settings.php:1190
|
1191 |
msgid "When blocked"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
+
#: admin/includes/tab-settings.php:1191
|
1195 |
msgid "When passed"
|
1196 |
msgstr ""
|
1197 |
|
1198 |
+
#: admin/includes/tab-settings.php:1192
|
1199 |
msgid "When “blocked” or “passed (not in whitelist)”"
|
1200 |
msgstr ""
|
1201 |
|
1202 |
+
#: admin/includes/tab-settings.php:1193
|
1203 |
msgid "Unauthenticated visitor"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
+
#: admin/includes/tab-settings.php:1194
|
1207 |
msgid "Authenticated user"
|
1208 |
msgstr ""
|
1209 |
|
1210 |
+
#: admin/includes/tab-settings.php:1195
|
1211 |
msgid "All the validation"
|
1212 |
msgstr ""
|
1213 |
|
1214 |
+
#: admin/includes/tab-settings.php:1203
|
1215 |
#, php-format
|
1216 |
msgid ""
|
1217 |
"<dfn title=\"The maximum number of entries in the logs is also limited to %d."
|
1218 |
"\">Expiration time [days] for each entry</dfn>"
|
1219 |
msgstr ""
|
1220 |
|
1221 |
+
#: admin/includes/tab-settings.php:1220
|
1222 |
msgid ""
|
1223 |
"<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
|
1224 |
"with value</dfn>"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: admin/includes/tab-settings.php:1239
|
1228 |
+
msgid "Maximum entries in “Logs”"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: admin/includes/tab-settings.php:1256
|
1232 |
msgid ""
|
1233 |
"<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
|
1234 |
"“Live update”</dfn>"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
+
#: admin/includes/tab-settings.php:1269
|
1238 |
msgid "Ordinary file"
|
1239 |
msgstr ""
|
1240 |
|
1241 |
+
#: admin/includes/tab-settings.php:1270
|
1242 |
msgid "In-Memory"
|
1243 |
msgstr ""
|
1244 |
|
1245 |
+
#: admin/includes/tab-settings.php:1273
|
1246 |
msgid "PDO_SQLITE driver not available"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
+
#: admin/includes/tab-settings.php:1274
|
1250 |
msgid ""
|
1251 |
"It takes a few tens of milliseconds as overhead. It can be safely used "
|
1252 |
"without conflict with other plugins."
|
1253 |
msgstr ""
|
1254 |
|
1255 |
+
#: admin/includes/tab-settings.php:1275
|
1256 |
msgid ""
|
1257 |
"It takes a few milliseconds as overhead. There is a possibility of conflict "
|
1258 |
"with other plugins using this method."
|
1259 |
msgstr ""
|
1260 |
|
1261 |
+
#: admin/includes/tab-settings.php:1283
|
1262 |
msgid "Reset database source of “Live update”"
|
1263 |
msgstr ""
|
1264 |
|
1265 |
+
#: admin/includes/tab-settings.php:1291
|
1266 |
msgid "Reset now"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
+
#: admin/includes/tab-settings.php:1300 admin/includes/tab-settings.php:1427
|
1270 |
msgid ""
|
1271 |
"Task could not be found in WP-Cron. Please try to deactivate this plugin "
|
1272 |
"once and activate again."
|
1273 |
msgstr ""
|
1274 |
|
1275 |
+
#: admin/includes/tab-settings.php:1305
|
1276 |
msgid ""
|
1277 |
"<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
|
1278 |
+
"expired entries in “IP address cache” and “Logs”."
|
1279 |
"\">Interval [sec] to cleanup expired entries of IP address</dfn>"
|
1280 |
msgstr ""
|
1281 |
|
1282 |
+
#: admin/includes/tab-settings.php:1314 admin/includes/tab-settings.php:1443
|
1283 |
#, php-format
|
1284 |
msgid "Next schedule: %s"
|
1285 |
msgstr ""
|
1286 |
|
1287 |
+
#: admin/includes/tab-settings.php:1321
|
1288 |
msgid "Remove all settings and records at uninstallation"
|
1289 |
msgstr ""
|
1290 |
|
1291 |
+
#: admin/includes/tab-settings.php:1338
|
1292 |
msgid "Geolocation API settings"
|
1293 |
msgstr ""
|
1294 |
|
1295 |
+
#: admin/includes/tab-settings.php:1358
|
1296 |
msgid ""
|
1297 |
+
"<dfn title=\"IP address cache and local databases are scanned at the top "
|
1298 |
"priority.\">API selection and key settings</dfn>"
|
1299 |
msgstr ""
|
1300 |
|
1301 |
+
#: admin/includes/tab-settings.php:1377
|
1302 |
msgid "Timeout for network API [sec]"
|
1303 |
msgstr ""
|
1304 |
|
1305 |
+
#: admin/includes/tab-settings.php:1395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1306 |
msgid "Local database settings"
|
1307 |
msgstr ""
|
1308 |
|
1309 |
+
#: admin/includes/tab-settings.php:1409
|
1310 |
msgid "database"
|
1311 |
msgstr ""
|
1312 |
|
1313 |
+
#: admin/includes/tab-settings.php:1410 classes/class-ip-geo-block-cron.php:418
|
1314 |
#, php-format
|
1315 |
msgid "Last update: %s"
|
1316 |
msgstr ""
|
1317 |
|
1318 |
+
#: admin/includes/tab-settings.php:1432
|
1319 |
msgid "Auto updating (once a month)"
|
1320 |
msgstr ""
|
1321 |
|
1322 |
+
#: admin/includes/tab-settings.php:1450
|
1323 |
msgid "Download database"
|
1324 |
msgstr ""
|
1325 |
|
1326 |
+
#: admin/includes/tab-settings.php:1458
|
1327 |
msgid "Download now"
|
1328 |
msgstr ""
|
1329 |
|
1330 |
+
#: admin/includes/tab-settings.php:1469
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1331 |
msgid "Plugin settings"
|
1332 |
msgstr ""
|
1333 |
|
1334 |
+
#: admin/includes/tab-settings.php:1481
|
1335 |
msgid ""
|
1336 |
"<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
|
1337 |
"settings</dfn>"
|
1338 |
msgstr ""
|
1339 |
|
1340 |
+
#: admin/includes/tab-settings.php:1499
|
1341 |
msgid ""
|
1342 |
+
"<dfn title=\"You can access to the login form with a specific key at "
|
1343 |
+
"emergency. Please add the generated link to favorites / bookmarks in your "
|
1344 |
+
"browser as this plugin does not keep the key itself.\">Emergency login link</"
|
1345 |
"dfn>"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: admin/includes/tab-settings.php:1515
|
1349 |
+
msgid ""
|
1350 |
+
"<dfn title=\"Valid key for Google Maps JavaScript API. A free tier has limit "
|
1351 |
+
"even if it's “default”. Maps Embed API without key can be "
|
1352 |
+
"available in case of empty.\">Google Maps API key</dfn>"
|
1353 |
+
msgstr ""
|
1354 |
+
|
1355 |
+
#: admin/includes/tab-settings.php:1531
|
1356 |
msgid "Export / Import settings"
|
1357 |
msgstr ""
|
1358 |
|
1359 |
+
#: admin/includes/tab-settings.php:1538
|
1360 |
msgid "Export settings"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
+
#: admin/includes/tab-settings.php:1539
|
1364 |
msgid "Import from the local file"
|
1365 |
msgstr ""
|
1366 |
|
1367 |
+
#: admin/includes/tab-settings.php:1539
|
1368 |
msgid "Import settings"
|
1369 |
msgstr ""
|
1370 |
|
1371 |
+
#: admin/includes/tab-settings.php:1547
|
1372 |
msgid "Import pre-defined settings"
|
1373 |
msgstr ""
|
1374 |
|
1375 |
+
#: admin/includes/tab-settings.php:1554
|
1376 |
msgid ""
|
1377 |
"Import the default settings to revert to the “Right after "
|
1378 |
"installing” state"
|
1379 |
msgstr ""
|
1380 |
|
1381 |
+
#: admin/includes/tab-settings.php:1554
|
1382 |
msgid "Default settings"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: admin/includes/tab-settings.php:1555
|
1386 |
msgid ""
|
1387 |
"Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
|
1388 |
"for the “Back-end target settings”"
|
1389 |
msgstr ""
|
1390 |
|
1391 |
+
#: admin/includes/tab-settings.php:1555
|
1392 |
msgid "Best for Back-end"
|
1393 |
msgstr ""
|
1394 |
|
1395 |
+
#: admin/includes/tab-settings.php:1564
|
1396 |
+
msgid "DB tables for this plugin"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1397 |
msgstr ""
|
1398 |
|
1399 |
+
#: admin/includes/tab-settings.php:1572
|
1400 |
+
msgid "Initialize now"
|
1401 |
msgstr ""
|
1402 |
|
1403 |
+
#: admin/includes/tab-settings.php:1581
|
1404 |
msgid ""
|
1405 |
"<dfn title=\"When you have some unexpected blocking experiences, please "
|
1406 |
"press the button to find the blocked requests at the end of dumped "
|
1407 |
"information which may help you to solve the issues.\">Diagnostic "
|
1408 |
"information</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
|
1409 |
+
"support/plugin/ip-geo-block\" title=\"[IP Geo Block] Support | WordPress.org"
|
1410 |
+
"\">support forum</a> ]"
|
1411 |
msgstr ""
|
1412 |
|
1413 |
+
#: admin/includes/tab-settings.php:1588
|
1414 |
+
msgid "Please copy & paste when submitting your issue to support forum"
|
1415 |
msgstr ""
|
1416 |
|
1417 |
+
#: admin/includes/tab-settings.php:1588
|
1418 |
msgid "Show information"
|
1419 |
msgstr ""
|
1420 |
|
1421 |
+
#: admin/includes/tab-settings.php:1605
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1422 |
msgid ""
|
1423 |
"While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
|
1424 |
"others will pass an IP address to the 3rd parties' API via HTTP."
|
1425 |
msgstr ""
|
1426 |
|
1427 |
+
#: admin/includes/tab-settings.php:1606
|
1428 |
msgid ""
|
1429 |
"Please select the appropriate APIs to fit the privacy law / regulation in "
|
1430 |
"your country / region."
|
1431 |
msgstr ""
|
1432 |
|
1433 |
+
#: admin/includes/tab-settings.php:1615
|
1434 |
#, php-format
|
1435 |
msgid ""
|
1436 |
"Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
|
1437 |
"2.0.0+%s."
|
1438 |
msgstr ""
|
1439 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1440 |
#: admin/includes/tab-statistics.php:19
|
1441 |
msgid "Statistics of validation"
|
1442 |
msgstr ""
|
1443 |
|
1444 |
+
#: admin/includes/tab-statistics.php:32
|
1445 |
msgid "Blocked"
|
1446 |
msgstr ""
|
1447 |
|
1448 |
+
#: admin/includes/tab-statistics.php:56
|
1449 |
msgid "Blocked by countries"
|
1450 |
msgstr ""
|
1451 |
|
1452 |
+
#: admin/includes/tab-statistics.php:96
|
1453 |
msgid "Blocked per day"
|
1454 |
msgstr ""
|
1455 |
|
1456 |
+
#: admin/includes/tab-statistics.php:111
|
1457 |
msgid "Blocked by type of IP address"
|
1458 |
msgstr ""
|
1459 |
|
1460 |
+
#: admin/includes/tab-statistics.php:128
|
1461 |
msgid "Name of API"
|
1462 |
msgstr ""
|
1463 |
|
1464 |
+
#: admin/includes/tab-statistics.php:129
|
1465 |
msgid "Call"
|
1466 |
msgstr ""
|
1467 |
|
1468 |
+
#: admin/includes/tab-statistics.php:130
|
1469 |
msgid "Response [msec]"
|
1470 |
msgstr ""
|
1471 |
|
1472 |
+
#: admin/includes/tab-statistics.php:144
|
1473 |
msgid "Average response time of each API"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
+
#: admin/includes/tab-statistics.php:159
|
1477 |
msgid "Clear statistics"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
+
#: admin/includes/tab-statistics.php:179
|
1481 |
+
msgid "Statistics in validation logs"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
+
#: admin/includes/tab-statistics.php:210
|
1485 |
+
msgid "Statistics in IP address cache"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
+
#: admin/includes/tab-statistics.php:222
|
1489 |
msgid "Search in cache"
|
1490 |
msgstr ""
|
1491 |
|
1492 |
+
#: admin/includes/tab-statistics.php:261
|
1493 |
msgid "Clear cache"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
+
#: admin/includes/tab-statistics.php:277
|
1497 |
msgid "Export cache"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
+
#: admin/includes/tab-statistics.php:300
|
1501 |
msgid "Country (Top 10)"
|
1502 |
msgstr ""
|
1503 |
|
1504 |
+
#: admin/includes/tab-statistics.php:301
|
1505 |
msgid "AS number (Top 10)"
|
1506 |
msgstr ""
|
1507 |
|
1508 |
+
#: admin/includes/tab-statistics.php:302
|
1509 |
msgid "IP address (Top 10)"
|
1510 |
msgstr ""
|
1511 |
|
1512 |
+
#: admin/includes/tab-statistics.php:303
|
1513 |
msgid "Slug in back-end"
|
1514 |
msgstr ""
|
1515 |
|
1516 |
+
#: admin/includes/tab-statistics.php:355
|
1517 |
msgid "Toggle sorting order"
|
1518 |
msgstr ""
|
1519 |
|
1520 |
+
#: admin/includes/tab-statistics.php:406
|
1521 |
#, php-format
|
1522 |
+
msgid "[ %sRecord “Statistics of validation”%s ] is disabled."
|
1523 |
msgstr ""
|
1524 |
|
1525 |
+
#: admin/includes/tab-statistics.php:407
|
1526 |
msgid ""
|
1527 |
"Please set the proper condition to record and analyze the validation "
|
1528 |
"statistics."
|
1529 |
msgstr ""
|
1530 |
|
1531 |
+
#: admin/includes/tab-statistics.php:420
|
1532 |
#, php-format
|
1533 |
+
msgid "[ %sRecord “IP address cache”%s ] is disabled."
|
1534 |
msgstr ""
|
1535 |
|
1536 |
+
#: admin/includes/tab-statistics.php:421
|
1537 |
msgid "Please set the proper condition to record IP address in cache."
|
1538 |
msgstr ""
|
1539 |
|
1540 |
+
#: classes/class-ip-geo-block-cron.php:221
|
|
|
|
|
|
|
|
|
|
|
|
|
1541 |
#, php-format
|
1542 |
msgid "Can't lock <code>%s</code>. Please try again after a while."
|
1543 |
msgstr ""
|
1544 |
|
1545 |
+
#: classes/class-ip-geo-block-cron.php:300
|
1546 |
msgid "Your database file is up-to-date."
|
1547 |
msgstr ""
|
1548 |
|
1549 |
+
#: classes/class-ip-geo-block-cron.php:399
|
1550 |
msgid "gz or zip is not supported on your system."
|
1551 |
msgstr ""
|
1552 |
|
1568 |
"details."
|
1569 |
msgstr ""
|
1570 |
|
1571 |
+
#: classes/class-ip-geo-block-logs.php:236
|
1572 |
#, php-format
|
1573 |
msgid ""
|
1574 |
"Creating a DB table %s had failed. Once de-activate this plugin, and then "
|
1575 |
"activate again."
|
1576 |
msgstr ""
|
1577 |
|
1578 |
+
#: classes/class-ip-geo-block-logs.php:241
|
1579 |
#, php-format
|
1580 |
msgid ""
|
1581 |
"Column type in %s unmatched. Once de-activate this plugin, and then activate "
|
1582 |
"again."
|
1583 |
msgstr ""
|
1584 |
|
1585 |
+
#: classes/class-ip-geo-block.php:417
|
1586 |
msgid "Dashboard"
|
1587 |
msgstr ""
|
1588 |
|
1592 |
msgid "Database file does not exist."
|
1593 |
msgstr ""
|
1594 |
|
1595 |
+
#: wp-content/mu-plugins/ip-geo-block-mu.php:72
|
1596 |
#, php-format
|
1597 |
msgid ""
|
1598 |
"Can't find IP Geo Block in your plugins directory. Please remove <code>%s</"
|
languages/ip-geo-block.pot
CHANGED
@@ -2,17 +2,17 @@
|
|
2 |
# This file is distributed under the same license as the IP Geo Block package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: IP Geo Block 3.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
|
7 |
-
"POT-Creation-Date: 2018-
|
8 |
-
"PO-Revision-Date: 2018-
|
9 |
"Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
|
10 |
"Language-Team: \n"
|
11 |
"Language: en\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
-
"X-Generator: Poedit 2.
|
16 |
"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
|
17 |
"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
|
18 |
"X-Poedit-Basepath: ..\n"
|
@@ -26,169 +26,198 @@ msgid ""
|
|
26 |
"posted from outside your nation, and also prevents zero-day exploit."
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: admin/class-ip-geo-block-admin.php:
|
30 |
-
msgid "
|
31 |
-
msgstr ""
|
32 |
-
|
33 |
-
#: admin/class-ip-geo-block-admin.php:287
|
34 |
-
msgid "Create table ?"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: admin/class-ip-geo-block-admin.php:
|
38 |
-
|
|
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: admin/class-ip-geo-block-admin.php:
|
42 |
-
msgid "
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: admin/class-ip-geo-block-admin.php:
|
46 |
-
msgid "
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: admin/class-ip-geo-block-admin.php:
|
50 |
-
msgid "
|
|
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: admin/class-ip-geo-block-admin.php:
|
54 |
msgid "ajax for logged-in user"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: admin/class-ip-geo-block-admin.php:
|
58 |
msgid "ajax for non logged-in user"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: admin/class-ip-geo-block-admin.php:
|
62 |
#, php-format
|
63 |
msgid "[Found: %d]"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: admin/class-ip-geo-block-admin.php:
|
67 |
#, php-format
|
68 |
msgid "Find and verify `%s` on “Logs” tab."
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: admin/class-ip-geo-block-admin.php:
|
72 |
msgid "This feature is available with HTML5 compliant browsers."
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: admin/class-ip-geo-block-admin.php:
|
76 |
-
msgid "The selected row cannot be found in the
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: admin/class-ip-geo-block-admin.php:
|
80 |
-
#: admin/class-ip-geo-block-admin.php:
|
81 |
#, php-format
|
82 |
msgid "An error occurred while executing the ajax command `%s`."
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: admin/class-ip-geo-block-admin.php:
|
86 |
msgid "No data available in table"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: admin/class-ip-geo-block-admin.php:
|
90 |
msgid "No matching records found"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: admin/class-ip-geo-block-admin.php:
|
94 |
-
#: admin/includes/class-admin-ajax.php:
|
95 |
-
#: admin/includes/class-admin-ajax.php:
|
96 |
-
#: admin/includes/tab-geolocation.php:
|
97 |
msgid "IP address"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: admin/class-ip-geo-block-admin.php:
|
101 |
-
#: admin/includes/class-admin-ajax.php:
|
102 |
-
#: admin/includes/class-admin-ajax.php:
|
103 |
msgid "Code"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: admin/class-ip-geo-block-admin.php:
|
107 |
-
#: admin/includes/class-admin-ajax.php:
|
108 |
-
#: admin/includes/class-admin-ajax.php:
|
109 |
msgid "ASN"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: admin/class-ip-geo-block-admin.php:
|
113 |
-
#: admin/includes/class-admin-ajax.php:
|
114 |
msgid "Host name"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: admin/class-ip-geo-block-admin.php:
|
118 |
-
#: admin/includes/class-admin-ajax.php:
|
119 |
-
#: admin/includes/class-admin-ajax.php:
|
120 |
msgid "Target"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: admin/class-ip-geo-block-admin.php:
|
124 |
-
#: admin/includes/class-admin-ajax.php:
|
125 |
msgid "Failure / Total"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: admin/class-ip-geo-block-admin.php:
|
129 |
-
#: admin/includes/class-admin-ajax.php:
|
130 |
msgid "Elapsed[sec]"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: admin/class-ip-geo-block-admin.php:
|
134 |
-
#: admin/includes/class-admin-ajax.php:
|
135 |
msgid "Time"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: admin/class-ip-geo-block-admin.php:
|
139 |
-
#: admin/includes/class-admin-ajax.php:
|
140 |
msgid "Result"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: admin/class-ip-geo-block-admin.php:
|
144 |
-
#: admin/includes/class-admin-ajax.php:
|
145 |
msgid "Request"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: admin/class-ip-geo-block-admin.php:
|
149 |
-
#: admin/includes/class-admin-ajax.php:
|
150 |
msgid "User agent"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: admin/class-ip-geo-block-admin.php:
|
154 |
-
#: admin/includes/class-admin-ajax.php:
|
155 |
msgid "HTTP headers"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: admin/class-ip-geo-block-admin.php:
|
159 |
-
#: admin/includes/class-admin-ajax.php:
|
160 |
msgid "$_POST data"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: admin/class-ip-geo-block-admin.php:
|
164 |
msgid "Contribute on GitHub"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: admin/class-ip-geo-block-admin.php:
|
168 |
-
#: admin/class-ip-geo-block-admin.php:
|
169 |
-
#: admin/class-ip-geo-block-admin.php:
|
170 |
msgid "Settings"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: admin/class-ip-geo-block-admin.php:
|
174 |
-
#: admin/class-ip-geo-block-admin.php:
|
175 |
-
#: admin/class-ip-geo-block-admin.php:
|
176 |
-
#: admin/class-ip-geo-block-admin.php:
|
177 |
-
#: admin/class-ip-geo-block-admin.php:
|
178 |
-
#: admin/class-ip-geo-block-admin.php:
|
179 |
msgid "IP Geo Block"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: admin/class-ip-geo-block-admin.php:
|
183 |
-
#: admin/class-ip-geo-block-admin.php:
|
184 |
msgid "Site List"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: admin/class-ip-geo-block-admin.php:
|
188 |
msgid "You need WordPress 3.7+."
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: admin/class-ip-geo-block-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
#, php-format
|
193 |
msgid ""
|
194 |
"Now downloading geolocation databases in background. After a little while, "
|
@@ -196,48 +225,49 @@ msgid ""
|
|
196 |
"strong>” at <a href=\"%s\">Validation rule settings</a>."
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: admin/class-ip-geo-block-admin.php:
|
200 |
#, php-format
|
201 |
msgid ""
|
202 |
"The “<strong>Matching rule</strong>” is not set properly. Please "
|
203 |
"confirm it at <a href=\"%s\">Validation rule settings</a>."
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: admin/class-ip-geo-block-admin.php:
|
207 |
msgid "Local database and matching rule have been updated."
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: admin/class-ip-geo-block-admin.php:
|
211 |
msgid ""
|
212 |
"Once you logout, you will be unable to login again because the number of "
|
213 |
"login attempts reaches the limit."
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: admin/class-ip-geo-block-admin.php:
|
217 |
#, php-format
|
218 |
msgid ""
|
219 |
-
"Please
|
220 |
-
"tab
|
|
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: admin/class-ip-geo-block-admin.php:
|
224 |
msgid ""
|
225 |
"Once you logout, you will be unable to login again because your country code "
|
226 |
"or IP address is in the blacklist."
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: admin/class-ip-geo-block-admin.php:
|
230 |
msgid ""
|
231 |
"Once you logout, you will be unable to login again because your country code "
|
232 |
"or IP address is not in the whitelist."
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: admin/class-ip-geo-block-admin.php:
|
236 |
#, php-format
|
237 |
msgid "Please check your “%sValidation rule settings%s”."
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: admin/class-ip-geo-block-admin.php:
|
241 |
#, php-format
|
242 |
msgid ""
|
243 |
"Please confirm your local geolocation databases at “%sLocal database "
|
@@ -245,120 +275,121 @@ msgid ""
|
|
245 |
"%sStatistics in cache%s” section."
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: admin/class-ip-geo-block-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
msgid ""
|
250 |
"“mu-plugins” (ip-geo-block-mu.php) at “Validation "
|
251 |
"timing” is imcompatible with <strong>IP Geo Allow</strong>. Please "
|
252 |
"select “init” action hook."
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: admin/class-ip-geo-block-admin.php:
|
256 |
msgid "Statistics"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: admin/class-ip-geo-block-admin.php:
|
260 |
msgid "Logs"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: admin/class-ip-geo-block-admin.php:
|
264 |
msgid "Search"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: admin/class-ip-geo-block-admin.php:
|
268 |
msgid "Attribution"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: admin/class-ip-geo-block-admin.php:
|
272 |
-
#: admin/class-ip-geo-block-admin.php:
|
273 |
msgid "Network wide"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: admin/class-ip-geo-block-admin.php:
|
277 |
msgid "Toggle all"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: admin/class-ip-geo-block-admin.php:
|
281 |
msgid ""
|
282 |
"Independent of “Privacy and record settings”, you can see all "
|
283 |
"the requests validated by this plugin in almost real time."
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: admin/class-ip-geo-block-admin.php:
|
287 |
msgid "Live update"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: admin/class-ip-geo-block-admin.php:
|
291 |
msgid "Open a new window on clicking the link in the chart."
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: admin/class-ip-geo-block-admin.php:
|
295 |
-
msgid "Open a new window"
|
296 |
-
msgstr ""
|
297 |
-
|
298 |
-
#: admin/class-ip-geo-block-admin.php:773
|
299 |
msgid "Thanks for providing these great services for free."
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: admin/class-ip-geo-block-admin.php:
|
303 |
msgid ""
|
304 |
-
"(Most browsers will redirect you to each site <a href=\"
|
305 |
"ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
|
306 |
"when you click the link</a>.)"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: admin/class-ip-geo-block-admin.php:
|
310 |
msgid "Back to top"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: admin/class-ip-geo-block-admin.php:
|
314 |
msgid "Enable"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: admin/class-ip-geo-block-admin.php:
|
318 |
msgid "Select one"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: admin/class-ip-geo-block-admin.php:
|
322 |
msgid "You do not have sufficient permissions to access this page."
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: admin/class-ip-geo-block-admin.php:
|
326 |
#: admin/includes/class-admin-rewrite.php:194
|
327 |
-
#: classes/class-ip-geo-block-cron.php:
|
328 |
-
#: classes/class-ip-geo-block-cron.php:
|
329 |
-
#: classes/class-ip-geo-block-cron.php:
|
330 |
-
#: classes/class-ip-geo-block-opts.php:
|
331 |
#, php-format
|
332 |
msgid "Unable to write <code>%s</code>. Please check the permission."
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: admin/class-ip-geo-block-admin.php:
|
336 |
msgid "Settings saved."
|
337 |
msgstr ""
|
338 |
|
339 |
#: admin/includes/class-admin-ajax.php:72
|
|
|
|
|
340 |
msgid "n/a"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: admin/includes/class-admin-ajax.php:
|
344 |
-
#: admin/includes/tab-settings.php:95
|
345 |
-
msgid "UNKNOWN"
|
346 |
-
msgstr ""
|
347 |
-
|
348 |
-
#: admin/includes/class-admin-ajax.php:203
|
349 |
#, php-format
|
350 |
msgid "The user %s (user ID: %d) is in use."
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: admin/includes/class-admin-ajax.php:
|
354 |
#, php-format
|
355 |
msgid ""
|
356 |
"illegal format at %s. Please delete the corresponding line and try again."
|
357 |
msgstr ""
|
358 |
|
359 |
#: admin/includes/class-admin-rewrite.php:168
|
360 |
-
#: classes/class-ip-geo-block-cron.php:
|
361 |
-
#: classes/class-ip-geo-block-cron.php:
|
362 |
#, php-format
|
363 |
msgid "Unable to read <code>%s</code>. Please check the permission."
|
364 |
msgstr ""
|
@@ -378,32 +409,31 @@ msgstr ""
|
|
378 |
msgid "Validation logs"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:
|
382 |
-
#: admin/includes/tab-settings.php:1425
|
383 |
msgid "Help"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: admin/includes/tab-accesslog.php:
|
387 |
msgid "Comment post"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: admin/includes/tab-accesslog.php:
|
391 |
msgid "XML-RPC"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: admin/includes/tab-accesslog.php:
|
395 |
msgid "Login form"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: admin/includes/tab-accesslog.php:
|
399 |
msgid "Admin area"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: admin/includes/tab-accesslog.php:
|
403 |
msgid "Public facing pages"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: admin/includes/tab-accesslog.php:
|
407 |
msgid "All"
|
408 |
msgstr ""
|
409 |
|
@@ -411,101 +441,105 @@ msgstr ""
|
|
411 |
msgid "Select target"
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: admin/includes/tab-accesslog.php:
|
415 |
msgid "Search in logs"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: admin/includes/tab-accesslog.php:
|
419 |
msgid "Reset"
|
420 |
msgstr ""
|
421 |
|
422 |
-
#: admin/includes/tab-accesslog.php:
|
|
|
|
|
|
|
|
|
423 |
msgid "Bulk action"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: admin/includes/tab-accesslog.php:
|
427 |
msgid "Remove entries by IP address"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: admin/includes/tab-accesslog.php:
|
431 |
msgid "Add IP address to “Whitelist”"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: admin/includes/tab-accesslog.php:
|
435 |
msgid "Add IP address to “Blacklist”"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: admin/includes/tab-accesslog.php:
|
439 |
msgid "Add AS number to “Whitelist”"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#: admin/includes/tab-accesslog.php:
|
443 |
msgid "Add AS number to “Blacklist”"
|
444 |
msgstr ""
|
445 |
|
446 |
-
#: admin/includes/tab-accesslog.php:
|
447 |
-
#: admin/includes/tab-statistics.php:
|
448 |
msgid "Apply"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: admin/includes/tab-accesslog.php:
|
452 |
msgid "Clear logs"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: admin/includes/tab-accesslog.php:
|
456 |
-
#: admin/includes/tab-statistics.php:
|
457 |
msgid "Clear all"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: admin/includes/tab-accesslog.php:
|
461 |
msgid "Export logs"
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: admin/includes/tab-accesslog.php:
|
465 |
-
#: admin/includes/tab-statistics.php:
|
466 |
msgid "Export to the local file"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: admin/includes/tab-accesslog.php:
|
470 |
msgid "Export csv"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: admin/includes/tab-accesslog.php:
|
474 |
-
#: admin/includes/tab-statistics.php:
|
475 |
#, php-format
|
476 |
-
msgid "[ %sRecord “
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: admin/includes/tab-accesslog.php:
|
480 |
-
#: admin/includes/tab-statistics.php:
|
481 |
msgid ""
|
482 |
"Please set the proper condition to record and analyze the validation logs."
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: admin/includes/tab-attribution.php:
|
486 |
msgid "Attribution links"
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: admin/includes/tab-geolocation.php:
|
490 |
msgid "Search IP address geolocation"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: admin/includes/tab-geolocation.php:
|
494 |
msgid "Geolocation API"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: admin/includes/tab-geolocation.php:
|
498 |
msgid ""
|
499 |
"<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
|
500 |
"Moreover, this option replaces the end of IP address with “***” "
|
501 |
"to make it anonymous.\">Anonymize IP address</dfn>"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: admin/includes/tab-geolocation.php:
|
505 |
msgid "Search geolocation"
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: admin/includes/tab-geolocation.php:
|
509 |
msgid "Search now"
|
510 |
msgstr ""
|
511 |
|
@@ -521,66 +555,94 @@ msgstr ""
|
|
521 |
msgid "Columns"
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: admin/includes/tab-network.php:
|
525 |
msgid "Chart display layout"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: admin/includes/tab-network.php:
|
529 |
msgid "Latest 1 hour"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: admin/includes/tab-network.php:
|
533 |
msgid "Latest 24 hours"
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: admin/includes/tab-network.php:
|
537 |
msgid "Latest 1 week"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: admin/includes/tab-network.php:
|
541 |
msgid "Duration to retrieve"
|
542 |
msgstr ""
|
543 |
|
544 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
msgid "Validation rule settings"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: admin/includes/tab-settings.php:
|
549 |
msgid ""
|
550 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
551 |
"code by referring “Scan country code”.\">Your IP address / "
|
552 |
"Country</dfn>"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: admin/includes/tab-settings.php:
|
556 |
msgid "Scan all the APIs you selected at Geolocation API settings"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: admin/includes/tab-settings.php:
|
560 |
msgid "Scan country code"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: admin/includes/tab-settings.php:
|
564 |
msgid ""
|
565 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
566 |
"code by referring “Scan country code”.\">Server IP address / "
|
567 |
"Country</dfn>"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: admin/includes/tab-settings.php:
|
571 |
msgid "Whitelist"
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: admin/includes/tab-settings.php:
|
575 |
msgid "Blacklist"
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: admin/includes/tab-settings.php:
|
579 |
msgid ""
|
580 |
"Please select either “Whitelist” or “Blacklist”."
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: admin/includes/tab-settings.php:
|
584 |
msgid ""
|
585 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
586 |
"empty. The special code “XX” is assigned as private IP address "
|
@@ -590,7 +652,7 @@ msgid ""
|
|
590 |
"country code</dfn>"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: admin/includes/tab-settings.php:
|
594 |
msgid ""
|
595 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
596 |
"empty. The special code “XX” is assigned as private IP address "
|
@@ -600,76 +662,48 @@ msgid ""
|
|
600 |
"country code</dfn>"
|
601 |
msgstr ""
|
602 |
|
603 |
-
#: admin/includes/tab-settings.php:
|
604 |
-
msgid "(comma separated)"
|
605 |
-
msgstr ""
|
606 |
-
|
607 |
-
#: admin/includes/tab-settings.php:116
|
608 |
-
msgid "(comma or RET separated)"
|
609 |
-
msgstr ""
|
610 |
-
|
611 |
-
#: admin/includes/tab-settings.php:117
|
612 |
-
msgid "Toggle selection"
|
613 |
-
msgstr ""
|
614 |
-
|
615 |
-
#: admin/includes/tab-settings.php:118
|
616 |
-
msgid "Find blocked requests in “Logs“"
|
617 |
-
msgstr ""
|
618 |
-
|
619 |
-
#: admin/includes/tab-settings.php:119
|
620 |
-
msgid ""
|
621 |
-
"Before adding as “Exception”, please click on “<a class="
|
622 |
-
"\"ip-geo-block-icon ip-geo-block-icon-alert\" title=\"This button is just a "
|
623 |
-
"sample.\"><span></span></a>” button (if exists) attached to the "
|
624 |
-
"following list to confirm that the blocked request is not malicious."
|
625 |
-
msgstr ""
|
626 |
-
|
627 |
-
#: admin/includes/tab-settings.php:120
|
628 |
-
msgid "Open CIDR calculator for IPv4 / IPv6."
|
629 |
-
msgstr ""
|
630 |
-
|
631 |
-
#: admin/includes/tab-settings.php:127 admin/includes/tab-settings.php:794
|
632 |
msgid "Matching rule"
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: admin/includes/tab-settings.php:
|
636 |
msgid ""
|
637 |
"A request from which the country code or IP address is <strong>NOT</strong> "
|
638 |
"in the whitelist will be blocked."
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: admin/includes/tab-settings.php:
|
642 |
msgid ""
|
643 |
"A request from which the country code or IP address is in the blacklist will "
|
644 |
"be blocked."
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: admin/includes/tab-settings.php:
|
648 |
msgid ""
|
649 |
"<dfn title=\"It enables utilizing “AS number” in the “"
|
650 |
"Whitelist/Blacklist of extra IP addresses” to specify a group of IP "
|
651 |
"networks.\">Use Autonomous System Number</dfn>"
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: admin/includes/tab-settings.php:
|
655 |
#, php-format
|
656 |
msgid "Some useful tools to find ASN are introduced in “%s”."
|
657 |
msgstr ""
|
658 |
|
659 |
-
#: admin/includes/tab-settings.php:
|
660 |
msgid ""
|
661 |
"<dfn title=\"e.g. “192.0.64.0/18” for Jetpack server, "
|
662 |
"“69.46.36.0/27” for WordFence server or “AS32934” "
|
663 |
"for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: admin/includes/tab-settings.php:
|
667 |
msgid ""
|
668 |
"<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
|
669 |
"\">Blacklist of extra IP addresses prior to country code</dfn>"
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: admin/includes/tab-settings.php:
|
673 |
msgid ""
|
674 |
"<dfn title=\"If your server is placed behind the proxy server or the load "
|
675 |
"balancing server, you need to put the appropriate key such as “"
|
@@ -678,7 +712,7 @@ msgid ""
|
|
678 |
"addresses</dfn>"
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: admin/includes/tab-settings.php:
|
682 |
msgid ""
|
683 |
"<dfn title=\"It validates malicious signatures independently of “Block "
|
684 |
"by country” and “Prevent Zero-day Exploit” for the target "
|
@@ -689,18 +723,18 @@ msgid ""
|
|
689 |
"please click to restore.\"><span></span></a>)</nobr>"
|
690 |
msgstr ""
|
691 |
|
692 |
-
#: admin/includes/tab-settings.php:
|
693 |
msgid ""
|
694 |
"<dfn title=\"Select allowed MIME type.\">Whitelist of allowed MIME type</dfn>"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: admin/includes/tab-settings.php:
|
698 |
msgid ""
|
699 |
"<dfn title=\"Put forbidden file extensions.\">Blacklist of forbidden file "
|
700 |
"extensions</dfn>"
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: admin/includes/tab-settings.php:
|
704 |
msgid ""
|
705 |
"<dfn title=\"Specify the capabilities to be verified. Depending on the "
|
706 |
"particular type of uploader, certain capability may be required. Default is "
|
@@ -708,14 +742,14 @@ msgid ""
|
|
708 |
"verification will be skipped if empty.\">Capabilities to be verified</dfn>"
|
709 |
msgstr ""
|
710 |
|
711 |
-
#: admin/includes/tab-settings.php:
|
712 |
msgid ""
|
713 |
"( See “<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
|
714 |
"Roles_and_Capabilities\" title=\"Roles and Capabilities « WordPress "
|
715 |
"Codex\">Roles and Capabilities</a>” )"
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: admin/includes/tab-settings.php:
|
719 |
msgid ""
|
720 |
"<dfn title=\"It restricts the file types on upload in order to block malware "
|
721 |
"and backdoor via both back-end and front-end. Please consider to select "
|
@@ -724,35 +758,27 @@ msgid ""
|
|
724 |
"this validation.\">Prevent malicious file uploading</dfn>"
|
725 |
msgstr ""
|
726 |
|
727 |
-
#: admin/includes/tab-settings.php:
|
728 |
-
#: admin/includes/tab-settings.php:
|
729 |
msgid "Disable"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: admin/includes/tab-settings.php:
|
733 |
msgid "Verify file extension and MIME type"
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: admin/includes/tab-settings.php:
|
737 |
msgid "Verify file extension only"
|
738 |
msgstr ""
|
739 |
|
740 |
-
#: admin/includes/tab-settings.php:
|
741 |
-
msgid ""
|
742 |
-
"<dfn title=\"This is applied to “XML-RPC” and “Login "
|
743 |
-
"form”. Lockout period is defined as expiration time of “IP "
|
744 |
-
"address Cache” in “Privacy and record settings” section."
|
745 |
-
"\">Max number of failed login attempts per IP address</dfn>"
|
746 |
-
msgstr ""
|
747 |
-
|
748 |
-
#: admin/includes/tab-settings.php:355
|
749 |
#, php-format
|
750 |
msgid ""
|
751 |
"<dfn title=\"You can put your original 403.php and so on into your theme "
|
752 |
"directory.\">Response code</dfn> %s"
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: admin/includes/tab-settings.php:
|
756 |
msgid ""
|
757 |
"<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
|
758 |
"to a public facing page, visitors would not be blocked on the page to "
|
@@ -761,146 +787,178 @@ msgid ""
|
|
761 |
"\">Redirect URL</dfn>"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: admin/includes/tab-settings.php:
|
765 |
msgid ""
|
766 |
"<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
|
767 |
"message</dfn>"
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: admin/includes/tab-settings.php:
|
771 |
msgid "Select when to run the validation."
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: admin/includes/tab-settings.php:
|
775 |
msgid "Validation timing"
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: admin/includes/tab-settings.php:
|
779 |
msgid "“init” action hook"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: admin/includes/tab-settings.php:
|
783 |
msgid "“mu-plugins” (ip-geo-block-mu.php)"
|
784 |
msgstr ""
|
785 |
|
786 |
-
#: admin/includes/tab-settings.php:
|
787 |
msgid ""
|
788 |
"Validate at “init” action hook in the same manner as typical "
|
789 |
"plugins."
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: admin/includes/tab-settings.php:
|
793 |
msgid ""
|
794 |
"Validate at an earlier phase than other typical plugins. It can reduce load "
|
795 |
-
"on server but has <a rel='noreferrer' href='
|
796 |
"validation-timing.html' title='Validation timing | IP Geo Block'>some "
|
797 |
"restrictions</a>."
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: admin/includes/tab-settings.php:
|
801 |
msgid "Back-end target settings"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: admin/includes/tab-settings.php:
|
805 |
#, php-format
|
806 |
msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: admin/includes/tab-settings.php:
|
810 |
msgid "Other areas"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: admin/includes/tab-settings.php:
|
814 |
msgid "public facing pages"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: admin/includes/tab-settings.php:
|
818 |
-
#: admin/includes/tab-settings.php:
|
819 |
-
#: admin/includes/tab-settings.php:
|
820 |
msgid "Block by country"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
824 |
msgid "Completely close"
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: admin/includes/tab-settings.php:
|
828 |
msgid "Action to login as a registered user."
|
829 |
msgstr ""
|
830 |
|
831 |
-
#: admin/includes/tab-settings.php:
|
832 |
msgid "Log in"
|
833 |
msgstr ""
|
834 |
|
835 |
-
#: admin/includes/tab-settings.php:
|
836 |
msgid "Action to register new users."
|
837 |
msgstr ""
|
838 |
|
839 |
-
#: admin/includes/tab-settings.php:
|
840 |
msgid "Register"
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: admin/includes/tab-settings.php:
|
844 |
msgid "Action to reset a password to create a new one."
|
845 |
msgstr ""
|
846 |
|
847 |
-
#: admin/includes/tab-settings.php:
|
848 |
msgid "Password Reset"
|
849 |
msgstr ""
|
850 |
|
851 |
-
#: admin/includes/tab-settings.php:
|
852 |
msgid "Action to email a password to a registered user."
|
853 |
msgstr ""
|
854 |
|
855 |
-
#: admin/includes/tab-settings.php:
|
856 |
msgid "Lost Password"
|
857 |
msgstr ""
|
858 |
|
859 |
-
#: admin/includes/tab-settings.php:
|
860 |
msgid ""
|
861 |
"Action to show prompt to enter a password on password protected post and "
|
862 |
"page."
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: admin/includes/tab-settings.php:
|
866 |
msgid "Password protected"
|
867 |
msgstr ""
|
868 |
|
869 |
-
#: admin/includes/tab-settings.php:
|
870 |
msgid ""
|
871 |
"<dfn title=\"Specify the individual action as a blocking target.\">Target "
|
872 |
"actions</dfn>"
|
873 |
msgstr ""
|
874 |
|
875 |
-
#: admin/includes/tab-settings.php:
|
876 |
msgid "Prevent Zero-day Exploit"
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: admin/includes/tab-settings.php:
|
880 |
msgid ""
|
881 |
"It will block a request related to the services for both public facing pages "
|
882 |
"and the dashboard."
|
883 |
msgstr ""
|
884 |
|
885 |
-
#: admin/includes/tab-settings.php:
|
886 |
msgid ""
|
887 |
"Regardless of the country code, it will block a malicious request related to "
|
888 |
"the services only for the dashboard."
|
889 |
msgstr ""
|
890 |
|
891 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
msgid "admin post for logged-in user"
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: admin/includes/tab-settings.php:
|
896 |
msgid "admin post for non logged-in user"
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: admin/includes/tab-settings.php:
|
900 |
msgid "Admin ajax/post"
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: admin/includes/tab-settings.php:
|
904 |
msgid ""
|
905 |
"Specify the action name (“action=…”) or the page name "
|
906 |
"(“page=…”) to prevent unintended blocking caused by "
|
@@ -908,33 +966,33 @@ msgid ""
|
|
908 |
"Zero-day Exploit” (for logged-in user)."
|
909 |
msgstr ""
|
910 |
|
911 |
-
#: admin/includes/tab-settings.php:
|
912 |
-
#: admin/includes/tab-settings.php:
|
913 |
msgid "Exceptions"
|
914 |
msgstr ""
|
915 |
|
916 |
-
#: admin/includes/tab-settings.php:
|
917 |
msgid "Toggle with non logged-in user"
|
918 |
msgstr ""
|
919 |
|
920 |
-
#: admin/includes/tab-settings.php:
|
921 |
msgid "Candidate actions/pages"
|
922 |
msgstr ""
|
923 |
|
924 |
-
#: admin/includes/tab-settings.php:
|
925 |
#, php-format
|
926 |
msgid ""
|
927 |
"Regardless of the country code, it will block a malicious request to <code>"
|
928 |
"%s⋯/*.php</code>."
|
929 |
msgstr ""
|
930 |
|
931 |
-
#: admin/includes/tab-settings.php:
|
932 |
msgid ""
|
933 |
"Select the item which causes unintended blocking in order to exclude from "
|
934 |
"the validation target. Grayed item indicates “INACTIVE”."
|
935 |
msgstr ""
|
936 |
|
937 |
-
#: admin/includes/tab-settings.php:
|
938 |
#, php-format
|
939 |
msgid ""
|
940 |
"It configures “%s” to validate a direct request to the PHP file "
|
@@ -942,17 +1000,17 @@ msgid ""
|
|
942 |
"hidden files beginning with a dot by the server's configuration."
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: admin/includes/tab-settings.php:
|
946 |
msgid "Sorry, but your server type is not supported."
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: admin/includes/tab-settings.php:
|
950 |
msgid ""
|
951 |
-
"You need to click
|
952 |
-
"
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:
|
956 |
msgid "Force to load WP core"
|
957 |
msgstr ""
|
958 |
|
@@ -960,19 +1018,19 @@ msgstr ""
|
|
960 |
msgid "Plugins area"
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: admin/includes/tab-settings.php:
|
964 |
msgid "Themes area"
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: admin/includes/tab-settings.php:
|
968 |
msgid "Front-end target settings"
|
969 |
msgstr ""
|
970 |
|
971 |
-
#: admin/includes/tab-settings.php:
|
972 |
msgid "Follow “Validation rule settings”"
|
973 |
msgstr ""
|
974 |
|
975 |
-
#: admin/includes/tab-settings.php:
|
976 |
#, php-format
|
977 |
msgid ""
|
978 |
"<dfn title=\"You can configure a different response code from the Back-end. "
|
@@ -980,70 +1038,78 @@ msgid ""
|
|
980 |
"\">Response code</dfn> %s"
|
981 |
msgstr ""
|
982 |
|
983 |
-
#: admin/includes/tab-settings.php:
|
984 |
msgid ""
|
985 |
"<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: admin/includes/tab-settings.php:
|
989 |
msgid ""
|
990 |
"<dfn title=\"Specify the individual post type on a single page as a blocking "
|
991 |
"target.\">Post type</dfn>"
|
992 |
msgstr ""
|
993 |
|
994 |
-
#: admin/includes/tab-settings.php:
|
995 |
msgid ""
|
996 |
"<dfn title=\"Specify the individual category on a single page or archive "
|
997 |
"page as a blocking target.\">Category</dfn>"
|
998 |
msgstr ""
|
999 |
|
1000 |
-
#: admin/includes/tab-settings.php:
|
1001 |
msgid ""
|
1002 |
"<dfn title=\"Specify the individual tag on a single page or archive page as "
|
1003 |
"a blocking target.\">Tag</dfn>"
|
1004 |
msgstr ""
|
1005 |
|
1006 |
-
#: admin/includes/tab-settings.php:
|
1007 |
msgid "Specify the validation target on front-end."
|
1008 |
msgstr ""
|
1009 |
|
1010 |
-
#: admin/includes/tab-settings.php:
|
1011 |
msgid "Validation target"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
-
#: admin/includes/tab-settings.php:
|
1015 |
msgid "All requests"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
-
#: admin/includes/tab-settings.php:
|
1019 |
msgid "Specify the targets"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
-
#: admin/includes/tab-settings.php:
|
1023 |
msgid ""
|
1024 |
"Notice that “Validation timing” is deferred till “"
|
1025 |
"wp” action hook. It means that this feature would not be compatible "
|
1026 |
"with any page caching."
|
1027 |
msgstr ""
|
1028 |
|
1029 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1030 |
msgid ""
|
1031 |
"<dfn title=\"Specify the frequency of request for certain period of time."
|
1032 |
"\">Blocking condition</dfn>"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#: admin/includes/tab-settings.php:
|
1036 |
#, php-format
|
1037 |
msgid "More than %1$s page view (PV) in %2$s seconds"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
-
#: admin/includes/tab-settings.php:
|
1041 |
msgid ""
|
1042 |
"<dfn title=\"It will validate the frequency of request.\">Block badly-"
|
1043 |
"behaved bots and crawlers</dfn>"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
-
#: admin/includes/tab-settings.php:
|
1047 |
msgid ""
|
1048 |
"A part of user agent string and a qualification connected with a separator "
|
1049 |
"that indicates an applicable rule and can be “:” (pass) or "
|
@@ -1053,19 +1119,11 @@ msgid ""
|
|
1053 |
"qualification”."
|
1054 |
msgstr ""
|
1055 |
|
1056 |
-
#: admin/includes/tab-settings.php:
|
1057 |
msgid "UA string and qualification"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
-
#: admin/includes/tab-settings.php:
|
1061 |
-
msgid "Specify the name of actions as exception that is invariably blocked."
|
1062 |
-
msgstr ""
|
1063 |
-
|
1064 |
-
#: admin/includes/tab-settings.php:1036
|
1065 |
-
msgid "Excluded actions"
|
1066 |
-
msgstr ""
|
1067 |
-
|
1068 |
-
#: admin/includes/tab-settings.php:1055
|
1069 |
msgid ""
|
1070 |
"It enables to verify the host by reverse DNS lookup which would spend some "
|
1071 |
"server resources. If it is disabled, “HOST” and “"
|
@@ -1073,49 +1131,49 @@ msgid ""
|
|
1073 |
"return “true”."
|
1074 |
msgstr ""
|
1075 |
|
1076 |
-
#: admin/includes/tab-settings.php:
|
1077 |
-
msgid "DNS
|
1078 |
msgstr ""
|
1079 |
|
1080 |
-
#: admin/includes/tab-settings.php:
|
1081 |
msgid ""
|
1082 |
"It enables to simulate validation without deployment. The results can be "
|
1083 |
"found as “public” in Logs."
|
1084 |
msgstr ""
|
1085 |
|
1086 |
-
#: admin/includes/tab-settings.php:
|
1087 |
msgid "Simulation mode"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
-
#: admin/includes/tab-settings.php:
|
1091 |
msgid "Privacy and record settings"
|
1092 |
msgstr ""
|
1093 |
|
1094 |
-
#: admin/includes/tab-settings.php:
|
1095 |
msgid ""
|
1096 |
"<dfn title=\"This option restricts not to send IP address to the external "
|
1097 |
"Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
-
#: admin/includes/tab-settings.php:
|
1101 |
msgid ""
|
1102 |
"<dfn title=\"This option enables to record the number blocked countries and "
|
1103 |
-
"the number of blocked requests per day.\">Record “Statistics
|
1104 |
-
"dfn>"
|
1105 |
msgstr ""
|
1106 |
|
1107 |
-
#: admin/includes/tab-settings.php:
|
1108 |
msgid "Maximum period for “Statistics” [days]"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
-
#: admin/includes/tab-settings.php:
|
1112 |
msgid ""
|
1113 |
"<dfn title=\"This option enables to record the IP address, country code and "
|
1114 |
"failure counter of login attempts into the cache on database to minimize the "
|
1115 |
-
"impact on site speed.\">Record “IP address
|
1116 |
msgstr ""
|
1117 |
|
1118 |
-
#: admin/includes/tab-settings.php:
|
1119 |
msgid ""
|
1120 |
"<dfn title=\"If user authentication fails consecutively beyond “Max "
|
1121 |
"number of failed login attempts per IP address”, subsequent login will "
|
@@ -1123,456 +1181,372 @@ msgid ""
|
|
1123 |
"dfn>"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
-
#: admin/includes/tab-settings.php:
|
1127 |
msgid ""
|
1128 |
"<dfn title=\"This option enables to record the validation logs including IP "
|
1129 |
-
"addresses.\">Record “
|
1130 |
msgstr ""
|
1131 |
|
1132 |
-
#: admin/includes/tab-settings.php:
|
1133 |
msgid "When blocked"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
-
#: admin/includes/tab-settings.php:
|
1137 |
msgid "When passed"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
-
#: admin/includes/tab-settings.php:
|
1141 |
msgid "When “blocked” or “passed (not in whitelist)”"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
-
#: admin/includes/tab-settings.php:
|
1145 |
msgid "Unauthenticated visitor"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
-
#: admin/includes/tab-settings.php:
|
1149 |
msgid "Authenticated user"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
-
#: admin/includes/tab-settings.php:
|
1153 |
msgid "All the validation"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
-
#: admin/includes/tab-settings.php:
|
1157 |
#, php-format
|
1158 |
msgid ""
|
1159 |
"<dfn title=\"The maximum number of entries in the logs is also limited to %d."
|
1160 |
"\">Expiration time [days] for each entry</dfn>"
|
1161 |
msgstr ""
|
1162 |
|
1163 |
-
#: admin/includes/tab-settings.php:
|
1164 |
msgid ""
|
1165 |
"<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
|
1166 |
"with value</dfn>"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
-
#: admin/includes/tab-settings.php:
|
1170 |
-
msgid "Maximum entries
|
1171 |
msgstr ""
|
1172 |
|
1173 |
-
#: admin/includes/tab-settings.php:
|
1174 |
msgid ""
|
1175 |
"<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
|
1176 |
"“Live update”</dfn>"
|
1177 |
msgstr ""
|
1178 |
|
1179 |
-
#: admin/includes/tab-settings.php:
|
1180 |
msgid "Ordinary file"
|
1181 |
msgstr ""
|
1182 |
|
1183 |
-
#: admin/includes/tab-settings.php:
|
1184 |
msgid "In-Memory"
|
1185 |
msgstr ""
|
1186 |
|
1187 |
-
#: admin/includes/tab-settings.php:
|
1188 |
msgid "PDO_SQLITE driver not available"
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#: admin/includes/tab-settings.php:
|
1192 |
msgid ""
|
1193 |
"It takes a few tens of milliseconds as overhead. It can be safely used "
|
1194 |
"without conflict with other plugins."
|
1195 |
msgstr ""
|
1196 |
|
1197 |
-
#: admin/includes/tab-settings.php:
|
1198 |
msgid ""
|
1199 |
"It takes a few milliseconds as overhead. There is a possibility of conflict "
|
1200 |
"with other plugins using this method."
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#: admin/includes/tab-settings.php:
|
1204 |
msgid "Reset database source of “Live update”"
|
1205 |
msgstr ""
|
1206 |
|
1207 |
-
#: admin/includes/tab-settings.php:
|
1208 |
msgid "Reset now"
|
1209 |
msgstr ""
|
1210 |
|
1211 |
-
#: admin/includes/tab-settings.php:
|
1212 |
msgid ""
|
1213 |
"Task could not be found in WP-Cron. Please try to deactivate this plugin "
|
1214 |
"once and activate again."
|
1215 |
msgstr ""
|
1216 |
|
1217 |
-
#: admin/includes/tab-settings.php:
|
1218 |
msgid ""
|
1219 |
"<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
|
1220 |
-
"expired entries in “IP address
|
1221 |
"\">Interval [sec] to cleanup expired entries of IP address</dfn>"
|
1222 |
msgstr ""
|
1223 |
|
1224 |
-
#: admin/includes/tab-settings.php:
|
1225 |
#, php-format
|
1226 |
msgid "Next schedule: %s"
|
1227 |
msgstr ""
|
1228 |
|
1229 |
-
#: admin/includes/tab-settings.php:
|
1230 |
msgid "Remove all settings and records at uninstallation"
|
1231 |
msgstr ""
|
1232 |
|
1233 |
-
#: admin/includes/tab-settings.php:
|
1234 |
msgid "Geolocation API settings"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
-
#: admin/includes/tab-settings.php:
|
1238 |
msgid ""
|
1239 |
-
"<dfn title=\"IP address
|
1240 |
"priority.\">API selection and key settings</dfn>"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#: admin/includes/tab-settings.php:
|
1244 |
msgid "Timeout for network API [sec]"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
-
#: admin/includes/tab-settings.php:
|
1248 |
-
#, php-format
|
1249 |
-
msgid ""
|
1250 |
-
"Can not find Geolocation API libraries in <code>%s</code>. It seems to have "
|
1251 |
-
"failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
|
1252 |
-
"tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
|
1253 |
-
"contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
|
1254 |
-
"from <a rel=\"noreferrer\" href=\"https://github.com/tokkonopapa/WordPress-"
|
1255 |
-
"IP-Geo-API\" title=\"tokkonopapa/WordPress-IP-Geo-API - GitHub\">WordPress-"
|
1256 |
-
"IP-Geo-API</a>. Please install <code>ip-geo-api</code> with write permission "
|
1257 |
-
"according to <a rel=\"noreferrer\" href=\"http://www.ipgeoblock.com/codex/"
|
1258 |
-
"how-to-fix-permission-troubles.html\" title=\"How can I fix permission "
|
1259 |
-
"troubles? | IP Geo Block\">this instruction</a>."
|
1260 |
-
msgstr ""
|
1261 |
-
|
1262 |
-
#: admin/includes/tab-settings.php:1425
|
1263 |
msgid "Local database settings"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: admin/includes/tab-settings.php:
|
1267 |
msgid "database"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
-
#: admin/includes/tab-settings.php:
|
1271 |
#, php-format
|
1272 |
msgid "Last update: %s"
|
1273 |
msgstr ""
|
1274 |
|
1275 |
-
#: admin/includes/tab-settings.php:
|
1276 |
msgid "Auto updating (once a month)"
|
1277 |
msgstr ""
|
1278 |
|
1279 |
-
#: admin/includes/tab-settings.php:
|
1280 |
msgid "Download database"
|
1281 |
msgstr ""
|
1282 |
|
1283 |
-
#: admin/includes/tab-settings.php:
|
1284 |
msgid "Download now"
|
1285 |
msgstr ""
|
1286 |
|
1287 |
-
#: admin/includes/tab-settings.php:
|
1288 |
-
msgid "Submission settings"
|
1289 |
-
msgstr ""
|
1290 |
-
|
1291 |
-
#: admin/includes/tab-settings.php:1512
|
1292 |
-
msgid "The whole will be wrapped by <p> tag. Allowed tags: "
|
1293 |
-
msgstr ""
|
1294 |
-
|
1295 |
-
#: admin/includes/tab-settings.php:1512
|
1296 |
-
msgid "Message on comment form"
|
1297 |
-
msgstr ""
|
1298 |
-
|
1299 |
-
#: admin/includes/tab-settings.php:1524
|
1300 |
-
msgid "None"
|
1301 |
-
msgstr ""
|
1302 |
-
|
1303 |
-
#: admin/includes/tab-settings.php:1525
|
1304 |
-
msgid "Top"
|
1305 |
-
msgstr ""
|
1306 |
-
|
1307 |
-
#: admin/includes/tab-settings.php:1526
|
1308 |
-
msgid "Bottom"
|
1309 |
-
msgstr ""
|
1310 |
-
|
1311 |
-
#: admin/includes/tab-settings.php:1537
|
1312 |
msgid "Plugin settings"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
-
#: admin/includes/tab-settings.php:
|
1316 |
msgid ""
|
1317 |
"<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
|
1318 |
"settings</dfn>"
|
1319 |
msgstr ""
|
1320 |
|
1321 |
-
#: admin/includes/tab-settings.php:
|
1322 |
msgid ""
|
1323 |
-
"<dfn title=\"
|
|
|
|
|
1324 |
"dfn>"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
-
#: admin/includes/tab-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1328 |
msgid "Export / Import settings"
|
1329 |
msgstr ""
|
1330 |
|
1331 |
-
#: admin/includes/tab-settings.php:
|
1332 |
msgid "Export settings"
|
1333 |
msgstr ""
|
1334 |
|
1335 |
-
#: admin/includes/tab-settings.php:
|
1336 |
msgid "Import from the local file"
|
1337 |
msgstr ""
|
1338 |
|
1339 |
-
#: admin/includes/tab-settings.php:
|
1340 |
msgid "Import settings"
|
1341 |
msgstr ""
|
1342 |
|
1343 |
-
#: admin/includes/tab-settings.php:
|
1344 |
msgid "Import pre-defined settings"
|
1345 |
msgstr ""
|
1346 |
|
1347 |
-
#: admin/includes/tab-settings.php:
|
1348 |
msgid ""
|
1349 |
"Import the default settings to revert to the “Right after "
|
1350 |
"installing” state"
|
1351 |
msgstr ""
|
1352 |
|
1353 |
-
#: admin/includes/tab-settings.php:
|
1354 |
msgid "Default settings"
|
1355 |
msgstr ""
|
1356 |
|
1357 |
-
#: admin/includes/tab-settings.php:
|
1358 |
msgid ""
|
1359 |
"Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
|
1360 |
"for the “Back-end target settings”"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
-
#: admin/includes/tab-settings.php:
|
1364 |
msgid "Best for Back-end"
|
1365 |
msgstr ""
|
1366 |
|
1367 |
-
#: admin/includes/tab-settings.php:
|
1368 |
-
msgid "
|
1369 |
-
msgstr ""
|
1370 |
-
|
1371 |
-
#: admin/includes/tab-settings.php:1631
|
1372 |
-
msgid "Delete now"
|
1373 |
-
msgstr ""
|
1374 |
-
|
1375 |
-
#: admin/includes/tab-settings.php:1639
|
1376 |
-
msgid "Create DB tables for this plugin"
|
1377 |
msgstr ""
|
1378 |
|
1379 |
-
#: admin/includes/tab-settings.php:
|
1380 |
-
msgid "
|
1381 |
msgstr ""
|
1382 |
|
1383 |
-
#: admin/includes/tab-settings.php:
|
1384 |
msgid ""
|
1385 |
"<dfn title=\"When you have some unexpected blocking experiences, please "
|
1386 |
"press the button to find the blocked requests at the end of dumped "
|
1387 |
"information which may help you to solve the issues.\">Diagnostic "
|
1388 |
"information</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
|
1389 |
-
"support/plugin/ip-geo-block\" title=\"
|
1390 |
-
"
|
1391 |
msgstr ""
|
1392 |
|
1393 |
-
#: admin/includes/tab-settings.php:
|
1394 |
-
msgid "Please copy & paste when submitting your issue to support forum
|
1395 |
msgstr ""
|
1396 |
|
1397 |
-
#: admin/includes/tab-settings.php:
|
1398 |
msgid "Show information"
|
1399 |
msgstr ""
|
1400 |
|
1401 |
-
#: admin/includes/tab-settings.php:
|
1402 |
-
msgid ""
|
1403 |
-
"To enhance the protection ability, please refer to “<a rel=\"noreferrer"
|
1404 |
-
"\" href=\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-"
|
1405 |
-
"settings.html\" title=\"The best practice for target settings | IP Geo Block"
|
1406 |
-
"\">The best practice for target settings</a>”."
|
1407 |
-
msgstr ""
|
1408 |
-
|
1409 |
-
#: admin/includes/tab-settings.php:1681
|
1410 |
-
msgid ""
|
1411 |
-
"If you have any troubles with these, please check FAQ at <a rel=\"noreferrer"
|
1412 |
-
"\" href=\"https://wordpress.org/plugins/ip-geo-block/faq/\" title=\"IP Geo "
|
1413 |
-
"Block — WordPress Plugins\">WordPress.org</a> and <a rel=\"noreferrer"
|
1414 |
-
"\" href=\"http://www.ipgeoblock.com/codex/#faq\" title=\"Codex | IP Geo Block"
|
1415 |
-
"\">Codex</a>."
|
1416 |
-
msgstr ""
|
1417 |
-
|
1418 |
-
#: admin/includes/tab-settings.php:1688
|
1419 |
msgid ""
|
1420 |
"While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
|
1421 |
"others will pass an IP address to the 3rd parties' API via HTTP."
|
1422 |
msgstr ""
|
1423 |
|
1424 |
-
#: admin/includes/tab-settings.php:
|
1425 |
msgid ""
|
1426 |
"Please select the appropriate APIs to fit the privacy law / regulation in "
|
1427 |
"your country / region."
|
1428 |
msgstr ""
|
1429 |
|
1430 |
-
#: admin/includes/tab-settings.php:
|
1431 |
#, php-format
|
1432 |
msgid ""
|
1433 |
"Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
|
1434 |
"2.0.0+%s."
|
1435 |
msgstr ""
|
1436 |
|
1437 |
-
#: admin/includes/tab-settings.php:1706
|
1438 |
-
msgid ""
|
1439 |
-
"Please refer to the document “<a rel=\"noreferrer\" href=\"http://www."
|
1440 |
-
"ipgeoblock.com/codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block"
|
1441 |
-
"\">Blocking on front-end</a>” for details, including restrictions on "
|
1442 |
-
"cache plugin."
|
1443 |
-
msgstr ""
|
1444 |
-
|
1445 |
-
#: admin/includes/tab-settings.php:1707
|
1446 |
-
msgid ""
|
1447 |
-
"If you find any issues or have something to suggest, please feel free to "
|
1448 |
-
"open an issue at <a rel=\"noreferrer\" href=\"https://wordpress.org/support/"
|
1449 |
-
"plugin/ip-geo-block\" title=\"WordPress › Support » IP Geo Block"
|
1450 |
-
"\">support forum</a>."
|
1451 |
-
msgstr ""
|
1452 |
-
|
1453 |
-
#: admin/includes/tab-settings.php:1714
|
1454 |
-
msgid ""
|
1455 |
-
"Please refer to the document “<a rel=\"noreferrer\" href=\"http://www."
|
1456 |
-
"ipgeoblock.com/codex/record-settings-and-logs.html\" title=\"Codex | IP Geo "
|
1457 |
-
"Block\">Record settings and logs</a>” for details."
|
1458 |
-
msgstr ""
|
1459 |
-
|
1460 |
#: admin/includes/tab-statistics.php:19
|
1461 |
msgid "Statistics of validation"
|
1462 |
msgstr ""
|
1463 |
|
1464 |
-
#: admin/includes/tab-statistics.php:
|
1465 |
msgid "Blocked"
|
1466 |
msgstr ""
|
1467 |
|
1468 |
-
#: admin/includes/tab-statistics.php:
|
1469 |
msgid "Blocked by countries"
|
1470 |
msgstr ""
|
1471 |
|
1472 |
-
#: admin/includes/tab-statistics.php:
|
1473 |
msgid "Blocked per day"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
-
#: admin/includes/tab-statistics.php:
|
1477 |
msgid "Blocked by type of IP address"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
-
#: admin/includes/tab-statistics.php:
|
1481 |
msgid "Name of API"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
-
#: admin/includes/tab-statistics.php:
|
1485 |
msgid "Call"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
-
#: admin/includes/tab-statistics.php:
|
1489 |
msgid "Response [msec]"
|
1490 |
msgstr ""
|
1491 |
|
1492 |
-
#: admin/includes/tab-statistics.php:
|
1493 |
msgid "Average response time of each API"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
-
#: admin/includes/tab-statistics.php:
|
1497 |
msgid "Clear statistics"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
-
#: admin/includes/tab-statistics.php:
|
1501 |
-
msgid "Statistics in
|
1502 |
msgstr ""
|
1503 |
|
1504 |
-
#: admin/includes/tab-statistics.php:
|
1505 |
-
msgid "Statistics in IP address
|
1506 |
msgstr ""
|
1507 |
|
1508 |
-
#: admin/includes/tab-statistics.php:
|
1509 |
msgid "Search in cache"
|
1510 |
msgstr ""
|
1511 |
|
1512 |
-
#: admin/includes/tab-statistics.php:
|
1513 |
msgid "Clear cache"
|
1514 |
msgstr ""
|
1515 |
|
1516 |
-
#: admin/includes/tab-statistics.php:
|
1517 |
msgid "Export cache"
|
1518 |
msgstr ""
|
1519 |
|
1520 |
-
#: admin/includes/tab-statistics.php:
|
1521 |
msgid "Country (Top 10)"
|
1522 |
msgstr ""
|
1523 |
|
1524 |
-
#: admin/includes/tab-statistics.php:
|
1525 |
msgid "AS number (Top 10)"
|
1526 |
msgstr ""
|
1527 |
|
1528 |
-
#: admin/includes/tab-statistics.php:
|
1529 |
msgid "IP address (Top 10)"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
-
#: admin/includes/tab-statistics.php:
|
1533 |
msgid "Slug in back-end"
|
1534 |
msgstr ""
|
1535 |
|
1536 |
-
#: admin/includes/tab-statistics.php:
|
1537 |
msgid "Toggle sorting order"
|
1538 |
msgstr ""
|
1539 |
|
1540 |
-
#: admin/includes/tab-statistics.php:
|
1541 |
#, php-format
|
1542 |
-
msgid "[ %sRecord “Statistics”%s ] is disabled."
|
1543 |
msgstr ""
|
1544 |
|
1545 |
-
#: admin/includes/tab-statistics.php:
|
1546 |
msgid ""
|
1547 |
"Please set the proper condition to record and analyze the validation "
|
1548 |
"statistics."
|
1549 |
msgstr ""
|
1550 |
|
1551 |
-
#: admin/includes/tab-statistics.php:
|
1552 |
#, php-format
|
1553 |
-
msgid "[ %sRecord “IP address
|
1554 |
msgstr ""
|
1555 |
|
1556 |
-
#: admin/includes/tab-statistics.php:
|
1557 |
msgid "Please set the proper condition to record IP address in cache."
|
1558 |
msgstr ""
|
1559 |
|
1560 |
-
#: classes/class-ip-geo-block-
|
1561 |
-
msgid ""
|
1562 |
-
"You need to select at least one IP Geolocation API. Otherwise <strong>you'll "
|
1563 |
-
"be blocked</strong> after the cache expires."
|
1564 |
-
msgstr ""
|
1565 |
-
|
1566 |
-
#: classes/class-ip-geo-block-cron.php:222
|
1567 |
#, php-format
|
1568 |
msgid "Can't lock <code>%s</code>. Please try again after a while."
|
1569 |
msgstr ""
|
1570 |
|
1571 |
-
#: classes/class-ip-geo-block-cron.php:
|
1572 |
msgid "Your database file is up-to-date."
|
1573 |
msgstr ""
|
1574 |
|
1575 |
-
#: classes/class-ip-geo-block-cron.php:
|
1576 |
msgid "gz or zip is not supported on your system."
|
1577 |
msgstr ""
|
1578 |
|
@@ -1594,21 +1568,21 @@ msgid ""
|
|
1594 |
"details."
|
1595 |
msgstr ""
|
1596 |
|
1597 |
-
#: classes/class-ip-geo-block-logs.php:
|
1598 |
#, php-format
|
1599 |
msgid ""
|
1600 |
"Creating a DB table %s had failed. Once de-activate this plugin, and then "
|
1601 |
"activate again."
|
1602 |
msgstr ""
|
1603 |
|
1604 |
-
#: classes/class-ip-geo-block-logs.php:
|
1605 |
#, php-format
|
1606 |
msgid ""
|
1607 |
"Column type in %s unmatched. Once de-activate this plugin, and then activate "
|
1608 |
"again."
|
1609 |
msgstr ""
|
1610 |
|
1611 |
-
#: classes/class-ip-geo-block.php:
|
1612 |
msgid "Dashboard"
|
1613 |
msgstr ""
|
1614 |
|
@@ -1618,7 +1592,7 @@ msgstr ""
|
|
1618 |
msgid "Database file does not exist."
|
1619 |
msgstr ""
|
1620 |
|
1621 |
-
#: wp-content/mu-plugins/ip-geo-block-mu.php:
|
1622 |
#, php-format
|
1623 |
msgid ""
|
1624 |
"Can't find IP Geo Block in your plugins directory. Please remove <code>%s</"
|
2 |
# This file is distributed under the same license as the IP Geo Block package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: IP Geo Block 3.0.15\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
|
7 |
+
"POT-Creation-Date: 2018-10-02 22:28+0900\n"
|
8 |
+
"PO-Revision-Date: 2018-10-02 22:29+0900\n"
|
9 |
"Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
|
10 |
"Language-Team: \n"
|
11 |
"Language: en\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 2.1.1\n"
|
16 |
"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
|
17 |
"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
|
18 |
"X-Poedit-Basepath: ..\n"
|
26 |
"posted from outside your nation, and also prevents zero-day exploit."
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: admin/class-ip-geo-block-admin.php:291
|
30 |
+
msgid "Are you sure ?"
|
|
|
|
|
|
|
|
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: admin/class-ip-geo-block-admin.php:292
|
34 |
+
#: admin/class-ip-geo-block-admin.php:793
|
35 |
+
msgid "Open a new window"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: admin/class-ip-geo-block-admin.php:293 admin/includes/tab-settings.php:1506
|
39 |
+
msgid "Generate new link"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: admin/class-ip-geo-block-admin.php:294 admin/includes/tab-settings.php:1507
|
43 |
+
msgid "Delete current link"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: admin/class-ip-geo-block-admin.php:295
|
47 |
+
msgid ""
|
48 |
+
"Please add the following link to favorites / bookmarks in your browser : "
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: admin/class-ip-geo-block-admin.php:296
|
52 |
msgid "ajax for logged-in user"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: admin/class-ip-geo-block-admin.php:297
|
56 |
msgid "ajax for non logged-in user"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: admin/class-ip-geo-block-admin.php:298
|
60 |
#, php-format
|
61 |
msgid "[Found: %d]"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: admin/class-ip-geo-block-admin.php:299
|
65 |
#, php-format
|
66 |
msgid "Find and verify `%s` on “Logs” tab."
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: admin/class-ip-geo-block-admin.php:300
|
70 |
msgid "This feature is available with HTML5 compliant browsers."
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: admin/class-ip-geo-block-admin.php:301
|
74 |
+
msgid "The selected row cannot be found in the table."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: admin/class-ip-geo-block-admin.php:302
|
78 |
+
#: admin/class-ip-geo-block-admin.php:1571
|
79 |
#, php-format
|
80 |
msgid "An error occurred while executing the ajax command `%s`."
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: admin/class-ip-geo-block-admin.php:306
|
84 |
msgid "No data available in table"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: admin/class-ip-geo-block-admin.php:307
|
88 |
msgid "No matching records found"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: admin/class-ip-geo-block-admin.php:308
|
92 |
+
#: admin/includes/class-admin-ajax.php:107
|
93 |
+
#: admin/includes/class-admin-ajax.php:240
|
94 |
+
#: admin/includes/tab-geolocation.php:74
|
95 |
msgid "IP address"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: admin/class-ip-geo-block-admin.php:309
|
99 |
+
#: admin/includes/class-admin-ajax.php:108
|
100 |
+
#: admin/includes/class-admin-ajax.php:241
|
101 |
msgid "Code"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: admin/class-ip-geo-block-admin.php:310
|
105 |
+
#: admin/includes/class-admin-ajax.php:109
|
106 |
+
#: admin/includes/class-admin-ajax.php:242
|
107 |
msgid "ASN"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: admin/class-ip-geo-block-admin.php:311
|
111 |
+
#: admin/includes/class-admin-ajax.php:243
|
112 |
msgid "Host name"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: admin/class-ip-geo-block-admin.php:312
|
116 |
+
#: admin/includes/class-admin-ajax.php:110
|
117 |
+
#: admin/includes/class-admin-ajax.php:244
|
118 |
msgid "Target"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: admin/class-ip-geo-block-admin.php:313
|
122 |
+
#: admin/includes/class-admin-ajax.php:245
|
123 |
msgid "Failure / Total"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: admin/class-ip-geo-block-admin.php:314
|
127 |
+
#: admin/includes/class-admin-ajax.php:246
|
128 |
msgid "Elapsed[sec]"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: admin/class-ip-geo-block-admin.php:315
|
132 |
+
#: admin/includes/class-admin-ajax.php:106
|
133 |
msgid "Time"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: admin/class-ip-geo-block-admin.php:316
|
137 |
+
#: admin/includes/class-admin-ajax.php:111
|
138 |
msgid "Result"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: admin/class-ip-geo-block-admin.php:317
|
142 |
+
#: admin/includes/class-admin-ajax.php:112
|
143 |
msgid "Request"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: admin/class-ip-geo-block-admin.php:318
|
147 |
+
#: admin/includes/class-admin-ajax.php:113
|
148 |
msgid "User agent"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: admin/class-ip-geo-block-admin.php:319
|
152 |
+
#: admin/includes/class-admin-ajax.php:114
|
153 |
msgid "HTTP headers"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: admin/class-ip-geo-block-admin.php:320
|
157 |
+
#: admin/includes/class-admin-ajax.php:115
|
158 |
msgid "$_POST data"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: admin/class-ip-geo-block-admin.php:346
|
162 |
msgid "Contribute on GitHub"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: admin/class-ip-geo-block-admin.php:360
|
166 |
+
#: admin/class-ip-geo-block-admin.php:478
|
167 |
+
#: admin/class-ip-geo-block-admin.php:736
|
168 |
msgid "Settings"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: admin/class-ip-geo-block-admin.php:455
|
172 |
+
#: admin/class-ip-geo-block-admin.php:456
|
173 |
+
#: admin/class-ip-geo-block-admin.php:466
|
174 |
+
#: admin/class-ip-geo-block-admin.php:467
|
175 |
+
#: admin/class-ip-geo-block-admin.php:477
|
176 |
+
#: admin/class-ip-geo-block-admin.php:487
|
177 |
msgid "IP Geo Block"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: admin/class-ip-geo-block-admin.php:488
|
181 |
+
#: admin/class-ip-geo-block-admin.php:741
|
182 |
msgid "Site List"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: admin/class-ip-geo-block-admin.php:517
|
186 |
msgid "You need WordPress 3.7+."
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: admin/class-ip-geo-block-admin.php:521
|
190 |
+
#, php-format
|
191 |
+
msgid ""
|
192 |
+
"Can not load Geolocation API libraries from <code>%s</code>. It seems to "
|
193 |
+
"have failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
|
194 |
+
"tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
|
195 |
+
"contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
|
196 |
+
"from <a rel=\"noreferrer\" href=\"https://github.com/tokkonopapa/WordPress-"
|
197 |
+
"IP-Geo-API\" title=\"tokkonopapa/WordPress-IP-Geo-API - GitHub\">WordPress-"
|
198 |
+
"IP-Geo-API</a>. Please install <code>ip-geo-api</code> with write permission "
|
199 |
+
"according to <a rel=\"noreferrer\" href=\"https://www.ipgeoblock.com/codex/"
|
200 |
+
"how-to-fix-permission-troubles.html\" title=\"How can I fix permission "
|
201 |
+
"troubles? | IP Geo Block\">this instruction</a>."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: admin/class-ip-geo-block-admin.php:530
|
205 |
+
#, php-format
|
206 |
+
msgid ""
|
207 |
+
"You should select at least one API at <a href=\"%s\">Geolocation API "
|
208 |
+
"settings</a>. Otherwise <strong>you'll be blocked</strong> after the cache "
|
209 |
+
"expires."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: admin/class-ip-geo-block-admin.php:539
|
213 |
+
#, php-format
|
214 |
+
msgid ""
|
215 |
+
"You should select at least one API for local database at <a href=\"%s"
|
216 |
+
"\">Geolocation API settings</a>. Otherwise access to the external API may "
|
217 |
+
"slow down the site."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: admin/class-ip-geo-block-admin.php:550
|
221 |
#, php-format
|
222 |
msgid ""
|
223 |
"Now downloading geolocation databases in background. After a little while, "
|
225 |
"strong>” at <a href=\"%s\">Validation rule settings</a>."
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: admin/class-ip-geo-block-admin.php:556
|
229 |
#, php-format
|
230 |
msgid ""
|
231 |
"The “<strong>Matching rule</strong>” is not set properly. Please "
|
232 |
"confirm it at <a href=\"%s\">Validation rule settings</a>."
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: admin/class-ip-geo-block-admin.php:565
|
236 |
msgid "Local database and matching rule have been updated."
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: admin/class-ip-geo-block-admin.php:576
|
240 |
msgid ""
|
241 |
"Once you logout, you will be unable to login again because the number of "
|
242 |
"login attempts reaches the limit."
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: admin/class-ip-geo-block-admin.php:578
|
246 |
#, php-format
|
247 |
msgid ""
|
248 |
+
"Please remove your IP address in “%1$sStatistics in IP address cache"
|
249 |
+
"%2$s” on “%3$sStatistics%4$s” tab to prevent locking "
|
250 |
+
"yourself out."
|
251 |
msgstr ""
|
252 |
|
253 |
+
#: admin/class-ip-geo-block-admin.php:589
|
254 |
msgid ""
|
255 |
"Once you logout, you will be unable to login again because your country code "
|
256 |
"or IP address is in the blacklist."
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: admin/class-ip-geo-block-admin.php:590
|
260 |
msgid ""
|
261 |
"Once you logout, you will be unable to login again because your country code "
|
262 |
"or IP address is not in the whitelist."
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: admin/class-ip-geo-block-admin.php:594
|
266 |
#, php-format
|
267 |
msgid "Please check your “%sValidation rule settings%s”."
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: admin/class-ip-geo-block-admin.php:598
|
271 |
#, php-format
|
272 |
msgid ""
|
273 |
"Please confirm your local geolocation databases at “%sLocal database "
|
275 |
"%sStatistics in cache%s” section."
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: admin/class-ip-geo-block-admin.php:620
|
279 |
+
#, php-format
|
280 |
+
msgid ""
|
281 |
+
"Emergency login link is outdated. Please delete it once and generate again "
|
282 |
+
"at “%sPlugin settings%s” section. Also do not forget to update "
|
283 |
+
"favorites / bookmarks in your browser."
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: admin/class-ip-geo-block-admin.php:629
|
287 |
msgid ""
|
288 |
"“mu-plugins” (ip-geo-block-mu.php) at “Validation "
|
289 |
"timing” is imcompatible with <strong>IP Geo Allow</strong>. Please "
|
290 |
"select “init” action hook."
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: admin/class-ip-geo-block-admin.php:737
|
294 |
msgid "Statistics"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: admin/class-ip-geo-block-admin.php:738
|
298 |
msgid "Logs"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: admin/class-ip-geo-block-admin.php:739
|
302 |
msgid "Search"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: admin/class-ip-geo-block-admin.php:740
|
306 |
msgid "Attribution"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: admin/class-ip-geo-block-admin.php:757
|
310 |
+
#: admin/class-ip-geo-block-admin.php:773
|
311 |
msgid "Network wide"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: admin/class-ip-geo-block-admin.php:786
|
315 |
msgid "Toggle all"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: admin/class-ip-geo-block-admin.php:789
|
319 |
msgid ""
|
320 |
"Independent of “Privacy and record settings”, you can see all "
|
321 |
"the requests validated by this plugin in almost real time."
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: admin/class-ip-geo-block-admin.php:789 admin/includes/tab-accesslog.php:39
|
325 |
msgid "Live update"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: admin/class-ip-geo-block-admin.php:793
|
329 |
msgid "Open a new window on clicking the link in the chart."
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: admin/class-ip-geo-block-admin.php:817
|
|
|
|
|
|
|
|
|
333 |
msgid "Thanks for providing these great services for free."
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: admin/class-ip-geo-block-admin.php:818
|
337 |
msgid ""
|
338 |
+
"(Most browsers will redirect you to each site <a href=\"https://www."
|
339 |
"ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
|
340 |
"when you click the link</a>.)"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: admin/class-ip-geo-block-admin.php:823
|
344 |
msgid "Back to top"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: admin/class-ip-geo-block-admin.php:915
|
348 |
msgid "Enable"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: admin/class-ip-geo-block-admin.php:930
|
352 |
msgid "Select one"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: admin/class-ip-geo-block-admin.php:1349
|
356 |
msgid "You do not have sufficient permissions to access this page."
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: admin/class-ip-geo-block-admin.php:1376
|
360 |
#: admin/includes/class-admin-rewrite.php:194
|
361 |
+
#: classes/class-ip-geo-block-cron.php:216
|
362 |
+
#: classes/class-ip-geo-block-cron.php:320
|
363 |
+
#: classes/class-ip-geo-block-cron.php:394
|
364 |
+
#: classes/class-ip-geo-block-opts.php:471
|
365 |
#, php-format
|
366 |
msgid "Unable to write <code>%s</code>. Please check the permission."
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: admin/class-ip-geo-block-admin.php:1406
|
370 |
msgid "Settings saved."
|
371 |
msgstr ""
|
372 |
|
373 |
#: admin/includes/class-admin-ajax.php:72
|
374 |
+
#: admin/includes/class-admin-ajax.php:75 admin/includes/tab-settings.php:84
|
375 |
+
#: admin/includes/tab-settings.php:103
|
376 |
msgid "n/a"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: admin/includes/class-admin-ajax.php:201
|
|
|
|
|
|
|
|
|
|
|
380 |
#, php-format
|
381 |
msgid "The user %s (user ID: %d) is in use."
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: admin/includes/class-admin-ajax.php:505
|
385 |
#, php-format
|
386 |
msgid ""
|
387 |
"illegal format at %s. Please delete the corresponding line and try again."
|
388 |
msgstr ""
|
389 |
|
390 |
#: admin/includes/class-admin-rewrite.php:168
|
391 |
+
#: classes/class-ip-geo-block-cron.php:211
|
392 |
+
#: classes/class-ip-geo-block-cron.php:389
|
393 |
#, php-format
|
394 |
msgid "Unable to read <code>%s</code>. Please check the permission."
|
395 |
msgstr ""
|
409 |
msgid "Validation logs"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:17
|
|
|
413 |
msgid "Help"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: admin/includes/tab-accesslog.php:55 admin/includes/tab-settings.php:413
|
417 |
msgid "Comment post"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: admin/includes/tab-accesslog.php:56 admin/includes/tab-settings.php:414
|
421 |
msgid "XML-RPC"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: admin/includes/tab-accesslog.php:57 admin/includes/tab-settings.php:415
|
425 |
msgid "Login form"
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: admin/includes/tab-accesslog.php:58 admin/includes/tab-settings.php:416
|
429 |
msgid "Admin area"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: admin/includes/tab-accesslog.php:59 admin/includes/tab-settings.php:418
|
433 |
msgid "Public facing pages"
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: admin/includes/tab-accesslog.php:62 admin/includes/tab-network.php:75
|
437 |
msgid "All"
|
438 |
msgstr ""
|
439 |
|
441 |
msgid "Select target"
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: admin/includes/tab-accesslog.php:86
|
445 |
msgid "Search in logs"
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: admin/includes/tab-accesslog.php:95 admin/includes/tab-statistics.php:232
|
449 |
msgid "Reset"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: admin/includes/tab-accesslog.php:109
|
453 |
+
msgid "Preset filters"
|
454 |
+
msgstr ""
|
455 |
+
|
456 |
+
#: admin/includes/tab-accesslog.php:125 admin/includes/tab-statistics.php:238
|
457 |
msgid "Bulk action"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: admin/includes/tab-accesslog.php:136 admin/includes/tab-statistics.php:249
|
461 |
msgid "Remove entries by IP address"
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: admin/includes/tab-accesslog.php:137 admin/includes/tab-statistics.php:250
|
465 |
msgid "Add IP address to “Whitelist”"
|
466 |
msgstr ""
|
467 |
|
468 |
+
#: admin/includes/tab-accesslog.php:138 admin/includes/tab-statistics.php:251
|
469 |
msgid "Add IP address to “Blacklist”"
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: admin/includes/tab-accesslog.php:139 admin/includes/tab-statistics.php:252
|
473 |
msgid "Add AS number to “Whitelist”"
|
474 |
msgstr ""
|
475 |
|
476 |
+
#: admin/includes/tab-accesslog.php:140 admin/includes/tab-statistics.php:253
|
477 |
msgid "Add AS number to “Blacklist”"
|
478 |
msgstr ""
|
479 |
|
480 |
+
#: admin/includes/tab-accesslog.php:142 admin/includes/tab-network.php:56
|
481 |
+
#: admin/includes/tab-statistics.php:255
|
482 |
msgid "Apply"
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: admin/includes/tab-accesslog.php:149 admin/includes/tab-statistics.php:191
|
486 |
msgid "Clear logs"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: admin/includes/tab-accesslog.php:157 admin/includes/tab-statistics.php:167
|
490 |
+
#: admin/includes/tab-statistics.php:199 admin/includes/tab-statistics.php:269
|
491 |
msgid "Clear all"
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: admin/includes/tab-accesslog.php:166
|
495 |
msgid "Export logs"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: admin/includes/tab-accesslog.php:172 admin/includes/tab-settings.php:1538
|
499 |
+
#: admin/includes/tab-statistics.php:283
|
500 |
msgid "Export to the local file"
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: admin/includes/tab-accesslog.php:172 admin/includes/tab-statistics.php:283
|
504 |
msgid "Export csv"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: admin/includes/tab-accesslog.php:193 admin/includes/tab-network.php:112
|
508 |
+
#: admin/includes/tab-statistics.php:413
|
509 |
#, php-format
|
510 |
+
msgid "[ %sRecord “Validation logs”%s ] is disabled."
|
511 |
msgstr ""
|
512 |
|
513 |
+
#: admin/includes/tab-accesslog.php:194 admin/includes/tab-network.php:113
|
514 |
+
#: admin/includes/tab-statistics.php:414
|
515 |
msgid ""
|
516 |
"Please set the proper condition to record and analyze the validation logs."
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: admin/includes/tab-attribution.php:13
|
520 |
msgid "Attribution links"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: admin/includes/tab-geolocation.php:17
|
524 |
msgid "Search IP address geolocation"
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: admin/includes/tab-geolocation.php:46
|
528 |
msgid "Geolocation API"
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: admin/includes/tab-geolocation.php:89 admin/includes/tab-settings.php:1084
|
532 |
msgid ""
|
533 |
"<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
|
534 |
"Moreover, this option replaces the end of IP address with “***” "
|
535 |
"to make it anonymous.\">Anonymize IP address</dfn>"
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: admin/includes/tab-geolocation.php:104
|
539 |
msgid "Search geolocation"
|
540 |
msgstr ""
|
541 |
|
542 |
+
#: admin/includes/tab-geolocation.php:112
|
543 |
msgid "Search now"
|
544 |
msgstr ""
|
545 |
|
555 |
msgid "Columns"
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: admin/includes/tab-network.php:61
|
559 |
msgid "Chart display layout"
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: admin/includes/tab-network.php:76
|
563 |
msgid "Latest 1 hour"
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: admin/includes/tab-network.php:77
|
567 |
msgid "Latest 24 hours"
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: admin/includes/tab-network.php:78
|
571 |
msgid "Latest 1 week"
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: admin/includes/tab-network.php:90
|
575 |
msgid "Duration to retrieve"
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: admin/includes/tab-settings.php:13
|
579 |
+
msgid "(comma separated)"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: admin/includes/tab-settings.php:14
|
583 |
+
msgid "(comma or RET separated)"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: admin/includes/tab-settings.php:15
|
587 |
+
msgid "Toggle selection"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: admin/includes/tab-settings.php:16
|
591 |
+
msgid "Find blocked requests in “Logs“"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: admin/includes/tab-settings.php:18
|
595 |
+
msgid ""
|
596 |
+
"Before adding as “Exception”, please click on “<a class="
|
597 |
+
"\"ip-geo-block-icon ip-geo-block-icon-alert\" title=\"This button is just a "
|
598 |
+
"sample.\"><span></span></a>” button (if exists) attached to the "
|
599 |
+
"following list to confirm that the blocked request is not malicious."
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: admin/includes/tab-settings.php:19
|
603 |
+
msgid "Open CIDR calculator for IPv4 / IPv6."
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: admin/includes/tab-settings.php:54
|
607 |
msgid "Validation rule settings"
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: admin/includes/tab-settings.php:76
|
611 |
msgid ""
|
612 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
613 |
"code by referring “Scan country code”.\">Your IP address / "
|
614 |
"Country</dfn>"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: admin/includes/tab-settings.php:85 admin/includes/tab-settings.php:104
|
618 |
msgid "Scan all the APIs you selected at Geolocation API settings"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: admin/includes/tab-settings.php:85 admin/includes/tab-settings.php:104
|
622 |
msgid "Scan country code"
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: admin/includes/tab-settings.php:95
|
626 |
msgid ""
|
627 |
"<dfn title=\"You can confirm the appropriate Geolocation APIs and country "
|
628 |
"code by referring “Scan country code”.\">Server IP address / "
|
629 |
"Country</dfn>"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: admin/includes/tab-settings.php:112
|
633 |
msgid "Whitelist"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: admin/includes/tab-settings.php:113
|
637 |
msgid "Blacklist"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: admin/includes/tab-settings.php:117
|
641 |
msgid ""
|
642 |
"Please select either “Whitelist” or “Blacklist”."
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: admin/includes/tab-settings.php:118
|
646 |
msgid ""
|
647 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
648 |
"empty. The special code “XX” is assigned as private IP address "
|
652 |
"country code</dfn>"
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: admin/includes/tab-settings.php:119
|
656 |
msgid ""
|
657 |
"<dfn title=\"“Block by country” will be bypassed in case of "
|
658 |
"empty. The special code “XX” is assigned as private IP address "
|
662 |
"country code</dfn>"
|
663 |
msgstr ""
|
664 |
|
665 |
+
#: admin/includes/tab-settings.php:125 admin/includes/tab-settings.php:790
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
666 |
msgid "Matching rule"
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: admin/includes/tab-settings.php:137
|
670 |
msgid ""
|
671 |
"A request from which the country code or IP address is <strong>NOT</strong> "
|
672 |
"in the whitelist will be blocked."
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: admin/includes/tab-settings.php:138
|
676 |
msgid ""
|
677 |
"A request from which the country code or IP address is in the blacklist will "
|
678 |
"be blocked."
|
679 |
msgstr ""
|
680 |
|
681 |
+
#: admin/includes/tab-settings.php:180
|
682 |
msgid ""
|
683 |
"<dfn title=\"It enables utilizing “AS number” in the “"
|
684 |
"Whitelist/Blacklist of extra IP addresses” to specify a group of IP "
|
685 |
"networks.\">Use Autonomous System Number</dfn>"
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: admin/includes/tab-settings.php:191
|
689 |
#, php-format
|
690 |
msgid "Some useful tools to find ASN are introduced in “%s”."
|
691 |
msgstr ""
|
692 |
|
693 |
+
#: admin/includes/tab-settings.php:198
|
694 |
msgid ""
|
695 |
"<dfn title=\"e.g. “192.0.64.0/18” for Jetpack server, "
|
696 |
"“69.46.36.0/27” for WordFence server or “AS32934” "
|
697 |
"for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: admin/includes/tab-settings.php:219
|
701 |
msgid ""
|
702 |
"<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
|
703 |
"\">Blacklist of extra IP addresses prior to country code</dfn>"
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: admin/includes/tab-settings.php:240
|
707 |
msgid ""
|
708 |
"<dfn title=\"If your server is placed behind the proxy server or the load "
|
709 |
"balancing server, you need to put the appropriate key such as “"
|
712 |
"addresses</dfn>"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: admin/includes/tab-settings.php:258
|
716 |
msgid ""
|
717 |
"<dfn title=\"It validates malicious signatures independently of “Block "
|
718 |
"by country” and “Prevent Zero-day Exploit” for the target "
|
723 |
"please click to restore.\"><span></span></a>)</nobr>"
|
724 |
msgstr ""
|
725 |
|
726 |
+
#: admin/includes/tab-settings.php:272
|
727 |
msgid ""
|
728 |
"<dfn title=\"Select allowed MIME type.\">Whitelist of allowed MIME type</dfn>"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: admin/includes/tab-settings.php:283
|
732 |
msgid ""
|
733 |
"<dfn title=\"Put forbidden file extensions.\">Blacklist of forbidden file "
|
734 |
"extensions</dfn>"
|
735 |
msgstr ""
|
736 |
|
737 |
+
#: admin/includes/tab-settings.php:287
|
738 |
msgid ""
|
739 |
"<dfn title=\"Specify the capabilities to be verified. Depending on the "
|
740 |
"particular type of uploader, certain capability may be required. Default is "
|
742 |
"verification will be skipped if empty.\">Capabilities to be verified</dfn>"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: admin/includes/tab-settings.php:287
|
746 |
msgid ""
|
747 |
"( See “<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
|
748 |
"Roles_and_Capabilities\" title=\"Roles and Capabilities « WordPress "
|
749 |
"Codex\">Roles and Capabilities</a>” )"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: admin/includes/tab-settings.php:293
|
753 |
msgid ""
|
754 |
"<dfn title=\"It restricts the file types on upload in order to block malware "
|
755 |
"and backdoor via both back-end and front-end. Please consider to select "
|
758 |
"this validation.\">Prevent malicious file uploading</dfn>"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: admin/includes/tab-settings.php:304 admin/includes/tab-settings.php:479
|
762 |
+
#: admin/includes/tab-settings.php:624 admin/includes/tab-settings.php:1189
|
763 |
msgid "Disable"
|
764 |
msgstr ""
|
765 |
|
766 |
+
#: admin/includes/tab-settings.php:305
|
767 |
msgid "Verify file extension and MIME type"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: admin/includes/tab-settings.php:306
|
771 |
msgid "Verify file extension only"
|
772 |
msgstr ""
|
773 |
|
774 |
+
#: admin/includes/tab-settings.php:315
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
775 |
#, php-format
|
776 |
msgid ""
|
777 |
"<dfn title=\"You can put your original 403.php and so on into your theme "
|
778 |
"directory.\">Response code</dfn> %s"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: admin/includes/tab-settings.php:344 admin/includes/tab-settings.php:873
|
782 |
msgid ""
|
783 |
"<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
|
784 |
"to a public facing page, visitors would not be blocked on the page to "
|
787 |
"\">Redirect URL</dfn>"
|
788 |
msgstr ""
|
789 |
|
790 |
+
#: admin/includes/tab-settings.php:361 admin/includes/tab-settings.php:891
|
791 |
msgid ""
|
792 |
"<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
|
793 |
"message</dfn>"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: admin/includes/tab-settings.php:379
|
797 |
msgid "Select when to run the validation."
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: admin/includes/tab-settings.php:379
|
801 |
msgid "Validation timing"
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: admin/includes/tab-settings.php:390
|
805 |
msgid "“init” action hook"
|
806 |
msgstr ""
|
807 |
|
808 |
+
#: admin/includes/tab-settings.php:391
|
809 |
msgid "“mu-plugins” (ip-geo-block-mu.php)"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: admin/includes/tab-settings.php:394
|
813 |
msgid ""
|
814 |
"Validate at “init” action hook in the same manner as typical "
|
815 |
"plugins."
|
816 |
msgstr ""
|
817 |
|
818 |
+
#: admin/includes/tab-settings.php:395
|
819 |
msgid ""
|
820 |
"Validate at an earlier phase than other typical plugins. It can reduce load "
|
821 |
+
"on server but has <a rel='noreferrer' href='https://www.ipgeoblock.com/codex/"
|
822 |
"validation-timing.html' title='Validation timing | IP Geo Block'>some "
|
823 |
"restrictions</a>."
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: admin/includes/tab-settings.php:405
|
827 |
msgid "Back-end target settings"
|
828 |
msgstr ""
|
829 |
|
830 |
+
#: admin/includes/tab-settings.php:411
|
831 |
#, php-format
|
832 |
msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: admin/includes/tab-settings.php:417
|
836 |
msgid "Other areas"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: admin/includes/tab-settings.php:418
|
840 |
msgid "public facing pages"
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: admin/includes/tab-settings.php:434 admin/includes/tab-settings.php:480
|
844 |
+
#: admin/includes/tab-settings.php:512 admin/includes/tab-settings.php:518
|
845 |
+
#: admin/includes/tab-settings.php:783
|
846 |
msgid "Block by country"
|
847 |
msgstr ""
|
848 |
|
849 |
+
#: admin/includes/tab-settings.php:444
|
850 |
+
msgid "The whole will be wrapped by <p> tag. Allowed tags: "
|
851 |
+
msgstr ""
|
852 |
+
|
853 |
+
#: admin/includes/tab-settings.php:444
|
854 |
+
msgid "Message on comment form"
|
855 |
+
msgstr ""
|
856 |
+
|
857 |
+
#: admin/includes/tab-settings.php:457
|
858 |
+
msgid "None"
|
859 |
+
msgstr ""
|
860 |
+
|
861 |
+
#: admin/includes/tab-settings.php:458
|
862 |
+
msgid "Top"
|
863 |
+
msgstr ""
|
864 |
+
|
865 |
+
#: admin/includes/tab-settings.php:459
|
866 |
+
msgid "Bottom"
|
867 |
+
msgstr ""
|
868 |
+
|
869 |
+
#: admin/includes/tab-settings.php:481
|
870 |
msgid "Completely close"
|
871 |
msgstr ""
|
872 |
|
873 |
+
#: admin/includes/tab-settings.php:487
|
874 |
msgid "Action to login as a registered user."
|
875 |
msgstr ""
|
876 |
|
877 |
+
#: admin/includes/tab-settings.php:487
|
878 |
msgid "Log in"
|
879 |
msgstr ""
|
880 |
|
881 |
+
#: admin/includes/tab-settings.php:488
|
882 |
msgid "Action to register new users."
|
883 |
msgstr ""
|
884 |
|
885 |
+
#: admin/includes/tab-settings.php:488
|
886 |
msgid "Register"
|
887 |
msgstr ""
|
888 |
|
889 |
+
#: admin/includes/tab-settings.php:489
|
890 |
msgid "Action to reset a password to create a new one."
|
891 |
msgstr ""
|
892 |
|
893 |
+
#: admin/includes/tab-settings.php:489
|
894 |
msgid "Password Reset"
|
895 |
msgstr ""
|
896 |
|
897 |
+
#: admin/includes/tab-settings.php:490
|
898 |
msgid "Action to email a password to a registered user."
|
899 |
msgstr ""
|
900 |
|
901 |
+
#: admin/includes/tab-settings.php:490
|
902 |
msgid "Lost Password"
|
903 |
msgstr ""
|
904 |
|
905 |
+
#: admin/includes/tab-settings.php:491
|
906 |
msgid ""
|
907 |
"Action to show prompt to enter a password on password protected post and "
|
908 |
"page."
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: admin/includes/tab-settings.php:491
|
912 |
msgid "Password protected"
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: admin/includes/tab-settings.php:513
|
916 |
msgid ""
|
917 |
"<dfn title=\"Specify the individual action as a blocking target.\">Target "
|
918 |
"actions</dfn>"
|
919 |
msgstr ""
|
920 |
|
921 |
+
#: admin/includes/tab-settings.php:519
|
922 |
msgid "Prevent Zero-day Exploit"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: admin/includes/tab-settings.php:523
|
926 |
msgid ""
|
927 |
"It will block a request related to the services for both public facing pages "
|
928 |
"and the dashboard."
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: admin/includes/tab-settings.php:524
|
932 |
msgid ""
|
933 |
"Regardless of the country code, it will block a malicious request related to "
|
934 |
"the services only for the dashboard."
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: admin/includes/tab-settings.php:530
|
938 |
+
msgid ""
|
939 |
+
"This is applied to “XML-RPC” and “Login form” when "
|
940 |
+
"“IP address cache” in “Privacy and record settings” "
|
941 |
+
"section is enabled. Lockout period is the same as expiration time of the "
|
942 |
+
"cache."
|
943 |
+
msgstr ""
|
944 |
+
|
945 |
+
#: admin/includes/tab-settings.php:530
|
946 |
+
msgid "Max failed login attempts per IP address"
|
947 |
+
msgstr ""
|
948 |
+
|
949 |
+
#: admin/includes/tab-settings.php:571
|
950 |
msgid "admin post for logged-in user"
|
951 |
msgstr ""
|
952 |
|
953 |
+
#: admin/includes/tab-settings.php:572
|
954 |
msgid "admin post for non logged-in user"
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: admin/includes/tab-settings.php:594
|
958 |
msgid "Admin ajax/post"
|
959 |
msgstr ""
|
960 |
|
961 |
+
#: admin/includes/tab-settings.php:608
|
962 |
msgid ""
|
963 |
"Specify the action name (“action=…”) or the page name "
|
964 |
"(“page=…”) to prevent unintended blocking caused by "
|
966 |
"Zero-day Exploit” (for logged-in user)."
|
967 |
msgstr ""
|
968 |
|
969 |
+
#: admin/includes/tab-settings.php:608 admin/includes/tab-settings.php:686
|
970 |
+
#: admin/includes/tab-settings.php:746
|
971 |
msgid "Exceptions"
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: admin/includes/tab-settings.php:609
|
975 |
msgid "Toggle with non logged-in user"
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: admin/includes/tab-settings.php:612
|
979 |
msgid "Candidate actions/pages"
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: admin/includes/tab-settings.php:626
|
983 |
#, php-format
|
984 |
msgid ""
|
985 |
"Regardless of the country code, it will block a malicious request to <code>"
|
986 |
"%s⋯/*.php</code>."
|
987 |
msgstr ""
|
988 |
|
989 |
+
#: admin/includes/tab-settings.php:627
|
990 |
msgid ""
|
991 |
"Select the item which causes unintended blocking in order to exclude from "
|
992 |
"the validation target. Grayed item indicates “INACTIVE”."
|
993 |
msgstr ""
|
994 |
|
995 |
+
#: admin/includes/tab-settings.php:628
|
996 |
#, php-format
|
997 |
msgid ""
|
998 |
"It configures “%s” to validate a direct request to the PHP file "
|
1000 |
"hidden files beginning with a dot by the server's configuration."
|
1001 |
msgstr ""
|
1002 |
|
1003 |
+
#: admin/includes/tab-settings.php:629
|
1004 |
msgid "Sorry, but your server type is not supported."
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: admin/includes/tab-settings.php:630
|
1008 |
msgid ""
|
1009 |
+
"You need to click “Save Changes” button for imported settings to "
|
1010 |
+
"take effect."
|
1011 |
msgstr ""
|
1012 |
|
1013 |
+
#: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:725
|
1014 |
msgid "Force to load WP core"
|
1015 |
msgstr ""
|
1016 |
|
1018 |
msgid "Plugins area"
|
1019 |
msgstr ""
|
1020 |
|
1021 |
+
#: admin/includes/tab-settings.php:730
|
1022 |
msgid "Themes area"
|
1023 |
msgstr ""
|
1024 |
|
1025 |
+
#: admin/includes/tab-settings.php:765
|
1026 |
msgid "Front-end target settings"
|
1027 |
msgstr ""
|
1028 |
|
1029 |
+
#: admin/includes/tab-settings.php:800
|
1030 |
msgid "Follow “Validation rule settings”"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
+
#: admin/includes/tab-settings.php:842
|
1034 |
#, php-format
|
1035 |
msgid ""
|
1036 |
"<dfn title=\"You can configure a different response code from the Back-end. "
|
1038 |
"\">Response code</dfn> %s"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
+
#: admin/includes/tab-settings.php:906
|
1042 |
msgid ""
|
1043 |
"<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
+
#: admin/includes/tab-settings.php:918
|
1047 |
msgid ""
|
1048 |
"<dfn title=\"Specify the individual post type on a single page as a blocking "
|
1049 |
"target.\">Post type</dfn>"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: admin/includes/tab-settings.php:930
|
1053 |
msgid ""
|
1054 |
"<dfn title=\"Specify the individual category on a single page or archive "
|
1055 |
"page as a blocking target.\">Category</dfn>"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
+
#: admin/includes/tab-settings.php:942
|
1059 |
msgid ""
|
1060 |
"<dfn title=\"Specify the individual tag on a single page or archive page as "
|
1061 |
"a blocking target.\">Tag</dfn>"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: admin/includes/tab-settings.php:956
|
1065 |
msgid "Specify the validation target on front-end."
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: admin/includes/tab-settings.php:956
|
1069 |
msgid "Validation target"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: admin/includes/tab-settings.php:967
|
1073 |
msgid "All requests"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: admin/includes/tab-settings.php:968
|
1077 |
msgid "Specify the targets"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: admin/includes/tab-settings.php:971
|
1081 |
msgid ""
|
1082 |
"Notice that “Validation timing” is deferred till “"
|
1083 |
"wp” action hook. It means that this feature would not be compatible "
|
1084 |
"with any page caching."
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: admin/includes/tab-settings.php:981
|
1088 |
+
msgid "Specify the name of actions as exception that is invariably blocked."
|
1089 |
+
msgstr ""
|
1090 |
+
|
1091 |
+
#: admin/includes/tab-settings.php:981
|
1092 |
+
msgid "Excluded actions"
|
1093 |
+
msgstr ""
|
1094 |
+
|
1095 |
+
#: admin/includes/tab-settings.php:997
|
1096 |
msgid ""
|
1097 |
"<dfn title=\"Specify the frequency of request for certain period of time."
|
1098 |
"\">Blocking condition</dfn>"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
+
#: admin/includes/tab-settings.php:999
|
1102 |
#, php-format
|
1103 |
msgid "More than %1$s page view (PV) in %2$s seconds"
|
1104 |
msgstr ""
|
1105 |
|
1106 |
+
#: admin/includes/tab-settings.php:1007
|
1107 |
msgid ""
|
1108 |
"<dfn title=\"It will validate the frequency of request.\">Block badly-"
|
1109 |
"behaved bots and crawlers</dfn>"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: admin/includes/tab-settings.php:1024
|
1113 |
msgid ""
|
1114 |
"A part of user agent string and a qualification connected with a separator "
|
1115 |
"that indicates an applicable rule and can be “:” (pass) or "
|
1119 |
"qualification”."
|
1120 |
msgstr ""
|
1121 |
|
1122 |
+
#: admin/includes/tab-settings.php:1024
|
1123 |
msgid "UA string and qualification"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
+
#: admin/includes/tab-settings.php:1041
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1127 |
msgid ""
|
1128 |
"It enables to verify the host by reverse DNS lookup which would spend some "
|
1129 |
"server resources. If it is disabled, “HOST” and “"
|
1131 |
"return “true”."
|
1132 |
msgstr ""
|
1133 |
|
1134 |
+
#: admin/includes/tab-settings.php:1041
|
1135 |
+
msgid "Reverse DNS lookup"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: admin/includes/tab-settings.php:1058
|
1139 |
msgid ""
|
1140 |
"It enables to simulate validation without deployment. The results can be "
|
1141 |
"found as “public” in Logs."
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: admin/includes/tab-settings.php:1058
|
1145 |
msgid "Simulation mode"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: admin/includes/tab-settings.php:1076
|
1149 |
msgid "Privacy and record settings"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
+
#: admin/includes/tab-settings.php:1099
|
1153 |
msgid ""
|
1154 |
"<dfn title=\"This option restricts not to send IP address to the external "
|
1155 |
"Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
+
#: admin/includes/tab-settings.php:1114
|
1159 |
msgid ""
|
1160 |
"<dfn title=\"This option enables to record the number blocked countries and "
|
1161 |
+
"the number of blocked requests per day.\">Record “Statistics of "
|
1162 |
+
"validation”</dfn>"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
+
#: admin/includes/tab-settings.php:1129
|
1166 |
msgid "Maximum period for “Statistics” [days]"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
+
#: admin/includes/tab-settings.php:1147
|
1170 |
msgid ""
|
1171 |
"<dfn title=\"This option enables to record the IP address, country code and "
|
1172 |
"failure counter of login attempts into the cache on database to minimize the "
|
1173 |
+
"impact on site speed.\">Record “IP address cache”</dfn>"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
+
#: admin/includes/tab-settings.php:1162
|
1177 |
msgid ""
|
1178 |
"<dfn title=\"If user authentication fails consecutively beyond “Max "
|
1179 |
"number of failed login attempts per IP address”, subsequent login will "
|
1181 |
"dfn>"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
+
#: admin/includes/tab-settings.php:1178
|
1185 |
msgid ""
|
1186 |
"<dfn title=\"This option enables to record the validation logs including IP "
|
1187 |
+
"addresses.\">Record “Validation logs”</dfn>"
|
1188 |
msgstr ""
|
1189 |
|
1190 |
+
#: admin/includes/tab-settings.php:1190
|
1191 |
msgid "When blocked"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
+
#: admin/includes/tab-settings.php:1191
|
1195 |
msgid "When passed"
|
1196 |
msgstr ""
|
1197 |
|
1198 |
+
#: admin/includes/tab-settings.php:1192
|
1199 |
msgid "When “blocked” or “passed (not in whitelist)”"
|
1200 |
msgstr ""
|
1201 |
|
1202 |
+
#: admin/includes/tab-settings.php:1193
|
1203 |
msgid "Unauthenticated visitor"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
+
#: admin/includes/tab-settings.php:1194
|
1207 |
msgid "Authenticated user"
|
1208 |
msgstr ""
|
1209 |
|
1210 |
+
#: admin/includes/tab-settings.php:1195
|
1211 |
msgid "All the validation"
|
1212 |
msgstr ""
|
1213 |
|
1214 |
+
#: admin/includes/tab-settings.php:1203
|
1215 |
#, php-format
|
1216 |
msgid ""
|
1217 |
"<dfn title=\"The maximum number of entries in the logs is also limited to %d."
|
1218 |
"\">Expiration time [days] for each entry</dfn>"
|
1219 |
msgstr ""
|
1220 |
|
1221 |
+
#: admin/includes/tab-settings.php:1220
|
1222 |
msgid ""
|
1223 |
"<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
|
1224 |
"with value</dfn>"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: admin/includes/tab-settings.php:1239
|
1228 |
+
msgid "Maximum entries in “Logs”"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: admin/includes/tab-settings.php:1256
|
1232 |
msgid ""
|
1233 |
"<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
|
1234 |
"“Live update”</dfn>"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
+
#: admin/includes/tab-settings.php:1269
|
1238 |
msgid "Ordinary file"
|
1239 |
msgstr ""
|
1240 |
|
1241 |
+
#: admin/includes/tab-settings.php:1270
|
1242 |
msgid "In-Memory"
|
1243 |
msgstr ""
|
1244 |
|
1245 |
+
#: admin/includes/tab-settings.php:1273
|
1246 |
msgid "PDO_SQLITE driver not available"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
+
#: admin/includes/tab-settings.php:1274
|
1250 |
msgid ""
|
1251 |
"It takes a few tens of milliseconds as overhead. It can be safely used "
|
1252 |
"without conflict with other plugins."
|
1253 |
msgstr ""
|
1254 |
|
1255 |
+
#: admin/includes/tab-settings.php:1275
|
1256 |
msgid ""
|
1257 |
"It takes a few milliseconds as overhead. There is a possibility of conflict "
|
1258 |
"with other plugins using this method."
|
1259 |
msgstr ""
|
1260 |
|
1261 |
+
#: admin/includes/tab-settings.php:1283
|
1262 |
msgid "Reset database source of “Live update”"
|
1263 |
msgstr ""
|
1264 |
|
1265 |
+
#: admin/includes/tab-settings.php:1291
|
1266 |
msgid "Reset now"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
+
#: admin/includes/tab-settings.php:1300 admin/includes/tab-settings.php:1427
|
1270 |
msgid ""
|
1271 |
"Task could not be found in WP-Cron. Please try to deactivate this plugin "
|
1272 |
"once and activate again."
|
1273 |
msgstr ""
|
1274 |
|
1275 |
+
#: admin/includes/tab-settings.php:1305
|
1276 |
msgid ""
|
1277 |
"<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
|
1278 |
+
"expired entries in “IP address cache” and “Logs”."
|
1279 |
"\">Interval [sec] to cleanup expired entries of IP address</dfn>"
|
1280 |
msgstr ""
|
1281 |
|
1282 |
+
#: admin/includes/tab-settings.php:1314 admin/includes/tab-settings.php:1443
|
1283 |
#, php-format
|
1284 |
msgid "Next schedule: %s"
|
1285 |
msgstr ""
|
1286 |
|
1287 |
+
#: admin/includes/tab-settings.php:1321
|
1288 |
msgid "Remove all settings and records at uninstallation"
|
1289 |
msgstr ""
|
1290 |
|
1291 |
+
#: admin/includes/tab-settings.php:1338
|
1292 |
msgid "Geolocation API settings"
|
1293 |
msgstr ""
|
1294 |
|
1295 |
+
#: admin/includes/tab-settings.php:1358
|
1296 |
msgid ""
|
1297 |
+
"<dfn title=\"IP address cache and local databases are scanned at the top "
|
1298 |
"priority.\">API selection and key settings</dfn>"
|
1299 |
msgstr ""
|
1300 |
|
1301 |
+
#: admin/includes/tab-settings.php:1377
|
1302 |
msgid "Timeout for network API [sec]"
|
1303 |
msgstr ""
|
1304 |
|
1305 |
+
#: admin/includes/tab-settings.php:1395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1306 |
msgid "Local database settings"
|
1307 |
msgstr ""
|
1308 |
|
1309 |
+
#: admin/includes/tab-settings.php:1409
|
1310 |
msgid "database"
|
1311 |
msgstr ""
|
1312 |
|
1313 |
+
#: admin/includes/tab-settings.php:1410 classes/class-ip-geo-block-cron.php:418
|
1314 |
#, php-format
|
1315 |
msgid "Last update: %s"
|
1316 |
msgstr ""
|
1317 |
|
1318 |
+
#: admin/includes/tab-settings.php:1432
|
1319 |
msgid "Auto updating (once a month)"
|
1320 |
msgstr ""
|
1321 |
|
1322 |
+
#: admin/includes/tab-settings.php:1450
|
1323 |
msgid "Download database"
|
1324 |
msgstr ""
|
1325 |
|
1326 |
+
#: admin/includes/tab-settings.php:1458
|
1327 |
msgid "Download now"
|
1328 |
msgstr ""
|
1329 |
|
1330 |
+
#: admin/includes/tab-settings.php:1469
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1331 |
msgid "Plugin settings"
|
1332 |
msgstr ""
|
1333 |
|
1334 |
+
#: admin/includes/tab-settings.php:1481
|
1335 |
msgid ""
|
1336 |
"<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
|
1337 |
"settings</dfn>"
|
1338 |
msgstr ""
|
1339 |
|
1340 |
+
#: admin/includes/tab-settings.php:1499
|
1341 |
msgid ""
|
1342 |
+
"<dfn title=\"You can access to the login form with a specific key at "
|
1343 |
+
"emergency. Please add the generated link to favorites / bookmarks in your "
|
1344 |
+
"browser as this plugin does not keep the key itself.\">Emergency login link</"
|
1345 |
"dfn>"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: admin/includes/tab-settings.php:1515
|
1349 |
+
msgid ""
|
1350 |
+
"<dfn title=\"Valid key for Google Maps JavaScript API. A free tier has limit "
|
1351 |
+
"even if it's “default”. Maps Embed API without key can be "
|
1352 |
+
"available in case of empty.\">Google Maps API key</dfn>"
|
1353 |
+
msgstr ""
|
1354 |
+
|
1355 |
+
#: admin/includes/tab-settings.php:1531
|
1356 |
msgid "Export / Import settings"
|
1357 |
msgstr ""
|
1358 |
|
1359 |
+
#: admin/includes/tab-settings.php:1538
|
1360 |
msgid "Export settings"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
+
#: admin/includes/tab-settings.php:1539
|
1364 |
msgid "Import from the local file"
|
1365 |
msgstr ""
|
1366 |
|
1367 |
+
#: admin/includes/tab-settings.php:1539
|
1368 |
msgid "Import settings"
|
1369 |
msgstr ""
|
1370 |
|
1371 |
+
#: admin/includes/tab-settings.php:1547
|
1372 |
msgid "Import pre-defined settings"
|
1373 |
msgstr ""
|
1374 |
|
1375 |
+
#: admin/includes/tab-settings.php:1554
|
1376 |
msgid ""
|
1377 |
"Import the default settings to revert to the “Right after "
|
1378 |
"installing” state"
|
1379 |
msgstr ""
|
1380 |
|
1381 |
+
#: admin/includes/tab-settings.php:1554
|
1382 |
msgid "Default settings"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: admin/includes/tab-settings.php:1555
|
1386 |
msgid ""
|
1387 |
"Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
|
1388 |
"for the “Back-end target settings”"
|
1389 |
msgstr ""
|
1390 |
|
1391 |
+
#: admin/includes/tab-settings.php:1555
|
1392 |
msgid "Best for Back-end"
|
1393 |
msgstr ""
|
1394 |
|
1395 |
+
#: admin/includes/tab-settings.php:1564
|
1396 |
+
msgid "DB tables for this plugin"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1397 |
msgstr ""
|
1398 |
|
1399 |
+
#: admin/includes/tab-settings.php:1572
|
1400 |
+
msgid "Initialize now"
|
1401 |
msgstr ""
|
1402 |
|
1403 |
+
#: admin/includes/tab-settings.php:1581
|
1404 |
msgid ""
|
1405 |
"<dfn title=\"When you have some unexpected blocking experiences, please "
|
1406 |
"press the button to find the blocked requests at the end of dumped "
|
1407 |
"information which may help you to solve the issues.\">Diagnostic "
|
1408 |
"information</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
|
1409 |
+
"support/plugin/ip-geo-block\" title=\"[IP Geo Block] Support | WordPress.org"
|
1410 |
+
"\">support forum</a> ]"
|
1411 |
msgstr ""
|
1412 |
|
1413 |
+
#: admin/includes/tab-settings.php:1588
|
1414 |
+
msgid "Please copy & paste when submitting your issue to support forum"
|
1415 |
msgstr ""
|
1416 |
|
1417 |
+
#: admin/includes/tab-settings.php:1588
|
1418 |
msgid "Show information"
|
1419 |
msgstr ""
|
1420 |
|
1421 |
+
#: admin/includes/tab-settings.php:1605
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1422 |
msgid ""
|
1423 |
"While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
|
1424 |
"others will pass an IP address to the 3rd parties' API via HTTP."
|
1425 |
msgstr ""
|
1426 |
|
1427 |
+
#: admin/includes/tab-settings.php:1606
|
1428 |
msgid ""
|
1429 |
"Please select the appropriate APIs to fit the privacy law / regulation in "
|
1430 |
"your country / region."
|
1431 |
msgstr ""
|
1432 |
|
1433 |
+
#: admin/includes/tab-settings.php:1615
|
1434 |
#, php-format
|
1435 |
msgid ""
|
1436 |
"Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
|
1437 |
"2.0.0+%s."
|
1438 |
msgstr ""
|
1439 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1440 |
#: admin/includes/tab-statistics.php:19
|
1441 |
msgid "Statistics of validation"
|
1442 |
msgstr ""
|
1443 |
|
1444 |
+
#: admin/includes/tab-statistics.php:32
|
1445 |
msgid "Blocked"
|
1446 |
msgstr ""
|
1447 |
|
1448 |
+
#: admin/includes/tab-statistics.php:56
|
1449 |
msgid "Blocked by countries"
|
1450 |
msgstr ""
|
1451 |
|
1452 |
+
#: admin/includes/tab-statistics.php:96
|
1453 |
msgid "Blocked per day"
|
1454 |
msgstr ""
|
1455 |
|
1456 |
+
#: admin/includes/tab-statistics.php:111
|
1457 |
msgid "Blocked by type of IP address"
|
1458 |
msgstr ""
|
1459 |
|
1460 |
+
#: admin/includes/tab-statistics.php:128
|
1461 |
msgid "Name of API"
|
1462 |
msgstr ""
|
1463 |
|
1464 |
+
#: admin/includes/tab-statistics.php:129
|
1465 |
msgid "Call"
|
1466 |
msgstr ""
|
1467 |
|
1468 |
+
#: admin/includes/tab-statistics.php:130
|
1469 |
msgid "Response [msec]"
|
1470 |
msgstr ""
|
1471 |
|
1472 |
+
#: admin/includes/tab-statistics.php:144
|
1473 |
msgid "Average response time of each API"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
+
#: admin/includes/tab-statistics.php:159
|
1477 |
msgid "Clear statistics"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
+
#: admin/includes/tab-statistics.php:179
|
1481 |
+
msgid "Statistics in validation logs"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
+
#: admin/includes/tab-statistics.php:210
|
1485 |
+
msgid "Statistics in IP address cache"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
+
#: admin/includes/tab-statistics.php:222
|
1489 |
msgid "Search in cache"
|
1490 |
msgstr ""
|
1491 |
|
1492 |
+
#: admin/includes/tab-statistics.php:261
|
1493 |
msgid "Clear cache"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
+
#: admin/includes/tab-statistics.php:277
|
1497 |
msgid "Export cache"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
+
#: admin/includes/tab-statistics.php:300
|
1501 |
msgid "Country (Top 10)"
|
1502 |
msgstr ""
|
1503 |
|
1504 |
+
#: admin/includes/tab-statistics.php:301
|
1505 |
msgid "AS number (Top 10)"
|
1506 |
msgstr ""
|
1507 |
|
1508 |
+
#: admin/includes/tab-statistics.php:302
|
1509 |
msgid "IP address (Top 10)"
|
1510 |
msgstr ""
|
1511 |
|
1512 |
+
#: admin/includes/tab-statistics.php:303
|
1513 |
msgid "Slug in back-end"
|
1514 |
msgstr ""
|
1515 |
|
1516 |
+
#: admin/includes/tab-statistics.php:355
|
1517 |
msgid "Toggle sorting order"
|
1518 |
msgstr ""
|
1519 |
|
1520 |
+
#: admin/includes/tab-statistics.php:406
|
1521 |
#, php-format
|
1522 |
+
msgid "[ %sRecord “Statistics of validation”%s ] is disabled."
|
1523 |
msgstr ""
|
1524 |
|
1525 |
+
#: admin/includes/tab-statistics.php:407
|
1526 |
msgid ""
|
1527 |
"Please set the proper condition to record and analyze the validation "
|
1528 |
"statistics."
|
1529 |
msgstr ""
|
1530 |
|
1531 |
+
#: admin/includes/tab-statistics.php:420
|
1532 |
#, php-format
|
1533 |
+
msgid "[ %sRecord “IP address cache”%s ] is disabled."
|
1534 |
msgstr ""
|
1535 |
|
1536 |
+
#: admin/includes/tab-statistics.php:421
|
1537 |
msgid "Please set the proper condition to record IP address in cache."
|
1538 |
msgstr ""
|
1539 |
|
1540 |
+
#: classes/class-ip-geo-block-cron.php:221
|
|
|
|
|
|
|
|
|
|
|
|
|
1541 |
#, php-format
|
1542 |
msgid "Can't lock <code>%s</code>. Please try again after a while."
|
1543 |
msgstr ""
|
1544 |
|
1545 |
+
#: classes/class-ip-geo-block-cron.php:300
|
1546 |
msgid "Your database file is up-to-date."
|
1547 |
msgstr ""
|
1548 |
|
1549 |
+
#: classes/class-ip-geo-block-cron.php:399
|
1550 |
msgid "gz or zip is not supported on your system."
|
1551 |
msgstr ""
|
1552 |
|
1568 |
"details."
|
1569 |
msgstr ""
|
1570 |
|
1571 |
+
#: classes/class-ip-geo-block-logs.php:236
|
1572 |
#, php-format
|
1573 |
msgid ""
|
1574 |
"Creating a DB table %s had failed. Once de-activate this plugin, and then "
|
1575 |
"activate again."
|
1576 |
msgstr ""
|
1577 |
|
1578 |
+
#: classes/class-ip-geo-block-logs.php:241
|
1579 |
#, php-format
|
1580 |
msgid ""
|
1581 |
"Column type in %s unmatched. Once de-activate this plugin, and then activate "
|
1582 |
"again."
|
1583 |
msgstr ""
|
1584 |
|
1585 |
+
#: classes/class-ip-geo-block.php:417
|
1586 |
msgid "Dashboard"
|
1587 |
msgstr ""
|
1588 |
|
1592 |
msgid "Database file does not exist."
|
1593 |
msgstr ""
|
1594 |
|
1595 |
+
#: wp-content/mu-plugins/ip-geo-block-mu.php:72
|
1596 |
#, php-format
|
1597 |
msgid ""
|
1598 |
"Can't find IP Geo Block in your plugins directory. Please remove <code>%s</"
|
rewrite-ini.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*
|
11 |
* THIS IS FOR THE ADVANCED USERS:
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*
|
11 |
* THIS IS FOR THE ADVANCED USERS:
|
rewrite.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*
|
11 |
* THIS IS FOR THE ADVANCED USERS:
|
@@ -104,25 +104,25 @@ class IP_Geo_Block_Rewrite {
|
|
104 |
// get document root
|
105 |
// Note: super global can not be infected even when `register_globals` is on.
|
106 |
// @see wp-admin/network.php, get_home_path() in wp-admin/includes/file.php
|
107 |
-
// @link
|
108 |
-
// @link
|
109 |
-
// @link
|
110 |
-
// @link
|
111 |
// @link http://community.sitepoint.com/t/-server-document-root-injection-vulnerability/5274
|
112 |
-
// @link
|
113 |
-
// @link
|
114 |
$root = ! empty( $_SERVER['DOCUMENT_ROOT'] ) ?
|
115 |
$_SERVER['DOCUMENT_ROOT'] :
|
116 |
substr( $_SERVER['SCRIPT_FILENAME'], 0, -strlen( $_SERVER['SCRIPT_NAME'] ) );
|
117 |
|
118 |
// get absolute path of requested uri
|
119 |
-
// @link
|
120 |
$path = ( $root = self::normalize_path( $root ) ) . parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH );
|
121 |
|
122 |
// while malicios URI may be intercepted by the server,
|
123 |
// null byte attack should be invalidated just in case.
|
124 |
// Note: is_file(), is_readable(), file_exists() need a valid path.
|
125 |
-
// @link
|
126 |
// @example $path = "/etc/passwd\0.php"; is_file( $path ) === true (5.2.14), false (5.4.4)
|
127 |
$path = self::realpath( str_replace( "\0", '', $path ) );
|
128 |
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*
|
11 |
* THIS IS FOR THE ADVANCED USERS:
|
104 |
// get document root
|
105 |
// Note: super global can not be infected even when `register_globals` is on.
|
106 |
// @see wp-admin/network.php, get_home_path() in wp-admin/includes/file.php
|
107 |
+
// @link https://php.net/manual/en/security.globals.php
|
108 |
+
// @link https://php.net/manual/en/reserved.variables.php#63831
|
109 |
+
// @link https://blog.fyneworks.com/2007/08/php-documentroot-in-iis-windows-servers.html
|
110 |
+
// @link https://stackoverflow.com/questions/11893832/is-it-a-good-idea-to-use-serverdocument-root-in-includes
|
111 |
// @link http://community.sitepoint.com/t/-server-document-root-injection-vulnerability/5274
|
112 |
+
// @link https://www.securityfocus.com/archive/1/476274/100/0/threaded
|
113 |
+
// @link https://www.securityfocus.com/archive/1/476437/100/0/threaded
|
114 |
$root = ! empty( $_SERVER['DOCUMENT_ROOT'] ) ?
|
115 |
$_SERVER['DOCUMENT_ROOT'] :
|
116 |
substr( $_SERVER['SCRIPT_FILENAME'], 0, -strlen( $_SERVER['SCRIPT_NAME'] ) );
|
117 |
|
118 |
// get absolute path of requested uri
|
119 |
+
// @link https://davidwalsh.name/iis-php-server-request_uri
|
120 |
$path = ( $root = self::normalize_path( $root ) ) . parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH );
|
121 |
|
122 |
// while malicios URI may be intercepted by the server,
|
123 |
// null byte attack should be invalidated just in case.
|
124 |
// Note: is_file(), is_readable(), file_exists() need a valid path.
|
125 |
+
// @link https://php.net/releases/5_3_4.php, https://bugs.php.net/bug.php?id=39863
|
126 |
// @example $path = "/etc/passwd\0.php"; is_file( $path ) === true (5.2.14), false (5.4.4)
|
127 |
$path = self::realpath( str_replace( "\0", '', $path ) );
|
128 |
|
samples.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
/* Start loading wp-load.php */
|
@@ -302,11 +302,11 @@ add_filter( 'ip-geo-block-maxmind-dir', 'my_maxmind_dir' );
|
|
302 |
* @return string $url replaced url to zip file
|
303 |
*/
|
304 |
function my_maxmind_ipv4( $url ) {
|
305 |
-
return '
|
306 |
}
|
307 |
|
308 |
function my_maxmind_ipv6( $url ) {
|
309 |
-
return '
|
310 |
}
|
311 |
|
312 |
add_filter( 'ip-geo-block-maxmind-zip-ipv4', 'my_maxmind_ipv4' );
|
@@ -402,3 +402,17 @@ function my_record_logs( $record, $hook, $validate ) {
|
|
402 |
}
|
403 |
|
404 |
add_filter( 'ip-geo-block-record-logs', 'my_record_logs', 10, 3 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
/* Start loading wp-load.php */
|
302 |
* @return string $url replaced url to zip file
|
303 |
*/
|
304 |
function my_maxmind_ipv4( $url ) {
|
305 |
+
return 'https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz';
|
306 |
}
|
307 |
|
308 |
function my_maxmind_ipv6( $url ) {
|
309 |
+
return 'https://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz';
|
310 |
}
|
311 |
|
312 |
add_filter( 'ip-geo-block-maxmind-zip-ipv4', 'my_maxmind_ipv4' );
|
402 |
}
|
403 |
|
404 |
add_filter( 'ip-geo-block-record-logs', 'my_record_logs', 10, 3 );
|
405 |
+
|
406 |
+
/**
|
407 |
+
* Example 19: Specify the domain name server for reverse DNS lookup
|
408 |
+
* Use case: Speed up reverse DNS lookup when on-site service is slow
|
409 |
+
*
|
410 |
+
* @param array $servers empty array
|
411 |
+
* @return array $servers array of primary and secondary servers
|
412 |
+
*/
|
413 |
+
function my_gethostbyaddr( $servers ) {
|
414 |
+
return array( '1.1.1.1', '1.0.0.1' ); // APNIC public DNS (faster)
|
415 |
+
// return array( '8.8.8.8', '8.8.4.4' ); // Google public DNS (slower)
|
416 |
+
}
|
417 |
+
|
418 |
+
add_filter( 'ip-geo-block-dns', 'my_gethostbyaddr' );
|
uninstall.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
@@ -54,7 +54,7 @@ class IP_Geo_Block_Uninstall {
|
|
54 |
}
|
55 |
}
|
56 |
|
57 |
-
IP_Geo_Block_Opts::
|
58 |
IP_Geo_Block_Opts::setup_validation_timing( FALSE );
|
59 |
}
|
60 |
|
5 |
* @package IP_Geo_Block
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
54 |
}
|
55 |
}
|
56 |
|
57 |
+
IP_Geo_Block_Opts::uninstall_api( $settings );
|
58 |
IP_Geo_Block_Opts::setup_validation_timing( FALSE );
|
59 |
}
|
60 |
|
wp-content/ip-geo-api/drop-in-sample.php
CHANGED
@@ -7,8 +7,8 @@
|
|
7 |
* @package IP_Geo_Block
|
8 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
9 |
* @license GPL-3.0
|
10 |
-
* @link
|
11 |
-
* @see
|
12 |
* @example Use `IP_Geo_Block::add_filter()` instead of `add_filter()`
|
13 |
*/
|
14 |
class_exists( 'IP_Geo_Block', FALSE ) or die;
|
7 |
* @package IP_Geo_Block
|
8 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
9 |
* @license GPL-3.0
|
10 |
+
* @link https://www.ipgeoblock.com/
|
11 |
+
* @see https://www.ipgeoblock.com/codex/#filter-hooks
|
12 |
* @example Use `IP_Geo_Block::add_filter()` instead of `add_filter()`
|
13 |
*/
|
14 |
class_exists( 'IP_Geo_Block', FALSE ) or die;
|
wp-content/ip-geo-api/ip2location/IP2Location.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* This is the modified version for IP Geo Block
|
4 |
* based on IP2Location PHP Module Version: 7.0.0
|
5 |
-
* from
|
6 |
*/
|
7 |
|
8 |
/**
|
@@ -20,7 +20,7 @@
|
|
20 |
* Lesser General Public License for more details.
|
21 |
*
|
22 |
* You should have received a copy of the GNU Lesser General Public
|
23 |
-
* License along with this library; If not, see <
|
24 |
*/
|
25 |
|
26 |
class IP2LocationRecord {
|
2 |
/**
|
3 |
* This is the modified version for IP Geo Block
|
4 |
* based on IP2Location PHP Module Version: 7.0.0
|
5 |
+
* from https://www.ip2location.com/developers/php
|
6 |
*/
|
7 |
|
8 |
/**
|
20 |
* Lesser General Public License for more details.
|
21 |
*
|
22 |
* You should have received a copy of the GNU Lesser General Public
|
23 |
+
* License along with this library; If not, see <https://www.gnu.org/licenses/>.
|
24 |
*/
|
25 |
|
26 |
class IP2LocationRecord {
|
wp-content/ip-geo-api/ip2location/bcmath.php
CHANGED
@@ -34,7 +34,7 @@ else: // extension_loaded('gmp')
|
|
34 |
if ( ! function_exists('bcadd') ):
|
35 |
/**
|
36 |
* bcadd — Add two arbitrary precision numbers.
|
37 |
-
* @link
|
38 |
*/
|
39 |
function bcadd($Num1='0',$Num2='0',$Scale=null) {
|
40 |
// check if they're valid positive numbers, extract the whole numbers and decimals
|
@@ -90,7 +90,7 @@ endif; // ! function_exists('bcadd')
|
|
90 |
if ( ! function_exists('bcsub') ):
|
91 |
/**
|
92 |
* bcsub — Subtract one arbitrary precision number from another.
|
93 |
-
* @link
|
94 |
*/
|
95 |
function bcsub($Num1='0',$Num2='0',$Scale=null) {
|
96 |
// check if they're valid positive numbers, extract the whole numbers and decimals
|
@@ -146,7 +146,7 @@ endif; // ! function_exists('bcsub')
|
|
146 |
if ( ! function_exists('bcmul') ):
|
147 |
/**
|
148 |
* bcmul — Multiply two arbitrary precision numbers.
|
149 |
-
* @link
|
150 |
*/
|
151 |
function bcmul($Num1='0',$Num2='0') {
|
152 |
// check if they're both plain numbers
|
@@ -200,7 +200,7 @@ endif; // ! function_exists('bcmul')
|
|
200 |
if ( ! function_exists('bcpow') ):
|
201 |
/**
|
202 |
* bcpow — Raise an arbitrary precision number to another.
|
203 |
-
* @link
|
204 |
*/
|
205 |
function bcpow($num, $power) {
|
206 |
$awnser = "1";
|
34 |
if ( ! function_exists('bcadd') ):
|
35 |
/**
|
36 |
* bcadd — Add two arbitrary precision numbers.
|
37 |
+
* @link https://php.net/manual/en/function.bcadd.php
|
38 |
*/
|
39 |
function bcadd($Num1='0',$Num2='0',$Scale=null) {
|
40 |
// check if they're valid positive numbers, extract the whole numbers and decimals
|
90 |
if ( ! function_exists('bcsub') ):
|
91 |
/**
|
92 |
* bcsub — Subtract one arbitrary precision number from another.
|
93 |
+
* @link https://php.net/manual/en/function.bcsub.php
|
94 |
*/
|
95 |
function bcsub($Num1='0',$Num2='0',$Scale=null) {
|
96 |
// check if they're valid positive numbers, extract the whole numbers and decimals
|
146 |
if ( ! function_exists('bcmul') ):
|
147 |
/**
|
148 |
* bcmul — Multiply two arbitrary precision numbers.
|
149 |
+
* @link https://php.net/manual/en/function.bcmul.php
|
150 |
*/
|
151 |
function bcmul($Num1='0',$Num2='0') {
|
152 |
// check if they're both plain numbers
|
200 |
if ( ! function_exists('bcpow') ):
|
201 |
/**
|
202 |
* bcpow — Raise an arbitrary precision number to another.
|
203 |
+
* @link https://php.net/manual/en/function.bcmul.php
|
204 |
*/
|
205 |
function bcpow($num, $power) {
|
206 |
$awnser = "1";
|
wp-content/ip-geo-api/ip2location/class-ip2location.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
/**
|
3 |
* IP Geo Block API class library for IP2Location
|
4 |
*
|
5 |
-
* @version 1.1.
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
@@ -17,15 +17,15 @@ class_exists( 'IP_Geo_Block_API', FALSE ) or die;
|
|
17 |
*/
|
18 |
define( 'IP_GEO_BLOCK_IP2LOC_IPV4_DAT', 'IP2LOCATION-LITE-DB1.BIN' );
|
19 |
define( 'IP_GEO_BLOCK_IP2LOC_IPV6_DAT', 'IP2LOCATION-LITE-DB1.IPV6.BIN' );
|
20 |
-
define( 'IP_GEO_BLOCK_IP2LOC_IPV4_ZIP', '
|
21 |
-
define( 'IP_GEO_BLOCK_IP2LOC_IPV6_ZIP', '
|
22 |
-
define( 'IP_GEO_BLOCK_IP2LOC_DOWNLOAD', '
|
23 |
|
24 |
/**
|
25 |
* Class for IP2Location
|
26 |
*
|
27 |
-
* URL :
|
28 |
-
* Term of use :
|
29 |
* Licence fee : Creative Commons Attribution-ShareAlike 4.0 Unported License
|
30 |
* Input type : IP address (IPv4)
|
31 |
* Output type : array
|
@@ -142,7 +142,7 @@ class IP_Geo_Block_API_IP2Location extends IP_Geo_Block_API {
|
|
142 |
}
|
143 |
|
144 |
public function get_attribution() {
|
145 |
-
return 'This site or product includes IP2Location LITE data available from <a class="ip-geo-block-link" href="
|
146 |
}
|
147 |
|
148 |
public function add_settings_field( $field, $section, $option_slug, $option_name, $options, $callback, $str_path, $str_last ) {
|
@@ -216,6 +216,6 @@ IP_Geo_Block_Provider::register_addon( array(
|
|
216 |
'IP2Location' => array(
|
217 |
'key' => NULL,
|
218 |
'type' => 'IPv4, IPv6 / LGPLv3',
|
219 |
-
'link' => '<a class="ip-geo-block-link" href="
|
220 |
),
|
221 |
) );
|
2 |
/**
|
3 |
* IP Geo Block API class library for IP2Location
|
4 |
*
|
5 |
+
* @version 1.1.13
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
17 |
*/
|
18 |
define( 'IP_GEO_BLOCK_IP2LOC_IPV4_DAT', 'IP2LOCATION-LITE-DB1.BIN' );
|
19 |
define( 'IP_GEO_BLOCK_IP2LOC_IPV6_DAT', 'IP2LOCATION-LITE-DB1.IPV6.BIN' );
|
20 |
+
define( 'IP_GEO_BLOCK_IP2LOC_IPV4_ZIP', 'https://download.ip2location.com/lite/IP2LOCATION-LITE-DB1.BIN.ZIP' );
|
21 |
+
define( 'IP_GEO_BLOCK_IP2LOC_IPV6_ZIP', 'https://download.ip2location.com/lite/IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP' );
|
22 |
+
define( 'IP_GEO_BLOCK_IP2LOC_DOWNLOAD', 'https://lite.ip2location.com/database/ip-country' );
|
23 |
|
24 |
/**
|
25 |
* Class for IP2Location
|
26 |
*
|
27 |
+
* URL : https://www.ip2location.com/
|
28 |
+
* Term of use : https://www.ip2location.com/terms
|
29 |
* Licence fee : Creative Commons Attribution-ShareAlike 4.0 Unported License
|
30 |
* Input type : IP address (IPv4)
|
31 |
* Output type : array
|
142 |
}
|
143 |
|
144 |
public function get_attribution() {
|
145 |
+
return 'This site or product includes IP2Location LITE data available from <a class="ip-geo-block-link" href="https://lite.ip2location.com" rel=noreferrer target=_blank>https://lite.ip2location.com</a>. (<a href="https://creativecommons.org/licenses/by-sa/4.0/" title="Creative Commons — Attribution-ShareAlike 4.0 International — CC BY-SA 4.0" rel=noreferrer target=_blank>CC BY-SA 4.0</a>)';
|
146 |
}
|
147 |
|
148 |
public function add_settings_field( $field, $section, $option_slug, $option_name, $options, $callback, $str_path, $str_last ) {
|
216 |
'IP2Location' => array(
|
217 |
'key' => NULL,
|
218 |
'type' => 'IPv4, IPv6 / LGPLv3',
|
219 |
+
'link' => '<a class="ip-geo-block-link" href="https://lite.ip2location.com/" title="Free IP Geolocation Database" rel=noreferrer target=_blank>https://lite.ip2location.com/</a> (IPv4, IPv6 / LGPLv3)',
|
220 |
),
|
221 |
) );
|
wp-content/ip-geo-api/maxmind/class-maxmind-geolite2.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
/**
|
3 |
* IP Geo Block API class library for Maxmind
|
4 |
*
|
5 |
-
* @version 1.1.
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
@@ -16,12 +16,12 @@ class_exists( 'IP_Geo_Block_API', FALSE ) or die;
|
|
16 |
*
|
17 |
* https://www.maxmind.com/en/open-source-data-and-api-for-ip-geolocation
|
18 |
* https://stackoverflow.com/questions/9416508/php-untar-gz-without-exec
|
19 |
-
*
|
20 |
*/
|
21 |
define( 'IP_GEO_BLOCK_GEOLITE2_DB_IP', 'GeoLite2-Country.mmdb' );
|
22 |
define( 'IP_GEO_BLOCK_GEOLITE2_DB_ASN', 'GeoLite2-ASN.mmdb' );
|
23 |
-
define( 'IP_GEO_BLOCK_GEOLITE2_ZIP_IP', '
|
24 |
-
define( 'IP_GEO_BLOCK_GEOLITE2_ZIP_ASN', '
|
25 |
define( 'IP_GEO_BLOCK_GEOLITE2_DOWNLOAD', 'https://dev.maxmind.com/geoip/geoip2/geolite2/' );
|
26 |
|
27 |
/**
|
@@ -135,7 +135,7 @@ endif; // ! empty( $db['use_asn'] ) || ! empty( $db['asn_path'] )
|
|
135 |
}
|
136 |
|
137 |
public function get_attribution() {
|
138 |
-
return 'This product includes GeoLite2 data created by MaxMind, available from <a class="ip-geo-block-link" href="
|
139 |
}
|
140 |
|
141 |
public function add_settings_field( $field, $section, $option_slug, $option_name, $options, $callback, $str_path, $str_last ) {
|
2 |
/**
|
3 |
* IP Geo Block API class library for Maxmind
|
4 |
*
|
5 |
+
* @version 1.1.13
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
16 |
*
|
17 |
* https://www.maxmind.com/en/open-source-data-and-api-for-ip-geolocation
|
18 |
* https://stackoverflow.com/questions/9416508/php-untar-gz-without-exec
|
19 |
+
* https://php.net/manual/phardata.extractto.php
|
20 |
*/
|
21 |
define( 'IP_GEO_BLOCK_GEOLITE2_DB_IP', 'GeoLite2-Country.mmdb' );
|
22 |
define( 'IP_GEO_BLOCK_GEOLITE2_DB_ASN', 'GeoLite2-ASN.mmdb' );
|
23 |
+
define( 'IP_GEO_BLOCK_GEOLITE2_ZIP_IP', 'https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz' );
|
24 |
+
define( 'IP_GEO_BLOCK_GEOLITE2_ZIP_ASN', 'https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz' );
|
25 |
define( 'IP_GEO_BLOCK_GEOLITE2_DOWNLOAD', 'https://dev.maxmind.com/geoip/geoip2/geolite2/' );
|
26 |
|
27 |
/**
|
135 |
}
|
136 |
|
137 |
public function get_attribution() {
|
138 |
+
return 'This product includes GeoLite2 data created by MaxMind, available from <a class="ip-geo-block-link" href="https://www.maxmind.com" rel=noreferrer target=_blank>https://www.maxmind.com</a>. (<a href="https://creativecommons.org/licenses/by-sa/4.0/" title="Creative Commons — Attribution-ShareAlike 4.0 International — CC BY-SA 4.0" rel=noreferrer target=_blank>CC BY-SA 4.0</a>)';
|
139 |
}
|
140 |
|
141 |
public function add_settings_field( $field, $section, $option_slug, $option_name, $options, $callback, $str_path, $str_last ) {
|
wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
/**
|
3 |
* IP Geo Block API class library for Maxmind
|
4 |
*
|
5 |
-
* @version 1.1.
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
@@ -20,18 +20,18 @@ define( 'IP_GEO_BLOCK_MAXMIND_IPV6_DAT', 'GeoIPv6.dat' );
|
|
20 |
define( 'IP_GEO_BLOCK_MAXMIND_ASN4_DAT', 'GeoIPASNum.dat' );
|
21 |
define( 'IP_GEO_BLOCK_MAXMIND_ASN6_DAT', 'GeoIPASNumv6.dat' );
|
22 |
|
23 |
-
define( 'IP_GEO_BLOCK_MAXMIND_IPV4_ZIP', '
|
24 |
-
define( 'IP_GEO_BLOCK_MAXMIND_IPV6_ZIP', '
|
25 |
-
define( 'IP_GEO_BLOCK_MAXMIND_ASN4_ZIP', '
|
26 |
-
define( 'IP_GEO_BLOCK_MAXMIND_ASN6_ZIP', '
|
27 |
|
28 |
-
define( 'IP_GEO_BLOCK_MAXMIND_DOWNLOAD', '
|
29 |
|
30 |
/**
|
31 |
* Class for Maxmind
|
32 |
*
|
33 |
-
* URL :
|
34 |
-
* Term of use :
|
35 |
* Licence fee : Creative Commons Attribution-ShareAlike 3.0 Unported License
|
36 |
* Input type : IP address (IPv4, IPv6)
|
37 |
* Output type : array
|
@@ -219,7 +219,7 @@ endif; // ! empty( $db['use_asn'] ) || ! empty( $db['asn4_path'] )
|
|
219 |
}
|
220 |
|
221 |
public function get_attribution() {
|
222 |
-
return 'This product includes GeoLite data created by MaxMind, available from <a class="ip-geo-block-link" href="
|
223 |
}
|
224 |
|
225 |
public function add_settings_field( $field, $section, $option_slug, $option_name, $options, $callback, $str_path, $str_last ) {
|
@@ -354,6 +354,6 @@ IP_Geo_Block_Provider::register_addon( array(
|
|
354 |
'Maxmind' => array(
|
355 |
'key' => NULL,
|
356 |
'type' => 'IPv4, IPv6 / LGPLv2',
|
357 |
-
'link' => '<a class="ip-geo-block-link" href="
|
358 |
),
|
359 |
) );
|
2 |
/**
|
3 |
* IP Geo Block API class library for Maxmind
|
4 |
*
|
5 |
+
* @version 1.1.13
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
|
20 |
define( 'IP_GEO_BLOCK_MAXMIND_ASN4_DAT', 'GeoIPASNum.dat' );
|
21 |
define( 'IP_GEO_BLOCK_MAXMIND_ASN6_DAT', 'GeoIPASNumv6.dat' );
|
22 |
|
23 |
+
define( 'IP_GEO_BLOCK_MAXMIND_IPV4_ZIP', 'https://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz' );
|
24 |
+
define( 'IP_GEO_BLOCK_MAXMIND_IPV6_ZIP', 'https://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz' );
|
25 |
+
define( 'IP_GEO_BLOCK_MAXMIND_ASN4_ZIP', 'https://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz' );
|
26 |
+
define( 'IP_GEO_BLOCK_MAXMIND_ASN6_ZIP', 'https://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz' );
|
27 |
|
28 |
+
define( 'IP_GEO_BLOCK_MAXMIND_DOWNLOAD', 'https://dev.maxmind.com/geoip/legacy/geolite/' );
|
29 |
|
30 |
/**
|
31 |
* Class for Maxmind
|
32 |
*
|
33 |
+
* URL : https://dev.maxmind.com/geoip/legacy/geolite/
|
34 |
+
* Term of use : https://dev.maxmind.com/geoip/legacy/geolite/#License
|
35 |
* Licence fee : Creative Commons Attribution-ShareAlike 3.0 Unported License
|
36 |
* Input type : IP address (IPv4, IPv6)
|
37 |
* Output type : array
|
219 |
}
|
220 |
|
221 |
public function get_attribution() {
|
222 |
+
return 'This product includes GeoLite data created by MaxMind, available from <a class="ip-geo-block-link" href="https://www.maxmind.com" rel=noreferrer target=_blank>https://www.maxmind.com</a>. (<a href="https://creativecommons.org/licenses/by-sa/4.0/" title="Creative Commons — Attribution-ShareAlike 4.0 International — CC BY-SA 4.0" rel=noreferrer target=_blank>CC BY-SA 4.0</a>)';
|
223 |
}
|
224 |
|
225 |
public function add_settings_field( $field, $section, $option_slug, $option_name, $options, $callback, $str_path, $str_last ) {
|
354 |
'Maxmind' => array(
|
355 |
'key' => NULL,
|
356 |
'type' => 'IPv4, IPv6 / LGPLv2',
|
357 |
+
'link' => '<a class="ip-geo-block-link" href="https://dev.maxmind.com/geoip/" title="GeoIP Products « Maxmind Developer Site" rel=noreferrer target=_blank>https://dev.maxmind.com/geoip/</a> (IPv4, IPv6 / LGPLv2)',
|
358 |
),
|
359 |
) );
|
wp-content/ip-geo-api/maxmind/class-maxmind.php
CHANGED
@@ -2,15 +2,15 @@
|
|
2 |
/**
|
3 |
* IP Geo Block API class library for Maxmind
|
4 |
*
|
5 |
-
* @version 1.1.
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
-
* @link
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
class_exists( 'IP_Geo_Block_API', FALSE ) or die;
|
12 |
|
13 |
-
if (
|
14 |
|
15 |
require_once dirname( __FILE__ ) . '/class-maxmind-geolite2.php';
|
16 |
|
2 |
/**
|
3 |
* IP Geo Block API class library for Maxmind
|
4 |
*
|
5 |
+
* @version 1.1.13
|
6 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
7 |
* @license GPL-3.0
|
8 |
+
* @link https://www.ipgeoblock.com/
|
9 |
* @copyright 2013-2018 tokkonopapa
|
10 |
*/
|
11 |
class_exists( 'IP_Geo_Block_API', FALSE ) or die;
|
12 |
|
13 |
+
if ( PHP_VERSION_ID >= 50400 ): // @since PHP 5.2.7 (WordPress 3.7 requires PHP 5.2.4)
|
14 |
|
15 |
require_once dirname( __FILE__ ) . '/class-maxmind-geolite2.php';
|
16 |
|
wp-content/ip-geo-api/maxmind/vendor/LICENSE
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
Apache License
|
3 |
Version 2.0, January 2004
|
4 |
-
|
5 |
|
6 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7 |
|
@@ -193,7 +193,7 @@
|
|
193 |
you may not use this file except in compliance with the License.
|
194 |
You may obtain a copy of the License at
|
195 |
|
196 |
-
|
197 |
|
198 |
Unless required by applicable law or agreed to in writing, software
|
199 |
distributed under the License is distributed on an "AS IS" BASIS,
|
1 |
|
2 |
Apache License
|
3 |
Version 2.0, January 2004
|
4 |
+
https://www.apache.org/licenses/
|
5 |
|
6 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7 |
|
193 |
you may not use this file except in compliance with the License.
|
194 |
You may obtain a copy of the License at
|
195 |
|
196 |
+
https://www.apache.org/licenses/LICENSE-2.0
|
197 |
|
198 |
Unless required by applicable law or agreed to in writing, software
|
199 |
distributed under the License is distributed on an "AS IS" BASIS,
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/LICENSE
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
Apache License
|
3 |
Version 2.0, January 2004
|
4 |
-
|
5 |
|
6 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7 |
|
@@ -193,7 +193,7 @@
|
|
193 |
you may not use this file except in compliance with the License.
|
194 |
You may obtain a copy of the License at
|
195 |
|
196 |
-
|
197 |
|
198 |
Unless required by applicable law or agreed to in writing, software
|
199 |
distributed under the License is distributed on an "AS IS" BASIS,
|
1 |
|
2 |
Apache License
|
3 |
Version 2.0, January 2004
|
4 |
+
https://www.apache.org/licenses/
|
5 |
|
6 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7 |
|
193 |
you may not use this file except in compliance with the License.
|
194 |
You may obtain a copy of the License at
|
195 |
|
196 |
+
https://www.apache.org/licenses/LICENSE-2.0
|
197 |
|
198 |
Unless required by applicable law or agreed to in writing, software
|
199 |
distributed under the License is distributed on an "AS IS" BASIS,
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/README.md
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
## Description ##
|
4 |
|
5 |
This package provides an API for the GeoIP2
|
6 |
-
[web services](
|
7 |
-
[databases](
|
8 |
works with the free
|
9 |
-
[GeoLite2 databases](
|
10 |
|
11 |
## Install via Composer ##
|
12 |
|
13 |
-
We recommend installing this package with [Composer](
|
14 |
|
15 |
### Download Composer ###
|
16 |
|
@@ -46,18 +46,18 @@ require 'vendor/autoload.php';
|
|
46 |
## Install via Phar ##
|
47 |
|
48 |
Although we strongly recommend using Composer, we also provide a
|
49 |
-
[phar archive](
|
50 |
dependencies for GeoIP2. Our latest phar archive is available on
|
51 |
[our releases page](https://github.com/maxmind/GeoIP2-php/releases).
|
52 |
|
53 |
### Install Dependencies ###
|
54 |
|
55 |
In order to use the phar archive, you must have the PHP
|
56 |
-
[Phar extension](
|
57 |
enabled.
|
58 |
|
59 |
If you will be making web service requests, you must have the PHP
|
60 |
-
[cURL extension](
|
61 |
installed to use this archive. For Debian based distributions, this can
|
62 |
typically be found in the the `php-curl` package. For other operating
|
63 |
systems, please consult the relevant documentation. After installing the
|
@@ -326,7 +326,7 @@ Because of these factors, it is possible for any end point to return a record
|
|
326 |
where some or all of the attributes are unpopulated.
|
327 |
|
328 |
See the
|
329 |
-
[GeoIP2 Precision web service docs](
|
330 |
for details on what data each end point may return.
|
331 |
|
332 |
The only piece of data which is always returned is the `ipAddress`
|
@@ -334,7 +334,7 @@ attribute in the `GeoIp2\Record\Traits` record.
|
|
334 |
|
335 |
## Integration with GeoNames ##
|
336 |
|
337 |
-
[GeoNames](
|
338 |
databases with data on geographical features around the world, including
|
339 |
populated places. They offer both free and paid premium data. Each
|
340 |
feature is unique identified by a `geonameId`, which is an integer.
|
@@ -351,10 +351,10 @@ the GeoNames premium data set.
|
|
351 |
|
352 |
If the problem you find is that an IP address is incorrectly mapped,
|
353 |
please
|
354 |
-
[submit your correction to MaxMind](
|
355 |
|
356 |
If you find some other sort of mistake, like an incorrect spelling,
|
357 |
-
please check the [GeoNames site](
|
358 |
you've searched for a place and found it on the GeoNames map view, there
|
359 |
are a number of links you can use to correct data ("move", "edit",
|
360 |
"alternate names", etc.). Once the correction is part of the GeoNames
|
@@ -363,7 +363,7 @@ releases.
|
|
363 |
|
364 |
If you are a paying MaxMind customer and you're not sure where to submit
|
365 |
a correction, please
|
366 |
-
[contact MaxMind support](
|
367 |
|
368 |
## Other Support ##
|
369 |
|
@@ -372,7 +372,7 @@ Please report all issues with this code using the
|
|
372 |
|
373 |
If you are having an issue with a MaxMind service that is not specific
|
374 |
to the client API, please see
|
375 |
-
[our support page](
|
376 |
|
377 |
## Requirements ##
|
378 |
|
@@ -391,7 +391,7 @@ https://github.com/maxmind/MaxMind-DB
|
|
391 |
|
392 |
## Versioning ##
|
393 |
|
394 |
-
The GeoIP2 PHP API uses [Semantic Versioning](
|
395 |
|
396 |
## Copyright and License ##
|
397 |
|
3 |
## Description ##
|
4 |
|
5 |
This package provides an API for the GeoIP2
|
6 |
+
[web services](https://dev.maxmind.com/geoip/geoip2/web-services) and
|
7 |
+
[databases](https://dev.maxmind.com/geoip/geoip2/downloadable). The API also
|
8 |
works with the free
|
9 |
+
[GeoLite2 databases](https://dev.maxmind.com/geoip/geoip2/geolite2/).
|
10 |
|
11 |
## Install via Composer ##
|
12 |
|
13 |
+
We recommend installing this package with [Composer](https://getcomposer.org/).
|
14 |
|
15 |
### Download Composer ###
|
16 |
|
46 |
## Install via Phar ##
|
47 |
|
48 |
Although we strongly recommend using Composer, we also provide a
|
49 |
+
[phar archive](https://php.net/manual/en/book.phar.php) containing most of the
|
50 |
dependencies for GeoIP2. Our latest phar archive is available on
|
51 |
[our releases page](https://github.com/maxmind/GeoIP2-php/releases).
|
52 |
|
53 |
### Install Dependencies ###
|
54 |
|
55 |
In order to use the phar archive, you must have the PHP
|
56 |
+
[Phar extension](https://php.net/manual/en/book.phar.php) installed and
|
57 |
enabled.
|
58 |
|
59 |
If you will be making web service requests, you must have the PHP
|
60 |
+
[cURL extension](https://php.net/manual/en/book.curl.php)
|
61 |
installed to use this archive. For Debian based distributions, this can
|
62 |
typically be found in the the `php-curl` package. For other operating
|
63 |
systems, please consult the relevant documentation. After installing the
|
326 |
where some or all of the attributes are unpopulated.
|
327 |
|
328 |
See the
|
329 |
+
[GeoIP2 Precision web service docs](https://dev.maxmind.com/geoip/geoip2/web-services)
|
330 |
for details on what data each end point may return.
|
331 |
|
332 |
The only piece of data which is always returned is the `ipAddress`
|
334 |
|
335 |
## Integration with GeoNames ##
|
336 |
|
337 |
+
[GeoNames](https://www.geonames.org/) offers web services and downloadable
|
338 |
databases with data on geographical features around the world, including
|
339 |
populated places. They offer both free and paid premium data. Each
|
340 |
feature is unique identified by a `geonameId`, which is an integer.
|
351 |
|
352 |
If the problem you find is that an IP address is incorrectly mapped,
|
353 |
please
|
354 |
+
[submit your correction to MaxMind](https://www.maxmind.com/en/correction).
|
355 |
|
356 |
If you find some other sort of mistake, like an incorrect spelling,
|
357 |
+
please check the [GeoNames site](https://www.geonames.org/) first. Once
|
358 |
you've searched for a place and found it on the GeoNames map view, there
|
359 |
are a number of links you can use to correct data ("move", "edit",
|
360 |
"alternate names", etc.). Once the correction is part of the GeoNames
|
363 |
|
364 |
If you are a paying MaxMind customer and you're not sure where to submit
|
365 |
a correction, please
|
366 |
+
[contact MaxMind support](https://www.maxmind.com/en/support) for help.
|
367 |
|
368 |
## Other Support ##
|
369 |
|
372 |
|
373 |
If you are having an issue with a MaxMind service that is not specific
|
374 |
to the client API, please see
|
375 |
+
[our support page](https://www.maxmind.com/en/support).
|
376 |
|
377 |
## Requirements ##
|
378 |
|
391 |
|
392 |
## Versioning ##
|
393 |
|
394 |
+
The GeoIP2 PHP API uses [Semantic Versioning](https://semver.org/).
|
395 |
|
396 |
## Copyright and License ##
|
397 |
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Model/City.php
CHANGED
@@ -7,7 +7,7 @@ namespace GeoIp2\Model;
|
|
7 |
*
|
8 |
* The only difference between the City and Insights model classes is which
|
9 |
* fields in each record may be populated. See
|
10 |
-
*
|
11 |
*
|
12 |
* @property-read \GeoIp2\Record\City $city City data for the requested IP
|
13 |
* address.
|
7 |
*
|
8 |
* The only difference between the City and Insights model classes is which
|
9 |
* fields in each record may be populated. See
|
10 |
+
* https://dev.maxmind.com/geoip/geoip2/web-services more details.
|
11 |
*
|
12 |
* @property-read \GeoIp2\Record\City $city City data for the requested IP
|
13 |
* address.
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Model/Country.php
CHANGED
@@ -7,7 +7,7 @@ namespace GeoIp2\Model;
|
|
7 |
*
|
8 |
* The only difference between the City and Insights model classes is which
|
9 |
* fields in each record may be populated. See
|
10 |
-
*
|
11 |
*
|
12 |
* @property-read \GeoIp2\Record\Continent $continent Continent data for the
|
13 |
* requested IP address.
|
7 |
*
|
8 |
* The only difference between the City and Insights model classes is which
|
9 |
* fields in each record may be populated. See
|
10 |
+
* https://dev.maxmind.com/geoip/geoip2/web-services more details.
|
11 |
*
|
12 |
* @property-read \GeoIp2\Record\Continent $continent Continent data for the
|
13 |
* requested IP address.
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Model/Enterprise.php
CHANGED
@@ -7,7 +7,7 @@ namespace GeoIp2\Model;
|
|
7 |
*
|
8 |
* The only difference between the City and Enterprise model classes is which
|
9 |
* fields in each record may be populated. See
|
10 |
-
*
|
11 |
*
|
12 |
* @property-read \GeoIp2\Record\City $city City data for the requested IP
|
13 |
* address.
|
7 |
*
|
8 |
* The only difference between the City and Enterprise model classes is which
|
9 |
* fields in each record may be populated. See
|
10 |
+
* https://dev.maxmind.com/geoip/geoip2/web-services more details.
|
11 |
*
|
12 |
* @property-read \GeoIp2\Record\City $city City data for the requested IP
|
13 |
* address.
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Model/Insights.php
CHANGED
@@ -7,7 +7,7 @@ namespace GeoIp2\Model;
|
|
7 |
*
|
8 |
* The only difference between the City and Insights model classes is which
|
9 |
* fields in each record may be populated. See
|
10 |
-
*
|
11 |
*
|
12 |
* @property-read \GeoIp2\Record\City $city City data for the requested IP
|
13 |
* address.
|
7 |
*
|
8 |
* The only difference between the City and Insights model classes is which
|
9 |
* fields in each record may be populated. See
|
10 |
+
* https://dev.maxmind.com/geoip/geoip2/web-services more details.
|
11 |
*
|
12 |
* @property-read \GeoIp2\Record\City $city City data for the requested IP
|
13 |
* address.
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Record/Country.php
CHANGED
@@ -13,7 +13,7 @@ namespace GeoIp2\Record;
|
|
13 |
* @property-read int|null $geonameId The GeoName ID for the country. This
|
14 |
* attribute is returned by location services and databases.
|
15 |
* @property-read string|null $isoCode The
|
16 |
-
* {@link *
|
17 |
* code} for the country. This attribute is returned by all location services
|
18 |
* and databases.
|
19 |
* @property-read string|null $name The name of the country based on the locales
|
13 |
* @property-read int|null $geonameId The GeoName ID for the country. This
|
14 |
* attribute is returned by location services and databases.
|
15 |
* @property-read string|null $isoCode The
|
16 |
+
* {@link * https://en.wikipedia.org/wiki/ISO_3166-1 two-character ISO 3166-1 alpha
|
17 |
* code} for the country. This attribute is returned by all location services
|
18 |
* and databases.
|
19 |
* @property-read string|null $name The name of the country based on the locales
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Record/Location.php
CHANGED
@@ -30,7 +30,7 @@ namespace GeoIp2\Record;
|
|
30 |
* {@link * https://developers.google.com/adwords/api/docs/appendix/cities-DMAregions
|
31 |
* Google AdWords API}.
|
32 |
* @property-read string|null $timeZone The time zone associated with location, as
|
33 |
-
* specified by the {@link
|
34 |
* Database}, e.g., "America/New_York".
|
35 |
*/
|
36 |
class Location extends AbstractRecord
|
30 |
* {@link * https://developers.google.com/adwords/api/docs/appendix/cities-DMAregions
|
31 |
* Google AdWords API}.
|
32 |
* @property-read string|null $timeZone The time zone associated with location, as
|
33 |
+
* specified by the {@link https://www.iana.org/time-zones IANA Time Zone
|
34 |
* Database}, e.g., "America/New_York".
|
35 |
*/
|
36 |
class Location extends AbstractRecord
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Record/RepresentedCountry.php
CHANGED
@@ -13,7 +13,7 @@ namespace GeoIp2\Record;
|
|
13 |
* confidence that the country is correct. This attribute is only available
|
14 |
* from the Insights service and the GeoIP2 Enterprise database.
|
15 |
* @property-read int|null $geonameId The GeoName ID for the country.
|
16 |
-
* @property-read string|null $isoCode The {@link
|
17 |
* two-character ISO 3166-1 alpha code} for the country.
|
18 |
* @property-read string|null $name The name of the country based on the locales list
|
19 |
* passed to the constructor.
|
13 |
* confidence that the country is correct. This attribute is only available
|
14 |
* from the Insights service and the GeoIP2 Enterprise database.
|
15 |
* @property-read int|null $geonameId The GeoName ID for the country.
|
16 |
+
* @property-read string|null $isoCode The {@link https://en.wikipedia.org/wiki/ISO_3166-1
|
17 |
* two-character ISO 3166-1 alpha code} for the country.
|
18 |
* @property-read string|null $name The name of the country based on the locales list
|
19 |
* passed to the constructor.
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Record/Subdivision.php
CHANGED
@@ -17,7 +17,7 @@ namespace GeoIp2\Record;
|
|
17 |
* Country.
|
18 |
* @property-read string|null $isoCode This is a string up to three characters long
|
19 |
* contain the subdivision portion of the
|
20 |
-
* {@link *
|
21 |
* is returned by all location databases and services except Country.
|
22 |
* @property-read string|null $name The name of the subdivision based on the
|
23 |
* locales list passed to the constructor. This attribute is returned by all
|
17 |
* Country.
|
18 |
* @property-read string|null $isoCode This is a string up to three characters long
|
19 |
* contain the subdivision portion of the
|
20 |
+
* {@link * https://en.wikipedia.org/wiki/ISO_3166-2 ISO 3166-2 code}. This attribute
|
21 |
* is returned by all location databases and services except Country.
|
22 |
* @property-read string|null $name The name of the subdivision based on the
|
23 |
* locales list passed to the constructor. This attribute is returned by all
|
wp-content/ip-geo-api/maxmind/vendor/geoip2/geoip2/src/Record/Traits.php
CHANGED
@@ -8,12 +8,12 @@ namespace GeoIp2\Record;
|
|
8 |
* This record is returned by all location services and databases.
|
9 |
*
|
10 |
* @property-read int|null $autonomousSystemNumber The
|
11 |
-
* {@link *
|
12 |
* system number} associated with the IP address. This attribute is only
|
13 |
* available from the City and Insights web service and the GeoIP2
|
14 |
* Enterprise database.
|
15 |
* @property-read string|null $autonomousSystemOrganization The organization
|
16 |
-
* associated with the registered {@link *
|
17 |
* system number} for the IP address. This attribute is only available from
|
18 |
* the City and Insights web service and the GeoIP2 Enterprise
|
19 |
* database.
|
8 |
* This record is returned by all location services and databases.
|
9 |
*
|
10 |
* @property-read int|null $autonomousSystemNumber The
|
11 |
+
* {@link * https://en.wikipedia.org/wiki/Autonomous_system_(Internet) autonomous
|
12 |
* system number} associated with the IP address. This attribute is only
|
13 |
* available from the City and Insights web service and the GeoIP2
|
14 |
* Enterprise database.
|
15 |
* @property-read string|null $autonomousSystemOrganization The organization
|
16 |
+
* associated with the registered {@link * https://en.wikipedia.org/wiki/Autonomous_system_(Internet) autonomous
|
17 |
* system number} for the IP address. This attribute is only available from
|
18 |
* the City and Insights web service and the GeoIP2 Enterprise
|
19 |
* database.
|
wp-content/ip-geo-api/maxmind/vendor/maxmind-db/reader/LICENSE
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
Apache License
|
3 |
Version 2.0, January 2004
|
4 |
-
|
5 |
|
6 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7 |
|
@@ -193,7 +193,7 @@
|
|
193 |
you may not use this file except in compliance with the License.
|
194 |
You may obtain a copy of the License at
|
195 |
|
196 |
-
|
197 |
|
198 |
Unless required by applicable law or agreed to in writing, software
|
199 |
distributed under the License is distributed on an "AS IS" BASIS,
|
1 |
|
2 |
Apache License
|
3 |
Version 2.0, January 2004
|
4 |
+
https://www.apache.org/licenses/
|
5 |
|
6 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7 |
|
193 |
you may not use this file except in compliance with the License.
|
194 |
You may obtain a copy of the License at
|
195 |
|
196 |
+
https://www.apache.org/licenses/LICENSE-2.0
|
197 |
|
198 |
Unless required by applicable law or agreed to in writing, software
|
199 |
distributed under the License is distributed on an "AS IS" BASIS,
|
wp-content/ip-geo-api/maxmind/vendor/maxmind-db/reader/README.md
CHANGED
@@ -7,7 +7,7 @@ format that stores data indexed by IP address subnets (IPv4 or IPv6).
|
|
7 |
|
8 |
## Installation ##
|
9 |
|
10 |
-
We recommend installing this package with [Composer](
|
11 |
|
12 |
### Download Composer ###
|
13 |
|
@@ -113,7 +113,7 @@ Please report all issues with this code using the [GitHub issue tracker]
|
|
113 |
(https://github.com/maxmind/MaxMind-DB-Reader-php/issues).
|
114 |
|
115 |
If you are having an issue with a MaxMind service that is not specific to the
|
116 |
-
client API, please see [our support page](
|
117 |
|
118 |
## Requirements ##
|
119 |
|
@@ -130,7 +130,7 @@ PSR-2 style guidelines. Please include unit tests whenever possible.
|
|
130 |
|
131 |
## Versioning ##
|
132 |
|
133 |
-
The MaxMind DB Reader PHP API uses [Semantic Versioning](
|
134 |
|
135 |
## Copyright and License ##
|
136 |
|
7 |
|
8 |
## Installation ##
|
9 |
|
10 |
+
We recommend installing this package with [Composer](https://getcomposer.org/).
|
11 |
|
12 |
### Download Composer ###
|
13 |
|
113 |
(https://github.com/maxmind/MaxMind-DB-Reader-php/issues).
|
114 |
|
115 |
If you are having an issue with a MaxMind service that is not specific to the
|
116 |
+
client API, please see [our support page](https://www.maxmind.com/en/support).
|
117 |
|
118 |
## Requirements ##
|
119 |
|
130 |
|
131 |
## Versioning ##
|
132 |
|
133 |
+
The MaxMind DB Reader PHP API uses [Semantic Versioning](https://semver.org/).
|
134 |
|
135 |
## Copyright and License ##
|
136 |
|
wp-content/ip-geo-api/maxmind/vendor/maxmind/web-service-common/LICENSE
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
Apache License
|
3 |
Version 2.0, January 2004
|
4 |
-
|
5 |
|
6 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7 |
|
@@ -193,7 +193,7 @@
|
|
193 |
you may not use this file except in compliance with the License.
|
194 |
You may obtain a copy of the License at
|
195 |
|
196 |
-
|
197 |
|
198 |
Unless required by applicable law or agreed to in writing, software
|
199 |
distributed under the License is distributed on an "AS IS" BASIS,
|
1 |
|
2 |
Apache License
|
3 |
Version 2.0, January 2004
|
4 |
+
https://www.apache.org/licenses/
|
5 |
|
6 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7 |
|
193 |
you may not use this file except in compliance with the License.
|
194 |
You may obtain a copy of the License at
|
195 |
|
196 |
+
https://www.apache.org/licenses/LICENSE-2.0
|
197 |
|
198 |
Unless required by applicable law or agreed to in writing, software
|
199 |
distributed under the License is distributed on an "AS IS" BASIS,
|
wp-content/ip-geo-api/maxmind/vendor/maxmind/web-service-common/README.md
CHANGED
@@ -17,7 +17,7 @@ style guidelines. Please include unit tests whenever possible.
|
|
17 |
|
18 |
## Versioning ##
|
19 |
|
20 |
-
This API uses [Semantic Versioning](
|
21 |
|
22 |
## Copyright and License ##
|
23 |
|
17 |
|
18 |
## Versioning ##
|
19 |
|
20 |
+
This API uses [Semantic Versioning](https://semver.org/).
|
21 |
|
22 |
## Copyright and License ##
|
23 |
|
wp-content/mu-plugins/ip-geo-block-mu.php
CHANGED
@@ -7,15 +7,15 @@
|
|
7 |
* @package IP_Geo_Block
|
8 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
9 |
* @license GPL-3.0
|
10 |
-
* @link
|
11 |
* @copyright 2013-2018 tokkonopapa
|
12 |
*
|
13 |
* Plugin Name: IP Geo Block (mu)
|
14 |
-
* Plugin URI:
|
15 |
* Description: It blocks any spams, login attempts and malicious access to the admin area posted from outside your nation, and also prevents zero-day exploit.
|
16 |
* Version: 3.0.0
|
17 |
* Author: tokkonopapa
|
18 |
-
* Author URI:
|
19 |
* Text Domain: ip-geo-block
|
20 |
* License: GPL-3.0
|
21 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
@@ -29,7 +29,7 @@ if ( ! class_exists( 'IP_Geo_Block', FALSE ) ):
|
|
29 |
/*----------------------------------------------------------------------------*
|
30 |
* Detect plugin. For use on Front End only.
|
31 |
*----------------------------------------------------------------------------*/
|
32 |
-
|
33 |
|
34 |
$plugin = 'ip-geo-block/ip-geo-block.php';
|
35 |
|
@@ -45,9 +45,11 @@ if ( is_plugin_active( $plugin ) || is_plugin_active_for_network( $plugin ) ) {
|
|
45 |
if ( version_compare( $plugin['version'], IP_Geo_Block::VERSION ) >= 0 && $plugin['matching_rule'] >= 0 ) {
|
46 |
|
47 |
// Remove instanciation
|
|
|
48 |
remove_action( 'plugins_loaded', array( 'IP_Geo_Block', 'get_instance' ) );
|
49 |
|
50 |
-
//
|
|
|
51 |
IP_Geo_Block::get_instance();
|
52 |
}
|
53 |
}
|
7 |
* @package IP_Geo_Block
|
8 |
* @author tokkonopapa <tokkonopapa@yahoo.com>
|
9 |
* @license GPL-3.0
|
10 |
+
* @link https://www.ipgeoblock.com/
|
11 |
* @copyright 2013-2018 tokkonopapa
|
12 |
*
|
13 |
* Plugin Name: IP Geo Block (mu)
|
14 |
+
* Plugin URI: https://wordpress.org/plugins/ip-geo-block/
|
15 |
* Description: It blocks any spams, login attempts and malicious access to the admin area posted from outside your nation, and also prevents zero-day exploit.
|
16 |
* Version: 3.0.0
|
17 |
* Author: tokkonopapa
|
18 |
+
* Author URI: https://www.ipgeoblock.com/
|
19 |
* Text Domain: ip-geo-block
|
20 |
* License: GPL-3.0
|
21 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
29 |
/*----------------------------------------------------------------------------*
|
30 |
* Detect plugin. For use on Front End only.
|
31 |
*----------------------------------------------------------------------------*/
|
32 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
33 |
|
34 |
$plugin = 'ip-geo-block/ip-geo-block.php';
|
35 |
|
45 |
if ( version_compare( $plugin['version'], IP_Geo_Block::VERSION ) >= 0 && $plugin['matching_rule'] >= 0 ) {
|
46 |
|
47 |
// Remove instanciation
|
48 |
+
remove_action( 'plugins_loaded', 'ip_geo_block_update' );
|
49 |
remove_action( 'plugins_loaded', array( 'IP_Geo_Block', 'get_instance' ) );
|
50 |
|
51 |
+
// Upgrade then instanciate immediately
|
52 |
+
ip_geo_block_update();
|
53 |
IP_Geo_Block::get_instance();
|
54 |
}
|
55 |
}
|