Version Description
- Bugfix: Temp fix for some people who had issues being blocked from the backend.
Download this release
Release Info
Developer | iqpascal |
Plugin | iQ Block Country |
Version | 1.1.42 |
Comparing to | |
See all releases |
Code changes from version 1.4.41 to 1.1.42
- iq-block-country.php +2 -2
- libs/blockcountry-checks.php +4 -4
- libs/blockcountry-settings.php +1 -1
- readme.txt +5 -1
iq-block-country.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: iQ Block Country
|
4 |
Plugin URI: https://www.webence.nl/plugins/iq-block-country-the-wordpress-plugin-that-blocks-countries-for-you/
|
5 |
-
Version: 1.1.
|
6 |
Author: Pascal
|
7 |
Author URI: https://www.webence.nl/
|
8 |
Description: Block visitors from visiting your website and backend website based on which country their IP address is from. The Maxmind GeoIP lite database is used for looking up from which country an ip address is from.
|
@@ -327,7 +327,7 @@ if (($blockcountry_is_login_page || is_admin() || $blockcountry_is_xmlrpc) && ge
|
|
327 |
}
|
328 |
elseif (get_option('blockcountry_blockfrontend') == "on")
|
329 |
{
|
330 |
-
add_action ( '
|
331 |
}
|
332 |
else
|
333 |
{
|
2 |
/*
|
3 |
Plugin Name: iQ Block Country
|
4 |
Plugin URI: https://www.webence.nl/plugins/iq-block-country-the-wordpress-plugin-that-blocks-countries-for-you/
|
5 |
+
Version: 1.1.42
|
6 |
Author: Pascal
|
7 |
Author URI: https://www.webence.nl/
|
8 |
Description: Block visitors from visiting your website and backend website based on which country their IP address is from. The Maxmind GeoIP lite database is used for looking up from which country an ip address is from.
|
327 |
}
|
328 |
elseif (get_option('blockcountry_blockfrontend') == "on")
|
329 |
{
|
330 |
+
add_action ( 'wp_head', 'iqblockcountry_checkCountry', 1 );
|
331 |
}
|
332 |
else
|
333 |
{
|
libs/blockcountry-checks.php
CHANGED
@@ -330,7 +330,7 @@ function iqblockcountry_CheckCountry() {
|
|
330 |
$ip_address = iqblockcountry_get_ipaddress();
|
331 |
$country = iqblockcountry_check_ipaddress($ip_address);
|
332 |
global $blockcountry_is_login_page,$blockcountry_is_xmlrpc;
|
333 |
-
if (($blockcountry_is_login_page || is_admin()
|
334 |
{
|
335 |
$banlist = get_option( 'blockcountry_backendbanlist' );
|
336 |
if (!is_array($banlist)) { $banlist = array(); }
|
@@ -342,7 +342,7 @@ function iqblockcountry_CheckCountry() {
|
|
342 |
}
|
343 |
}
|
344 |
else
|
345 |
-
{
|
346 |
$banlist = get_option( 'blockcountry_banlist' );
|
347 |
if (!is_array($banlist)) { $banlist = array(); }
|
348 |
if (get_option( 'blockcountry_banlist_inverse' ) == 'on') {
|
@@ -355,11 +355,11 @@ function iqblockcountry_CheckCountry() {
|
|
355 |
}
|
356 |
$blocklogin = get_option ( 'blockcountry_blocklogin' );
|
357 |
if ( ((is_user_logged_in()) && ($blocklogin != "on")) || (!(is_user_logged_in())) ) {
|
358 |
-
|
359 |
/* Check ip address against banlist, whitelist and blacklist */
|
360 |
if (iqblockcountry_check($country,$badcountries,$ip_address))
|
361 |
{
|
362 |
-
if (($blockcountry_is_login_page || is_admin()
|
363 |
{
|
364 |
$blocked = get_option('blockcountry_backendnrblocks');
|
365 |
if (empty($blocked)) { $blocked = 0; }
|
330 |
$ip_address = iqblockcountry_get_ipaddress();
|
331 |
$country = iqblockcountry_check_ipaddress($ip_address);
|
332 |
global $blockcountry_is_login_page,$blockcountry_is_xmlrpc;
|
333 |
+
if (($blockcountry_is_login_page || is_admin() || $blockcountry_is_xmlrpc) && get_option('blockcountry_blockbackend') == 'on')
|
334 |
{
|
335 |
$banlist = get_option( 'blockcountry_backendbanlist' );
|
336 |
if (!is_array($banlist)) { $banlist = array(); }
|
342 |
}
|
343 |
}
|
344 |
else
|
345 |
+
{
|
346 |
$banlist = get_option( 'blockcountry_banlist' );
|
347 |
if (!is_array($banlist)) { $banlist = array(); }
|
348 |
if (get_option( 'blockcountry_banlist_inverse' ) == 'on') {
|
355 |
}
|
356 |
$blocklogin = get_option ( 'blockcountry_blocklogin' );
|
357 |
if ( ((is_user_logged_in()) && ($blocklogin != "on")) || (!(is_user_logged_in())) ) {
|
358 |
+
|
359 |
/* Check ip address against banlist, whitelist and blacklist */
|
360 |
if (iqblockcountry_check($country,$badcountries,$ip_address))
|
361 |
{
|
362 |
+
if (($blockcountry_is_login_page || is_admin() || $blockcountry_is_xmlrpc) && get_option('blockcountry_blockbackend') == 'on')
|
363 |
{
|
364 |
$blocked = get_option('blockcountry_backendnrblocks');
|
365 |
if (empty($blocked)) { $blocked = 0; }
|
libs/blockcountry-settings.php
CHANGED
@@ -205,7 +205,7 @@ function iqblockcountry_set_defaults()
|
|
205 |
if (get_option('blockcountry_frontendnrblocks') === FALSE) { update_option('blockcountry_frontendnrblocks', 0); }
|
206 |
if (get_option('blockcountry_header') === FALSE) { update_option('blockcountry_header', 'on'); }
|
207 |
if (get_option('blockcountry_nrstatistics') === FALSE) { update_option('blockcountry_nrstatistics',15); }
|
208 |
-
if (get_option('blockcountry_daysstatistics')
|
209 |
if (get_option('blockcountry_backendwhitelist') === FALSE || (get_option('blockcountry_backendwhitelist') == "")) { update_option('blockcountry_backendwhitelist',$ip_address); }
|
210 |
iqblockcountry_install_db();
|
211 |
iqblockcountry_find_geoip_location();
|
205 |
if (get_option('blockcountry_frontendnrblocks') === FALSE) { update_option('blockcountry_frontendnrblocks', 0); }
|
206 |
if (get_option('blockcountry_header') === FALSE) { update_option('blockcountry_header', 'on'); }
|
207 |
if (get_option('blockcountry_nrstatistics') === FALSE) { update_option('blockcountry_nrstatistics',15); }
|
208 |
+
if (get_option('blockcountry_daysstatistics') === FALSE) { update_option('blockcountry_daysstatistics',30); }
|
209 |
if (get_option('blockcountry_backendwhitelist') === FALSE || (get_option('blockcountry_backendwhitelist') == "")) { update_option('blockcountry_backendwhitelist',$ip_address); }
|
210 |
iqblockcountry_install_db();
|
211 |
iqblockcountry_find_geoip_location();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.webence.nl/plugins/donate
|
|
4 |
Tags: spam, block, country, comments, ban, geo, geo blocking, geo ip, block country, block countries, ban countries, ban country, blacklist, whitelist, security
|
5 |
Requires at least: 3.5.2
|
6 |
Tested up to: 4.7.4
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -213,6 +213,10 @@ As the basic rule is to block all and every post you have to configure this in a
|
|
213 |
|
214 |
== Changelog ==
|
215 |
|
|
|
|
|
|
|
|
|
216 |
= 1.1.41 =
|
217 |
|
218 |
* Change: Removed unnecessary code.
|
4 |
Tags: spam, block, country, comments, ban, geo, geo blocking, geo ip, block country, block countries, ban countries, ban country, blacklist, whitelist, security
|
5 |
Requires at least: 3.5.2
|
6 |
Tested up to: 4.7.4
|
7 |
+
Stable tag: 1.1.42
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
213 |
|
214 |
== Changelog ==
|
215 |
|
216 |
+
= 1.1.42 =
|
217 |
+
|
218 |
+
* Bugfix: Temp fix for some people who had issues being blocked from the backend.
|
219 |
+
|
220 |
= 1.1.41 =
|
221 |
|
222 |
* Change: Removed unnecessary code.
|