AdSense Plugin WP QUADS - Version 2.0.28.1

Version Description

(28th July 2021) = * Fix: After update 2.0.28 wpquads server issue. #402

Download this release

Release Info

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

Code changes from version 2.0.28 to 2.0.28.1

admin/includes/rest-api-service.php CHANGED
@@ -373,7 +373,7 @@ class QUADS_Ad_Setup_Api_Service {
373
  $response = false;
374
  $license_info =array();
375
  if($parameters){
376
- $quads_options = get_settings('quads_settings');
377
 
378
  foreach($parameters as $key => $val){
379
 
@@ -402,40 +402,43 @@ class QUADS_Ad_Setup_Api_Service {
402
  if (!file_exists($content_url)) {
403
  copy($sourc,$content_url);
404
  }
405
- }else if($key == 'quads_wp_quads_pro_license_key'){
406
- $item_shortname='quads_wp_quads_pro';
407
- $item_name ='WP QUADS PRO';
408
- $license = sanitize_text_field($val );
409
- // Data to send to the API
410
- $api_params = array(
411
- 'edd_action' => 'activate_license',
412
- 'license' => $license,
413
- 'item_name' => urlencode( $item_name ),
414
- 'url' => home_url()
415
- );
416
-
417
- // Call the API
418
- $response = wp_remote_post(
419
- 'http://wpquads.com/edd-sl-api/',
420
- array(
421
- 'timeout' => 15,
422
- 'sslverify' => false,
423
- 'body' => $api_params
424
- )
425
- );
426
-
427
- // Make sure there are no errors
428
- if ( is_wp_error( $response ) ) {
429
- $response = array('status' => 't','license'=>$response, 'msg' => __( 'Settings has been saved successfullyc', 'quick-adsense-reloaded' ));
430
- }
431
- // Decode license data
432
- $license_data = json_decode( wp_remote_retrieve_body( $response ) );
433
- if($license_data){
434
- $license_info = array('license'=>$license_data->license);
435
- }
436
- }
437
- $quads_options[$key] = $val;
438
- }
 
 
 
439
 
440
  }
441
  $response = update_option( 'quads_settings', $quads_options );
373
  $response = false;
374
  $license_info =array();
375
  if($parameters){
376
+ $quads_options = get_option('quads_settings');
377
 
378
  foreach($parameters as $key => $val){
379
 
402
  if (!file_exists($content_url)) {
403
  copy($sourc,$content_url);
404
  }
405
+ }else if($key == 'quads_wp_quads_pro_license_key' && !empty($val) && strpos($val, '****************') === false){
406
+ $item_shortname='quads_wp_quads_pro';
407
+ $item_name ='WP QUADS PRO';
408
+ $license = sanitize_text_field($val );
409
+ // Data to send to the API
410
+ $api_params = array(
411
+ 'edd_action' => 'activate_license',
412
+ 'license' => $license,
413
+ 'item_name' => urlencode( $item_name ),
414
+ 'url' => home_url()
415
+ );
416
+
417
+ // Call the API
418
+ $response = wp_remote_post(
419
+ 'http://wpquads.com/edd-sl-api/',
420
+ array(
421
+ 'timeout' => 15,
422
+ 'sslverify' => false,
423
+ 'body' => $api_params
424
+ )
425
+ );
426
+
427
+ // Make sure there are no errors
428
+ if ( is_wp_error( $response ) ) {
429
+ $response = array('status' => 't','license'=>$response, 'msg' => __( 'Settings has been saved successfullyc', 'quick-adsense-reloaded' ));
430
+ }
431
+ // Decode license data
432
+ $license_data = json_decode( wp_remote_retrieve_body( $response ) );
433
+ if($license_data){
434
+ $license_info = array('license'=>$license_data->license);
435
+ }
436
+
437
+ }
438
+ if ($key != 'quads_wp_quads_pro_license_key' || ($key == 'quads_wp_quads_pro_license_key' && !empty($val) && strpos($val, '****************') === false)) {
439
+ $quads_options[$key] = $val;
440
+ }
441
+ }
442
 
443
  }
444
  $response = update_option( 'quads_settings', $quads_options );
includes/admin/settings/register-settings.php CHANGED
@@ -27,6 +27,33 @@ function quads_get_option( $key = '', $default = false ) {
27
  return apply_filters( 'quads_get_option_' . $key, $value, $key, $default );
28
  }
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * Get Settings
32
  *
27
  return apply_filters( 'quads_get_option_' . $key, $value, $key, $default );
28
  }
29
 
