iQ Block Country - Version 1.2.4

Version Description

  • Change: Changed webserver ip detection a bit
Download this release

Release Info

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

Code changes from version 1.2.3 to 1.2.4

Files changed (2) hide show
  1. iq-block-country.php +2 -3
  2. readme.txt +7 -3
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.2.3
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.
@@ -83,8 +83,7 @@ function iqblockcountry_localization()
83
  function iqblockcountry_get_ipaddress() {
84
  global $ip_address;
85
 
86
- if (isset($_SERVER['SERVER_ADDR']) && !empty($_SERVER['SERVER_ADDR']));
87
- { $server_address = $_SERVER['SERVER_ADDR']; }
88
 
89
  if ( isset($_SERVER['HTTP_CF_CONNECTING_IP']) && !empty($_SERVER['HTTP_CF_CONNECTING_IP']) ) {
90
  $ip_address = $_SERVER['HTTP_CF_CONNECTING_IP'];
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.2.4
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.
83
  function iqblockcountry_get_ipaddress() {
84
  global $ip_address;
85
 
86
+ $server_address = array_key_exists( 'SERVER_ADDR', $_SERVER ) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
 
87
 
88
  if ( isset($_SERVER['HTTP_CF_CONNECTING_IP']) && !empty($_SERVER['HTTP_CF_CONNECTING_IP']) ) {
89
  $ip_address = $_SERVER['HTTP_CF_CONNECTING_IP'];
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: iqpascal
3
  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: 5.1.1
7
- Stable tag: 1.2.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Requires PHP: 5.6
@@ -233,6 +233,10 @@ be used.
233
 
234
  == Changelog ==
235
 
 
 
 
 
236
  = 1.2.3 =
237
 
238
  * Change: Changed inverse option to that you have to select between 'Block countries selected below' or 'Block all countries except those selected below' as inverse option caused some confusion.
@@ -457,4 +461,4 @@ be used.
457
 
458
  = 1.1.19 =
459
 
460
- This plugin no longer downloads the MaxMind database. You have to download manually or use the GeoIP API.
3
  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: 5.2
7
+ Stable tag: 1.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Requires PHP: 5.6
233
 
234
  == Changelog ==
235
 
236
+ = 1.2.4 =
237
+
238
+ * Change: Changed webserver ip detection a bit
239
+
240
  = 1.2.3 =
241
 
242
  * Change: Changed inverse option to that you have to select between 'Block countries selected below' or 'Block all countries except those selected below' as inverse option caused some confusion.
461
 
462
  = 1.1.19 =
463
 
464
+ This plugin no longer downloads the MaxMind database. You have to download manually or use the GeoIP API.