Super Progressive Web Apps - Version 2.2.10

Version Description

  • Date: 09.December.2022
  • BugFixed : An error with SuperPWA is displayed while testing in the Page speed dev tool. #362
  • BugFixed : CTA button in menu is appearing in PWA even if user has downloaded the PWA. #356
  • BugFixed : CTA banner display option "Show on Scroll" not working properly. #350
  • BugFixed : PWA Category issue fixed
  • Enhancement :CTA menu button warning on IOS only appears in the English language. #363
Download this release

Release Info

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

Code changes from version 2.2.9.1 to 2.2.10

admin/admin-ui-render-settings.php CHANGED
@@ -280,14 +280,17 @@ function superpwa_app_category_cb() {
280
  <!-- WordPress Pages Dropdown -->
281
  <label for="superpwa_settings[app_category]">
282
  <?php
283
- echo wp_dropdown_categories( array(
284
- 'name' => 'superpwa_settings[app_category]',
285
- 'echo' => 0,
286
- 'show_option_none' => __( '&mdash; Default &mdash;' ),
287
- 'taxonomy' => 'category',
288
- 'option_none_value' => '0',
289
- 'selected' => isset($settings['app_category']) ? $settings['app_category'] : '',
290
- )); ?>
 
 
 
291
  </label>
292
 
293
  </fieldset>
280
  <!-- WordPress Pages Dropdown -->
281
  <label for="superpwa_settings[app_category]">
282
  <?php
283
+ // Allowed manifest categories
284
+ $manifest_categories=["business","education","entertainment","finance","fitness","food","games","government","health","kids","lifestyle","magazines","medical","music","navigation","security","shopping","social","sports","travel","utilities","weather"];
285
+ ?>
286
+ <select name="superpwa_settings[app_category]" id="superpwa_settings[app_category]">
287
+ <option value=""><?php _e(' Select Category —', 'super-progressive-web-apps' ); ?></option>
288
+ <?php foreach($manifest_categories as $category){ ?>
289
+ <option value="<?php echo $category?>" <?php if ( isset( $settings['app_category'] ) ) { selected( $settings['app_category'], $category); } ?>>
290
+ <?php _e($category, 'super-progressive-web-apps' ); ?>
291
+ </option>
292
+ <?php } ?>
293
+ </select>
294
  </label>
295
 
296
  </fieldset>
public/js/register-sw.js CHANGED
@@ -2,7 +2,10 @@ if ('serviceWorker' in navigator) {
2
  window.addEventListener('load', function() {
3
  navigator.serviceWorker.register(superpwa_sw.url)
4
  .then(function(registration) { console.log('SuperPWA service worker ready');
5
- registration.update();
 
 
 
6
  subOnlineOfflineIndicator();
7
  })
8
  .catch(function(error) { console.log('Registration failed with ' + error); });
2
  window.addEventListener('load', function() {
3
  navigator.serviceWorker.register(superpwa_sw.url)
4
  .then(function(registration) { console.log('SuperPWA service worker ready');
5
+ if(registration.active)
6
+ {
7
+ registration.update();
8
+ }
9
  subOnlineOfflineIndicator();
10
  })
11
  .catch(function(error) { console.log('Registration failed with ' + error); });
public/manifest.php CHANGED
@@ -135,7 +135,10 @@ function superpwa_manifest_template() {
135
  $manifest['dir'] = superpwa_get_text_dir();
136
  $manifest['orientation'] = superpwa_get_orientation();
137
  $manifest['start_url'] = strlen( superpwa_get_start_url( true ) )>2?user_trailingslashit(superpwa_get_start_url( true )) : superpwa_get_start_url( true );
138
- $manifest['categories'] = (!empty($settings['app_category']) ? $settings['app_category'] : '');
 
 
 
139
  $manifest['scope'] = strlen(superpwa_get_scope())>2? user_trailingslashit(superpwa_get_scope()) : superpwa_get_scope();
140
 
141
  // if(isset($settings['shortcut_url']) && $settings['shortcut_url']!=0){
135
  $manifest['dir'] = superpwa_get_text_dir();
136
  $manifest['orientation'] = superpwa_get_orientation();
137
  $manifest['start_url'] = strlen( superpwa_get_start_url( true ) )>2?user_trailingslashit(superpwa_get_start_url( true )) : superpwa_get_start_url( true );
138
+ if(isset($settings['app_category']) && !empty($settings['app_category']))
139
+ {
140
+ $manifest['categories'] = [$settings['app_category']];
141
+ }
142
  $manifest['scope'] = strlen(superpwa_get_scope())>2? user_trailingslashit(superpwa_get_scope()) : superpwa_get_scope();
143
 
144
  // if(isset($settings['shortcut_url']) && $settings['shortcut_url']!=0){
readme.txt CHANGED
@@ -186,6 +186,14 @@ Feel free to get in touch if you have any questions.
186
 
187
  == Changelog ==
188
 
 
 
 
 
 
 
 
 
189
  = 2.2.9.1 =
190
  * Date: [01.December.2022](https://superpwa.com/superpwa-2-2-9-1-release-note/?utm_source=wordpress.org&utm_medium=changelog)
191
  * BugFixed : Fixed issue undefined variable $screenshot_array
186
 
187
  == Changelog ==
188
 
189
+ = 2.2.10 =
190
+ * Date: [09.December.2022](https://superpwa.com/superpwa-2-2-10-release-note/?utm_source=wordpress.org&utm_medium=changelog)
191
+ * BugFixed : An error with SuperPWA is displayed while testing in the Page speed dev tool. #362
192
+ * BugFixed : CTA button in menu is appearing in PWA even if user has downloaded the PWA. #356
193
+ * BugFixed : CTA banner display option "Show on Scroll" not working properly. #350
194
+ * BugFixed : PWA Category issue fixed
195
+ * Enhancement :CTA menu button warning on IOS only appears in the English language. #363
196
+
197
  = 2.2.9.1 =
198
  * Date: [01.December.2022](https://superpwa.com/superpwa-2-2-9-1-release-note/?utm_source=wordpress.org&utm_medium=changelog)
199
  * BugFixed : Fixed issue undefined variable $screenshot_array
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.9.1
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.9.1' );
47
  }
48
 
49
  /**
6
  * Author: SuperPWA
7
  * Author URI: https://profiles.wordpress.org/superpwa/
8
  * Contributors: SuperPWA
9
+ * Version: 2.2.10
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.10' );
47
  }
48
 
49
  /**