AdSense Plugin WP QUADS - Version 2.0.37.1

Version Description

(15th December 2021) = * Fixed: PHP Fatal error: Uncaught Error: Call to undefined function quads_get_client_ip() #447

Download this release

Release Info

Developer wpquads
Plugin Icon 128x128 AdSense Plugin WP QUADS
Version 2.0.37.1
Comparing to
See all releases

Code changes from version 2.0.37 to 2.0.37.1

includes/reports/analytics.php CHANGED
@@ -82,6 +82,24 @@ public function quads_insert_ad_impression(){
82
 
83
  }
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
 
87
  /**
@@ -352,7 +370,7 @@ public function quads_insert_ad_impression(){
352
  $device_name = 'amp';
353
 
354
  $referrer_url = (isset($_SERVER['HTTP_REFERER'])) ? esc_url($_SERVER['HTTP_REFERER']):'';
355
- $user_ip = quads_get_client_ip();
356
  $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
357
  $browser = $_SERVER['HTTP_USER_AGENT'];
358
  require_once QUADS_PLUGIN_DIR . '/admin/includes/mobile-detect.php';
82
 
83
  }
84
 
85
+ public function quads_get_client_ip() {
86
+ $ipaddress = '';
87
+ if (isset($_SERVER['HTTP_CLIENT_IP']))
88
+ $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
89
+ else if(isset($_SERVER['REMOTE_ADDR']))
90
+ $ipaddress = $_SERVER['REMOTE_ADDR'];
91
+ else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
92
+ $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
93
+ else if(isset($_SERVER['HTTP_X_FORWARDED']))
94
+ $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
95
+ else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
96
+ $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
97
+ else if(isset($_SERVER['HTTP_FORWARDED']))
98
+ $ipaddress = $_SERVER['HTTP_FORWARDED'];
99
+ else
100
+ $ipaddress = 'UNKNOWN';
101
+ return $ipaddress;
102
+ }
103
 
104
 
105
  /**
370
  $device_name = 'amp';
371
 
372
  $referrer_url = (isset($_SERVER['HTTP_REFERER'])) ? esc_url($_SERVER['HTTP_REFERER']):'';
373
+ $user_ip = $this->quads_get_client_ip();
374
  $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
375
  $browser = $_SERVER['HTTP_USER_AGENT'];
376
  require_once QUADS_PLUGIN_DIR . '/admin/includes/mobile-detect.php';
quick-adsense-reloaded.php CHANGED
@@ -6,7 +6,7 @@
6
  * Description: Insert Google AdSense and other ad formats fully automatic into your website
7
  * Author: WP Quads
8
  * Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
9
- * Version: 2.0.37
10
  * Text Domain: quick-adsense-reloaded
11
  * Domain Path: languages
12
  * Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
@@ -38,7 +38,7 @@ if( !defined( 'ABSPATH' ) )
38
 
39
  // Plugin version
40
  if( !defined( 'QUADS_VERSION' ) ) {
41
- define( 'QUADS_VERSION', '2.0.37' );
42
  }
43
 
44
  // Plugin name
6
  * Description: Insert Google AdSense and other ad formats fully automatic into your website
7
  * Author: WP Quads
8
  * Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
9
+ * Version: 2.0.37.1
10
  * Text Domain: quick-adsense-reloaded
11
  * Domain Path: languages
12
  * Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
38
 
39
  // Plugin version
40
  if( !defined( 'QUADS_VERSION' ) ) {
41
+ define( 'QUADS_VERSION', '2.0.37.1' );
42
  }
43
 
44
  // Plugin name
readme.txt CHANGED
@@ -10,7 +10,7 @@ Tags: ad manager, ads, adsense, amp, banner
10
  Requires at least: 3.6+
11
  Tested up to: 5.8
12
  Requires PHP: 5.4
13
- Stable tag: 2.0.37
14
 
15
  Ads & AdSense Ad Plugin is the quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support.
16
 
@@ -205,6 +205,9 @@ Alternative Installation:
205
 
206
  == Changelog ==
207
 
 
 
 
208
  = 2.0.37 (13th December 2021) =
209
  * Added: Added Padding option in AD Settings #414
210
  * Fixed: Fatal error: Uncaught TypeError: Cannot access offset of type string on string #444
10
  Requires at least: 3.6+
11
  Tested up to: 5.8
12
  Requires PHP: 5.4
13
+ Stable tag: 2.0.37.1
14
 
15
  Ads & AdSense Ad Plugin is the quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support.
16
 
205
 
206
  == Changelog ==
207
 
208
+ = 2.0.37.1 (15th December 2021) =
209
+ * Fixed: PHP Fatal error: Uncaught Error: Call to undefined function quads_get_client_ip() #447
210
+
211
  = 2.0.37 (13th December 2021) =
212
  * Added: Added Padding option in AD Settings #414
213
  * Fixed: Fatal error: Uncaught TypeError: Cannot access offset of type string on string #444