Super Progressive Web Apps - Version 2.2.3

Version Description

  • Date: 26.March.2022
  • Enhancement : Added New Addon QR Code Generator Array #255
  • Enhancement : Added Warning UI on License tab when key is expired #258
Download this release

Release Info

Developer superpwa
Plugin Icon 128x128 Super Progressive Web Apps
Version 2.2.3
Comparing to
See all releases

Code changes from version 2.2.2 to 2.2.3

admin/admin-ui-render-addons.php CHANGED
@@ -137,6 +137,18 @@ function superpwa_get_addons( $slug = false ) {
137
  'admin_link_target' => 'admin',
138
  'superpwa_min_version' => '2.1.18',//1.8
139
  ),
 
 
 
 
 
 
 
 
 
 
 
 
140
  );
141
 
142
  if ( $slug === false ) {
137
  'admin_link_target' => 'admin',
138
  'superpwa_min_version' => '2.1.18',//1.8
139
  ),
140
+ 'qr_code_generator' => array(
141
+ 'name' => __( 'QR Code Generator', 'super-progressive-web-apps' ),
142
+ 'description' => __( 'Provides you with Install App QR Code which you can download and share with your users to give them easy to use and engaging user experience.', 'super-progressive-web-apps' ),
143
+ 'type' => 'addon_pro',
144
+ 'icon' => 'qr-code.png',
145
+ 'link' => 'https://superpwa.com/doc/qr-code-generator-add-on-for-superpwa/',
146
+ 'more_link' => 'https://superpwa.com/doc/qr-code-generator-add-on-for-superpwa/',
147
+ 'admin_link' => admin_url('admin.php?page=superpwa-qr-code-generator'),
148
+ 'admin_link_text' => __( 'Customize Settings →', 'super-progressive-web-apps' ),
149
+ 'admin_link_target' => 'admin',
150
+ 'superpwa_min_version' => '2.2.3',
151
+ ),
152
  );
153
 
