Super Progressive Web Apps - Version 2.1.4

Version Description

  • Date: 18.December.2020 Bug Fix: Wrong manifest path if installed WordPress in a sub-folder #134 Enhancement: Need to increase character limit of APP name. #139 Bug Fix: Default Add to home screen banner is not showing #140 Bug Fix: Changes in Presentation #141 / #143
Download this release

Release Info

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

Code changes from version 2.1.3 to 2.1.4

admin/admin-ui-render-settings.php CHANGED
@@ -58,7 +58,7 @@ function superpwa_app_short_name_cb() {
58
  <input type="text" name="superpwa_settings[app_short_name]" class="regular-text superpwa-app-short-name" value="<?php if ( isset( $settings['app_short_name'] ) && ( ! empty($settings['app_short_name']) ) ) echo esc_attr($settings['app_short_name']); ?>"/>
59
 
60
  <p class="description">
61
- <?php _e('Used when there is insufficient space to display the full name of the application. <span id="superpwa-app-short-name-limit"><code>12</code> characters or less.</span>', 'super-progressive-web-apps'); ?>
62
  </p>
63
 
64
  </fieldset>
58
  <input type="text" name="superpwa_settings[app_short_name]" class="regular-text superpwa-app-short-name" value="<?php if ( isset( $settings['app_short_name'] ) && ( ! empty($settings['app_short_name']) ) ) echo esc_attr($settings['app_short_name']); ?>"/>
59
 
60
  <p class="description">
61
+ <?php _e('Used when there is insufficient space to display the full name of the application. <span id="superpwa-app-short-name-limit"><code>15</code> characters or less.</span>', 'super-progressive-web-apps'); ?>
62
  </p>
63
 
64
  </fieldset>
admin/admin-ui-render-upgrade.php CHANGED
@@ -224,7 +224,7 @@ function superpwa_upgread_pro_interface_render(){
224
  </div><!-- /.pri-lst -->
225
  <div class="tru-us">
226
  <img src="<?php echo SUPERPWA_PATH_SRC . 'admin/img/rating.png' ?>">
227
- <h2>Used by more that 40000+ Users!</h2>
228
  <p>More than 40k Websites, Blogs &amp; E-Commerce shops are powered by our SuperPWA making it the #1 Independent PWA plugin in WordPress.</p>
229
  <a href="https://wordpress.org/support/plugin/super-progressive-web-apps/reviews/?filter=5" target="_blank">Read The Reviews</a>
230
  </div>
224
  </div><!-- /.pri-lst -->
225
  <div class="tru-us">
226
  <img src="<?php echo SUPERPWA_PATH_SRC . 'admin/img/rating.png' ?>">
227
+ <h2>Used by more than 40000+ Users!</h2>
228
  <p>More than 40k Websites, Blogs &amp; E-Commerce shops are powered by our SuperPWA making it the #1 Independent PWA plugin in WordPress.</p>
229
  <a href="https://wordpress.org/support/plugin/super-progressive-web-apps/reviews/?filter=5" target="_blank">Read The Reviews</a>
230
  </div>
admin/admin-ui-setup.php CHANGED
@@ -39,7 +39,7 @@ function superpwa_add_menu_links() {
39
  }
40
 
41
  // Upgrade to pro page
42
- $textlicense = __( 'Upgrade to Pro', 'super-progressive-web-apps' );
43
  if(defined('SUPERPWA_PRO_VERSION')){ $textlicense = __( 'License', 'super-progressive-web-apps' ); }
44
  add_submenu_page( 'superpwa', __( 'Super Progressive Web Apps', 'super-progressive-web-apps' ), $textlicense, 'manage_options', 'superpwa-upgrade', 'superpwa_upgread_pro_interface_render' , 9999999);
45
 
@@ -223,7 +223,7 @@ function superpwa_validater_and_sanitizer( $settings ) {
223
  $settings['app_name'] = sanitize_text_field( $settings['app_name'] ) == '' ? get_bloginfo( 'name' ) : sanitize_text_field( $settings['app_name'] );
224
 
225
  // Sanitize Application Short Name
226
- $settings['app_short_name'] = substr( sanitize_text_field( $settings['app_short_name'] ) == '' ? get_bloginfo( 'name' ) : sanitize_text_field( $settings['app_short_name'] ), 0, 12 );
227
 
228
  // Sanitize description
229
  $settings['description'] = sanitize_text_field( $settings['description'] );
@@ -276,7 +276,7 @@ function superpwa_get_settings() {
276
 
277
  $defaults = array(
278
  'app_name' => get_bloginfo( 'name' ),
279
- 'app_short_name' => substr( get_bloginfo( 'name' ), 0, 12 ),
280
  'description' => get_bloginfo( 'description' ),
281
  'icon' => SUPERPWA_PATH_SRC . 'public/images/logo.png',
282
  'splash_icon' => SUPERPWA_PATH_SRC . 'public/images/logo-512x512.png',
39
  }
40
 
41
  // Upgrade to pro page
42
+ $textlicense = "<span style='color: #ff4c4c;font-weight: 700;font-size: 15px;'>".__( 'Upgrade to Pro', 'super-progressive-web-apps' )."</span>";
43
  if(defined('SUPERPWA_PRO_VERSION')){ $textlicense = __( 'License', 'super-progressive-web-apps' ); }
44
  add_submenu_page( 'superpwa', __( 'Super Progressive Web Apps', 'super-progressive-web-apps' ), $textlicense, 'manage_options', 'superpwa-upgrade', 'superpwa_upgread_pro_interface_render' , 9999999);
45
 
223
  $settings['app_name'] = sanitize_text_field( $settings['app_name'] ) == '' ? get_bloginfo( 'name' ) : sanitize_text_field( $settings['app_name'] );
224
 
225
  // Sanitize Application Short Name
226
+ $settings['app_short_name'] = substr( sanitize_text_field( $settings['app_short_name'] ) == '' ? get_bloginfo( 'name' ) : sanitize_text_field( $settings['app_short_name'] ), 0, 15 );
227
 
228
  // Sanitize description
229
  $settings['description'] = sanitize_text_field( $settings['description'] );
276
 
277
  $defaults = array(
278
  'app_name' => get_bloginfo( 'name' ),
279
+ 'app_short_name' => substr( get_bloginfo( 'name' ), 0, 15 ),
280
  'description' => get_bloginfo( 'description' ),
281
  'icon' => SUPERPWA_PATH_SRC . 'public/images/logo.png',
282
  'splash_icon' => SUPERPWA_PATH_SRC . 'public/images/logo-512x512.png',
admin/js/main.js CHANGED
@@ -31,7 +31,7 @@ jQuery(document).ready(function($){
31
  .open();
32
  });
33
  $('.superpwa-app-short-name').on('input', function(e) { // Warn when app_short_name exceeds 12 characters.
34
- if ( $('.superpwa-app-short-name').val().length > 12 ) {
35
  $('.superpwa-app-short-name').css({'color': '#dc3232'});
36
  $('#superpwa-app-short-name-limit').css({'color': '#dc3232'});
37
  } else {
31
  .open();
32
  });
33
  $('.superpwa-app-short-name').on('input', function(e) { // Warn when app_short_name exceeds 12 characters.
34
+ if ( $('.superpwa-app-short-name').val().length > 15 ) {
35
  $('.superpwa-app-short-name').css({'color': '#dc3232'});
36
  $('#superpwa-app-short-name-limit').css({'color': '#dc3232'});
37
  } else {
public/js/register-sw.js CHANGED
@@ -10,7 +10,7 @@ if ('serviceWorker' in navigator) {
10
  deferredPrompt = e;
11
  if(deferredPrompt != null || deferredPrompt != undefined){
12
  var a2hsBanner = document.getElementsByClassName("superpwa-sticky-banner");
13
- if(a2hsBanner){
14
  deferredPrompt.preventDefault();
15
  for (var i = 0; i < a2hsBanner.length; i++) {
16
  var showbanner = a2hsBanner[i].getAttribute("data-show");
@@ -22,7 +22,7 @@ if ('serviceWorker' in navigator) {
22
 
23
  window.addEventListener('appinstalled', function(evt){
24
  var a2hsBanner = document.getElementsByClassName("superpwa-sticky-banner");
25
- if(a2hsBanner){
26
  for (var i = 0; i < a2hsBanner.length; i++) {
27
  var showbanner = a2hsBanner[i].getAttribute("data-show");
28
  a2hsBanner[i].style.display="none";
10
  deferredPrompt = e;
11
  if(deferredPrompt != null || deferredPrompt != undefined){
12
  var a2hsBanner = document.getElementsByClassName("superpwa-sticky-banner");
13
+ if(a2hsBanner.length){
14
  deferredPrompt.preventDefault();
15
  for (var i = 0; i < a2hsBanner.length; i++) {
16
  var showbanner = a2hsBanner[i].getAttribute("data-show");
22
 
23
  window.addEventListener('appinstalled', function(evt){
24
  var a2hsBanner = document.getElementsByClassName("superpwa-sticky-banner");
25
+ if(a2hsBanner.length){
26
  for (var i = 0; i < a2hsBanner.length; i++) {
27
  var showbanner = a2hsBanner[i].getAttribute("data-show");
28
  a2hsBanner[i].style.display="none";
public/manifest.php CHANGED
@@ -68,7 +68,11 @@ function superpwa_manifest( $arg = 'src' ) {
68
  * pointing to the root folder of WordPress is still useful.
69
  */
70
  case 'abs':
71
- return trailingslashit( ABSPATH ) . $manifest_filename;
 
 
 
 
72
  break;
73
 
74
  // Link to manifest
68
  * pointing to the root folder of WordPress is still useful.
69
  */
70
  case 'abs':
71
+ $filepath = trailingslashit( ABSPATH ) . $manifest_filename;
72
+ if(!file_exists($filepath)){
73
+ $filepath = trailingslashit( get_home_path() ). $manifest_filename;
74
+ }
75
+ return $filepath;
76
  break;
77
 
78
  // Link to manifest
readme.txt CHANGED
@@ -12,10 +12,9 @@ SuperPWA helps you convert your WordPress website into a Progressive Web App ins
12
 
13
  == Description ==
14
 
15
- > **Help decide on the future of SuperPWA**
16
- > We are looking for your input to decide on the future of SuperPWA. If you wish to acquire SuperPWA as a whole and continue it's development or if you are interested in a premium version of the plugin with extended features, [please fill in the form and let us know](https://superpwa.com/superpwa-2-1/?utm_source=wordpress.org&utm_medium=description-future).
17
 
18
- Progressive Web Apps (PWA) is a new technology that combines the best of mobile web and the best of mobile apps to create a superior mobile web experience. They are installed on the phone like a normal app (web app) and can be accessed from the home screen.
19
 
20
  Users can come back to your website by launching the app from their home screen and interact with your website through an app-like interface. Your return visitors will experience almost-instant loading times and enjoy the great performance benefits of your PWA!
21
 
@@ -72,6 +71,10 @@ Here are the current features of Super Progressive Web Apps:
72
 
73
  * Offline Indicator Notice.
74
 
 
 
 
 
75
  ### Progressive Web App Minimum Requirements
76
 
77
  Progressive Web Apps require that your WordPress website is served from a secure origin i.e. your website should be HTTPS and not HTTP. If your website isn't HTTPS, please contact your host about it. You can also [ask us](https://wordpress.org/support/plugin/super-progressive-web-apps) if you need help.
@@ -181,6 +184,14 @@ Feel free to get in touch if you have any questions.
181
 
182
  == Changelog ==
183
 
 
 
 
 
 
 
 
 
184
  = 2.1.3 =
185
  Improvement: Changes in Admin Options
186
  Enhancement: Added more pages
12
 
13
  == Description ==
14
 
15
+ Progressive Web Apps (PWA) is a new technology that combines the best of mobile web and the best of mobile apps to create a superior mobile web experience. They are installed on the phone like a normal app (web app) and can be accessed from the home screen.
 
16
 
17
+ [Home](https://superpwa.com/) | [Documentation](https://superpwa.com/docs/) | [Help](https://superpwa.com/contact/) | [Premium version Features](https://superpwa.com/docs/#pro-doc)
18
 
19
  Users can come back to your website by launching the app from their home screen and interact with your website through an app-like interface. Your return visitors will experience almost-instant loading times and enjoy the great performance benefits of your PWA!
20
 
71
 
72
  * Offline Indicator Notice.
73
 
74
+ **PRO Version** support additional [advance feature](https://superpwa.com/docs/)
75
+ * Call To Action (CTA) [More Info](https://superpwa.com/doc/call-to-action-cta-add-on-for-superpwa/)
76
+ * Android APK APP Generator [More Info](https://superpwa.com/doc/android-apk-app-generator-add-on-for-superpwa/)
77
+
78
  ### Progressive Web App Minimum Requirements
79
 
80
  Progressive Web Apps require that your WordPress website is served from a secure origin i.e. your website should be HTTPS and not HTTP. If your website isn't HTTPS, please contact your host about it. You can also [ask us](https://wordpress.org/support/plugin/super-progressive-web-apps) if you need help.
184
 
185
  == Changelog ==
186
 
187
+ = 2.1.4 =
188
+ * Date: [18.December.2020](https://superpwa.com/superpwa-2-1/?utm_source=wordpress.org&utm_medium=changelog)
189
+ Bug Fix: Wrong manifest path if installed WordPress in a sub-folder #134
190
+ Enhancement: Need to increase character limit of APP name. #139
191
+ Bug Fix: Default Add to home screen banner is not showing #140
192
+ Bug Fix: Changes in Presentation #141 / #143
193
+
194
+
195
  = 2.1.3 =
196
  Improvement: Changes in Admin Options
197
  Enhancement: Added more pages
superpwa.php CHANGED
@@ -6,7 +6,7 @@
6
  * Author: SuperPWA
7
  * Author URI: https://profiles.wordpress.org/superpwa/
8
  * Contributors: SuperPWA
9
- * Version: 2.1.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,7 +43,7 @@ if ( ! defined('ABSPATH') ) exit;
43
  * @since 1.0
44
  */
45
  if ( ! defined( 'SUPERPWA_VERSION' ) ) {
46
- define( 'SUPERPWA_VERSION' , '2.1.3' );
47
  }
48
 
49
  /**
6
  * Author: SuperPWA
7
  * Author URI: https://profiles.wordpress.org/superpwa/
8
  * Contributors: SuperPWA
9
+ * Version: 2.1.4
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.1.4' );
47
  }
48
 
49
  /**