iQ Block Country - Version 1.1.10

Version Description

  • Small fixes
  • WP 3.9 compatability issue fixed
Download this release

Release Info

Developer iqpascal
Plugin Icon 128x128 iQ Block Country
Version 1.1.10
Comparing to
See all releases

Code changes from version 1.1.8 to 1.1.10

iq-block-country.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: iQ Block Country
4
  Plugin URI: http://www.redeo.nl/2013/12/iq-block-country-wordpress-plugin-blocks-countries/
5
- Version: 1.1.8
6
  Author: Pascal
7
  Author URI: http://www.redeo.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.
@@ -305,7 +305,6 @@ require_once('libs/blockcountry-checks.php');
305
  require_once('libs/blockcountry-settings.php');
306
  require_once('libs/blockcountry-validation.php');
307
  require_once('libs/blockcountry-logging.php');
308
- require_once('libs/blockcountry-tracking.php');
309
 
310
 
311
  /*
@@ -318,8 +317,8 @@ define("IPV4DB","http://geolite.maxmind.com/download/geoip/database/GeoLiteCount
318
  define("IPV4DBFILE",WP_PLUGIN_DIR . "/" . dirname ( plugin_basename ( __FILE__ ) ) . "/GeoIP.dat");
319
  define("IPV6DBFILE",WP_PLUGIN_DIR . "/" . dirname ( plugin_basename ( __FILE__ ) ) . "/GeoIPv6.dat");
320
  define("TRACKINGURL","http://tracking.webence.nl/iq-block-country-tracking.php");
321
- define("VERSION","1.1.8");
322
- define("DBVERSION","118");
323
  define("PLUGINPATH",plugin_dir_path( __FILE__ ));
324
 
325
 
@@ -356,4 +355,4 @@ add_filter ( 'add_option_blockcountry_tracking', 'iqblockcountry_schedule_tracki
356
  add_action ( 'blockcountry_tracking', 'iqblockcountry_tracking' );
357
 
358
 
359
- ?>
2
  /*
3
  Plugin Name: iQ Block Country
4
  Plugin URI: http://www.redeo.nl/2013/12/iq-block-country-wordpress-plugin-blocks-countries/
5
+ Version: 1.1.10
6
  Author: Pascal
7
  Author URI: http://www.redeo.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.
305
  require_once('libs/blockcountry-settings.php');
306
  require_once('libs/blockcountry-validation.php');
307
  require_once('libs/blockcountry-logging.php');
 
308
 
309
 
310
  /*
317
  define("IPV4DBFILE",WP_PLUGIN_DIR . "/" . dirname ( plugin_basename ( __FILE__ ) ) . "/GeoIP.dat");
318
  define("IPV6DBFILE",WP_PLUGIN_DIR . "/" . dirname ( plugin_basename ( __FILE__ ) ) . "/GeoIPv6.dat");
319
  define("TRACKINGURL","http://tracking.webence.nl/iq-block-country-tracking.php");
320
+ define("VERSION","1.1.10");
321
+ define("DBVERSION","119");
322
  define("PLUGINPATH",plugin_dir_path( __FILE__ ));
323
 
324
 
355
  add_action ( 'blockcountry_tracking', 'iqblockcountry_tracking' );
356
 
357
 
358
+ ?>
libs/blockcountry-checks.php CHANGED
@@ -114,7 +114,7 @@ function iqblockcountry_check($country,$badcountries,$ip_address)
114
  }
115
  if ($flagged) { $blocked = TRUE; } else { $blocked = FALSE; }
116
  }
117
- if (is_home() && (get_option('blockcountry_blockhome')) == FALSE)
118
  {
119
  $blocked = FALSE;
120
  }
@@ -199,7 +199,8 @@ function iqblockcountry_CheckCountry() {
199
  * Check if page is the login page
200
  */
201
  function iqblockcountry_is_login_page() {
202
- return !strncmp($_SERVER['REQUEST_URI'], '/wp-login.php', strlen('/wp-login.php'));
 
203
  }
204
 
205
  /*
114
  }
115
  if ($flagged) { $blocked = TRUE; } else { $blocked = FALSE; }
116
  }
117
+ if (is_home() && (get_option('blockcountry_blockhome')) == FALSE && $blockedcategory == "on")
118
  {
119
  $blocked = FALSE;
120
  }
199
  * Check if page is the login page
200
  */
201
  function iqblockcountry_is_login_page() {
202
+ if ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) )
203
+ { return TRUE; } else { return FALSE; }
204
  }
205
 
206
  /*
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: iqpascal,williewonka
3
  Donate link: http://www.redeo.nl/plugins/donate
4
  Tags: spam, block, countries, country, comments, ban, geo, geo blocking, geo ip, block country, block countries, ban countries, ban country, blacklist, whitelist
5
  Requires at least: 3.5.2
6
- Tested up to: 3.8.2
7
- Stable tag: 1.1.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -177,6 +177,15 @@ If storing or sharing an IP address is illegal in your country do not select thi
177
 
178
  == Changelog ==
179
 
 
 
 
 
 
 
 
 
 
180
  = 1.1.8 =
181
 
182
  * Smashed a bug where the homepage was unprotected due to missing check.
3
  Donate link: http://www.redeo.nl/plugins/donate
4
  Tags: spam, block, countries, country, comments, ban, geo, geo blocking, geo ip, block country, block countries, ban countries, ban country, blacklist, whitelist
5
  Requires at least: 3.5.2
6
+ Tested up to: 3.9
7
+ Stable tag: 1.1.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
177
 
178
  == Changelog ==
179
 
180
+ = 1.1.10 =
181
+
182
+ * Small fixes
183
+ * WP 3.9 compatability issue fixed
184
+
185
+ = 1.1.9 =
186
+
187
+ * Bugfix release. v1.1.8 was a faulty release. My apologies!
188
+
189
  = 1.1.8 =
190
 
191
  * Smashed a bug where the homepage was unprotected due to missing check.