154
  if ( $slug === false ) {
admin/admin-ui-render-settings.php CHANGED
@@ -610,9 +610,10 @@ function superpwa_admin_interface_render() {
610
  <a class="spwa-tablinks" id="spwa-feature" href="<?php echo $addon_page; ?>" data-href="yes">Features (Addons)</a>
611
  <a class="spwa-tablinks" id="spwa-advance" href="#advance-settings" onclick="openCity(event, 'advance')" data-href="no">Advanced</a>
612
  <a class="spwa-tablinks" id="spwa-support" href="#support-settings" onclick="openCity(event, 'support')" data-href="no">Help & Support</a>
613
- <?php if( defined('SUPERPWA_PRO_VERSION') ){ ?>
614
- <!-- <a class="spwa-tablinks" id="spwa-license" href="<?php echo admin_url('admin.php?page=superpwa-upgrade')?> " data-href="no">License</a> -->
615
- <a class="spwa-tablinks" id="spwa-license" href="#license-settings" onclick="openCity(event, 'superpwa_pro_license')" data-href="no">License</a>
 
616
  <?php } ?>
617
  </div>
618
  <span id="alert-warning" style=" margin-top: 10px; display: none; padding: 10px;background-color: #ff9800;color: white;"> Please Save the settings before moving to other tabs </span>
610
  <a class="spwa-tablinks" id="spwa-feature" href="<?php echo $addon_page; ?>" data-href="yes">Features (Addons)</a>
611
  <a class="spwa-tablinks" id="spwa-advance" href="#advance-settings" onclick="openCity(event, 'advance')" data-href="no">Advanced</a>
612
  <a class="spwa-tablinks" id="spwa-support" href="#support-settings" onclick="openCity(event, 'support')" data-href="no">Help & Support</a>
613
+ <?php if( defined('SUPERPWA_PRO_VERSION') ){
614
+ $expiry_warning = superpwa_license_expire_warning();
615
+ ?>
616
+ <a class="spwa-tablinks" id="spwa-license" href="#license-settings" onclick="openCity(event, 'superpwa_pro_license')" data-href="no">License <?php echo $expiry_warning; ?></a>
617
  <?php } ?>
618
  </div>
619
  <span id="alert-warning" style=" margin-top: 10px; display: none; padding: 10px;background-color: #ff9800;color: white;"> Please Save the settings before moving to other tabs </span>
admin/img/qr-code.png ADDED
Binary file
functions/common.php CHANGED
@@ -357,8 +357,10 @@ function superpwa_setting_tabs_html(){
357
  <a class="spwa-tablinks <?php echo $addon_page_class; ?>" href="<?php echo esc_url_raw($addon_page); ?>" data-href="yes">Features (Addons)</a>
358
  <a class="spwa-tablinks" href="<?php echo esc_url_raw($advance_settings); ?>" data-href="yes">Advanced</a>
359
  <a class="spwa-tablinks" href="<?php echo esc_url_raw($support_settings); ?>" data-href="yes">Help & Support</a>
360
- <?php if( defined('SUPERPWA_PRO_VERSION') && $_GET['page'] !== 'superpwa-upgrade' ) { ?>
361
- <a class="spwa-tablinks" href="<?php echo esc_url_raw($license_settings); ?>" data-href="yes">License</a>
 
 
362
  <?php } ?>
363
  <?php if( $_GET['page'] == 'superpwa-upgrade' ) { ?>
364
  <a class="spwa-tablinks <?php echo $license_settings_class; ?> " href="<?php echo esc_url_raw($license_settings); ?>" data-href="yes">License</a>
@@ -367,6 +369,30 @@ function superpwa_setting_tabs_html(){
367
  </div>
368
  <?php
369
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  /**
371
  * Returns Superpwa Setting tabs Styles
372
  */
357
  <a class="spwa-tablinks <?php echo $addon_page_class; ?>" href="<?php echo esc_url_raw($addon_page); ?>" data-href="yes">Features (Addons)</a>
358
  <a class="spwa-tablinks" href="<?php echo esc_url_raw($advance_settings); ?>" data-href="yes">Advanced</a>
359
  <a class="spwa-tablinks" href="<?php echo esc_url_raw($support_settings); ?>" data-href="yes">Help & Support</a>
360
+ <?php if( defined('SUPERPWA_PRO_VERSION') && $_GET['page'] !== 'superpwa-upgrade' ) {
361
+ $expiry_warning = superpwa_license_expire_warning();
362
+ ?>
363
+ <a class="spwa-tablinks" href="<?php echo esc_url_raw($license_settings); ?>" data-href="yes">License <?php echo $expiry_warning; ?></a>
364
  <?php } ?>
365
  <?php if( $_GET['page'] == 'superpwa-upgrade' ) { ?>
366
  <a class="spwa-tablinks <?php echo $license_settings_class; ?> " href="<?php echo esc_url_raw($license_settings); ?>" data-href="yes">License</a>
369
  </div>
370
  <?php
371
  }
372
+
373
+ /**
374
+ * Returns Warning Icon When License Key is Expired
375
+ */
376
+ function superpwa_license_expire_warning(){
377
+
378
+ $license_alert ='';
379
+ if( defined('SUPERPWA_PRO_VERSION') ){
380
+
381
+ $license_info = get_option("superpwa_pro_upgrade_license");
382
+ if ($license_info) {
383
+
384
+ $license_exp = date('Y-m-d', strtotime($license_info['pro']['license_key_expires']));
385
+ $license_info_lifetime = $license_info['pro']['license_key_expires'];
386
+ $today = date('Y-m-d');
387
+ $exp_date = $license_exp;
388
+
389
+ $license_alert = $today > $exp_date ? "<span class='superpwa_pro_icon dashicons dashicons-warning superpwa_pro_alert' style='color: #ffb229;left: 3px;position: relative;'></span>": "" ;
390
+ }
391
+ }
392
+ return $license_alert;
393
+ }
394
+
395
+
396
  /**
397
  * Returns Superpwa Setting tabs Styles
398
  */
readme.txt CHANGED
@@ -186,6 +186,11 @@ Feel free to get in touch if you have any questions.
186
 
187
  == Changelog ==
188
 
 
 
 
 
 
189
  = 2.2.2 =
190
  * Date: [16.March.2022](https://superpwa.com/superpwa-2-2-2-release-note/?utm_source=wordpress.org&utm_medium=changelog)
191
  * Enhancement : Added Compatibility with WonderPush Pushnotifications plugin #188
186
 
187
  == Changelog ==
188
 
189
+ = 2.2.3 =
190
+ * Date: [26.March.2022](https://superpwa.com/superpwa-2-2-3-release-note/?utm_source=wordpress.org&utm_medium=changelog)
191
+ * Enhancement : Added New Addon QR Code Generator Array #255
192
+ * Enhancement : Added Warning UI on License tab when key is expired #258
193
+
194
  = 2.2.2 =
195
  * Date: [16.March.2022](https://superpwa.com/superpwa-2-2-2-release-note/?utm_source=wordpress.org&utm_medium=changelog)
196
  * Enhancement : Added Compatibility with WonderPush Pushnotifications plugin #188
superpwa.php CHANGED
@@ -6,7 +6,7 @@
6
  * Author: SuperPWA
7
  * Author URI: https://profiles.wordpress.org/superpwa/
8
  * Contributors: SuperPWA
9
- * Version: 2.2.2
10
  * Text Domain: super-progressive-web-apps
11
  * Domain Path: /languages
12
  * License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
@@ -43,7 +43,7 @@ if ( ! defined('ABSPATH') ) exit;
43
  * @since 1.0
44
  */
45
  if ( ! defined( 'SUPERPWA_VERSION' ) ) {
46
- define( 'SUPERPWA_VERSION' , '2.2.2' );
47
  }
48
 
49
  /**
6
  * Author: SuperPWA
7
  * Author URI: https://profiles.wordpress.org/superpwa/
8
  * Contributors: SuperPWA
9
+ * Version: 2.2.3
10
  * Text Domain: super-progressive-web-apps
11
  * Domain Path: /languages
12
  * License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
43
  * @since 1.0
44
  */
45
  if ( ! defined( 'SUPERPWA_VERSION' ) ) {
46
+ define( 'SUPERPWA_VERSION' , '2.2.3' );
47
  }
48
 
49
  /**