AdSense Plugin WP QUADS - Version 2.0.25.1

Version Description

(14th April 2021) = * Fix: Old visibility condition not working after update. #346

Download this release

Release Info

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

Code changes from version 2.0.25 to 2.0.25.1

includes/conditions.php CHANGED
@@ -311,6 +311,11 @@ function quads_is_visitor_on($ads){
311
  $visibility_include = isset($ads['targeting_include']) ? $ads['targeting_include'] : '';
312
 
313
  $visibility_exclude = isset($ads['targeting_exclude']) ? $ads['targeting_exclude'] : '';
 
 
 
 
 
314
  $include_value_old = true;
315
  if($visibility_include){
316
  $condition_old = '';
@@ -361,6 +366,37 @@ function quads_is_visitor_on($ads){
361
  $response =false;
362
  }
363
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  return $response;
365
 
366
  }
@@ -371,6 +407,11 @@ function quads_is_visibility_on($ads){
371
  $response = false;
372
  $visibility_include = isset($ads['visibility_include']) ? $ads['visibility_include'] : '';
373
  $visibility_exclude = isset($ads['visibility_exclude']) ? $ads['visibility_exclude'] : '';
 
 
 
 
 
374
  $include_value_old = true;
375
  if($visibility_include){
376
  $condition_old = '';
@@ -420,6 +461,32 @@ function quads_is_visibility_on($ads){
420
  $response =false;
421
  }
422
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
423
  return $response;
424
  }
425
  add_action('wp_head', 'quads_set_browser_width_script');
311
  $visibility_include = isset($ads['targeting_include']) ? $ads['targeting_include'] : '';
312
 
313
  $visibility_exclude = isset($ads['targeting_exclude']) ? $ads['targeting_exclude'] : '';
314
+ $check_condition_include = array_column($ads['targeting_include'], 'condition');
315
+ $check_condition_exclude = array_column($ads['targeting_exclude'], 'condition');
316
+
317
+ if((is_array($check_condition_include) && !empty($check_condition_include)) || (is_array($check_condition_exclude) && !empty($check_condition_exclude))){
318
+
319
  $include_value_old = true;
320
  if($visibility_include){
321
  $condition_old = '';
366
  $response =false;
367
  }
368
  }
369
+ }else{
370
+ if($visibility_include){
371
+ foreach ($visibility_include as $visibility){
372
+ $include[] = quads_visitor_comparison_logic_checker($visibility);
373
+ }
374
+ }else{
375
+ $response = true;
376
+ }
377
+ if($visibility_exclude){
378
+ foreach ($visibility_exclude as $visibility){
379
+ $exclude[] = quads_visitor_comparison_logic_checker($visibility);
380
+ }
381
+ }else{
382
+ if(empty($include)){
383
+ $response = true;
384
+ }
385
+ }
386
+ if(!empty($include)){
387
+ if(in_array( false ,$include )){
388
+ $response = false;
389
+ }else{
390
+ $response = true;
391
+ }
392
+ }
393
+ if(!empty($exclude)){
394
+ $exclude = array_filter(array_unique($exclude));
395
+ if(isset($exclude[0])){
396
+ $response = false;
397
+ }
398
+ }
399
+ }
400
  return $response;
401
 
402
  }
407
  $response = false;
408
  $visibility_include = isset($ads['visibility_include']) ? $ads['visibility_include'] : '';
409
  $visibility_exclude = isset($ads['visibility_exclude']) ? $ads['visibility_exclude'] : '';
410
+ $check_condition_include = array_column($ads['visibility_include'], 'condition');
411
+ $check_condition_exclude = array_column($ads['visibility_exclude'], 'condition');
412
+
413
+ if((is_array($check_condition_include) && !empty($check_condition_include)) || (is_array($check_condition_exclude) && !empty($check_condition_exclude))){
414
+
415
  $include_value_old = true;
416
  if($visibility_include){
417
  $condition_old = '';
461
  $response =false;
462
  }
463
  }
464
+ }else{
465
+ if($visibility_include){
466
+ foreach ($visibility_include as $visibility){
467
+ $include[] = quads_comparison_logic_checker($visibility);
468
+ }
469
+ }
470
+
471
+ if($visibility_exclude){
472
+ foreach ($visibility_exclude as $visibility){
473
+ $exclude[] = quads_comparison_logic_checker($visibility);
474
+ }
475
+ }
476
+
477
+ if(!empty($include)){
478
+ $include = array_values(array_filter(array_unique($include)));
479
+ if(isset($include[0])){
480
+ $response = true;
481
+ }
482
+ }
483
+ if(!empty($exclude)){
484
+ $exclude = array_filter(array_unique($exclude));
485
+ if(isset($exclude[0])){
486
+ $response = false;
487
+ }
488
+ }
489
+ }
490
  return $response;
491
  }
492
  add_action('wp_head', 'quads_set_browser_width_script');
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.25
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.25' );
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.25.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.25.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.7
12
  Requires PHP: 5.3
13
- Stable tag: 2.0.25
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
 
@@ -196,6 +196,9 @@ Alternative Installation:
196
 
197
 
198
  == Changelog ==
 
 
 
199
  = 2.0.25 (10th April 2021) =
200
  * New: Import option for the settings is not there in the tool section. #339
201
  * Fix: License key is not visible when the license is activated. #338
10
  Requires at least: 3.6+
11
  Tested up to: 5.7
12
  Requires PHP: 5.3
13
+ Stable tag: 2.0.25.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
 
196
 
197
 
198
  == Changelog ==
199
+ = 2.0.25.1 (14th April 2021) =
200
+ * Fix: Old visibility condition not working after update. #346
201
+
202
  = 2.0.25 (10th April 2021) =
203
  * New: Import option for the settings is not there in the tool section. #339
204
  * Fix: License key is not visible when the license is activated. #338