30
+
31
+
32
+ add_action( 'admin_init', 'quads_check_licene_my_upgrade_function',10);
33
+
34
+ function quads_check_licene_my_upgrade_function() {
35
+
36
+ $quads_license_bug_fixed = get_transient('quads_license_bug_fixed');
37
+ $quads_mode = get_option('quads-mode');
38
+ if($quads_license_bug_fixed != 'value' && QUADS_VERSION >= '2.0.28' && $quads_mode == 'new'){
39
+ $quadsAdResetDeleted = get_option('quadsAdResetDeleted');
40
+ if(isset($quadsAdResetDeleted['quads_wp_quads_pro_license_key']) && !empty($quadsAdResetDeleted['quads_wp_quads_pro_license_key'])){
41
+
42
+ $license_key = $quadsAdResetDeleted['quads_wp_quads_pro_license_key'];
43
+ $quads_settings = get_option('quads_settings');
44
+
45
+ if( strpos($quads_settings['quads_wp_quads_pro_license_key'] , '******') !== false){
46
+ $quads_settings['quads_wp_quads_pro_license_key'] = $license_key;
47
+ $response = update_option( 'quads_settings', $quads_settings );
48
+ }
49
+ }
50
+ set_transient('quads_license_bug_fixed', 'value', '');
51
+ }
52
+ }
53
+
54
+
55
+
56
+
57
  /**
58
  * Get Settings
59
  *
includes/class-quads-license-handler.php CHANGED
@@ -106,7 +106,7 @@ class QUADS_License {
106
  add_action( 'admin_init', array( $this, 'deactivate_license' ) );
107
 
108
  // Check that license is valid once per week
109
- add_action( 'quads_weekly_event', array( $this, 'weekly_license_check' ) );
110
 
111
  // For testing license notices, uncomment this line to force checks on every page load
112
  //add_action( 'admin_init', array( $this, 'weekly_license_check' ) );
@@ -140,29 +140,33 @@ class QUADS_License {
140
  'license' => $this->license,
141
  'author' => $this->author
142
  );
143
- // data to send in our API request
144
- $api_params = array(
145
- 'edd_action'=> 'check_license',
146
- 'license' => $this->license,
147
- 'item_name' => urlencode( $this->item_name ),
148
- 'url' => home_url()
149
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
 
151
- // Call the API
152
- $response = wp_remote_post(
153
- $this->api_url,
154
- array(
155
- 'timeout' => 15,
156
- 'sslverify' => false,
157
- 'body' => $api_params
158
- )
159
- );
160
-
161
- // make sure the response came back okay
162
- if ( is_wp_error( $response ) ) {
163
- return false;
164
- }
165
- $license_data = json_decode( wp_remote_retrieve_body( $response ) );
166
  // print_r($license_data);die;
167
  // if ($license_data->license == "expired") {
168
  // $license_data = get_option( 'quads_wp_quads_pro_license_active' );
@@ -604,6 +608,9 @@ class QUADS_License {
604
  $license_data = json_decode( wp_remote_retrieve_body( $response ) );
605
  if ($license_data->license == "expired") {
606
 
 
 
 
607
  }
608
  if ($license_data->license !== "expired") {
609
  update_option( $this->item_shortname . '_license_active', $license_data );
106
  add_action( 'admin_init', array( $this, 'deactivate_license' ) );
107
 
108
  // Check that license is valid once per week
109
+ // add_action( 'quads_weekly_event', array( $this, 'weekly_license_check' ) );
110
 
111
  // For testing license notices, uncomment this line to force checks on every page load
112
  //add_action( 'admin_init', array( $this, 'weekly_license_check' ) );
140
  'license' => $this->license,
141
  'author' => $this->author
142
  );
143
+ // // data to send in our API request
144
+ // $api_params = array(
145
+ // 'edd_action'=> 'check_license',
146
+ // 'license' => $this->license,
147
+ // 'item_name' => urlencode( $this->item_name ),
148
+ // 'url' => home_url()
149
+ // );
150
+
151
+ // // Call the API
152
+ // $response = wp_remote_post(
153
+ // $this->api_url,
154
+ // array(
155
+ // 'timeout' => 15,
156
+ // 'sslverify' => false,
157
+ // 'body' => $api_params
158
+ // )
159
+ // );
160
+
161
+ // // make sure the response came back okay
162
+ // if ( is_wp_error( $response ) ) {
163
+ // return false;
164
+ // }
165
+ // $license_data = json_decode( wp_remote_retrieve_body( $response ) );
166
+
167
+
168
+ $license_data = get_option( $this->item_shortname . '_license_active' );
169
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  // print_r($license_data);die;
171
  // if ($license_data->license == "expired") {
172
  // $license_data = get_option( 'quads_wp_quads_pro_license_active' );
608
  $license_data = json_decode( wp_remote_retrieve_body( $response ) );
609
  if ($license_data->license == "expired") {
610
 
611
+
612
+
613
+
614
  }
615
  if ($license_data->license !== "expired") {
616
  update_option( $this->item_shortname . '_license_active', $license_data );
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.28
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.28' );
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.28.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.28.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.28
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
 
@@ -204,7 +204,10 @@ Alternative Installation:
204
 
205
 
206
  == Changelog ==
207
- = 2.0.28 (31th July 2021) =
 
 
 
208
  * New: AD Blindness #363
209
  * New: Skippable ads. #343
210
  * New: AD Logging #364
10
  Requires at least: 3.6+
11
  Tested up to: 5.8
12
  Requires PHP: 5.4
13
+ Stable tag: 2.0.28.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
 
204
 
205
 
206
  == Changelog ==
207
+ = 2.0.28.1 (28th July 2021) =
208
+ * Fix: After update 2.0.28 wpquads server issue. #402
209
+
210
+ = 2.0.28 (27th July 2021) =
211
  * New: AD Blindness #363
212
  * New: Skippable ads. #343
213
  * New: AD Logging #364