Super Progressive Web Apps - Version 1.5

Version Description

  • Date: 18.March.2018
  • New Feature: OneSignal integration for Push notifications.
  • Enhancement: Moved manifest to the top of wp_head for easier detection by browsers.
  • Enhancement: Added support for custom AMP endpoints for AMP for WordPress and AMP for WP.
  • Enhancement: Added UI notice when using AMP for WordPress to warn user not to use the AMP version of start page if the start page is the homepage, the blog index, or the archives page.
Download this release

Release Info

Developer arunbasillal
Plugin Icon 128x128 Super Progressive Web Apps
Version 1.5
Comparing to
See all releases

Code changes from version 1.4 to 1.5

admin/admin-ui-render.php CHANGED
@@ -183,6 +183,13 @@ function superpwa_start_url_cb() {
183
  <?php if ( isset( $settings['start_url_amp'] ) ) { checked( '1', $settings['start_url_amp'] ); } ?>>
184
  <label for="superpwa_settings[start_url_amp]"><?php _e('Use AMP version of the start page.', 'super-progressive-web-apps') ?></label>
185
  <br>
 
 
 
 
 
 
 
186
 
187
  <?php } ?>
188
 
@@ -322,6 +329,19 @@ function superpwa_admin_interface_render () {
322
 
323
  // Show Settings Saved Message
324
  settings_errors( 'superpwa_settings_saved_message' ); */
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  ?>
326
 
327
  <div class="wrap">
183
  <?php if ( isset( $settings['start_url_amp'] ) ) { checked( '1', $settings['start_url_amp'] ); } ?>>
184
  <label for="superpwa_settings[start_url_amp]"><?php _e('Use AMP version of the start page.', 'super-progressive-web-apps') ?></label>
185
  <br>
186
+
187
+ <!-- AMP for WordPress 0.6.2 doesn't support homepage, the blog index, and archive pages. -->
188
+ <?php if ( function_exists( 'amp_init' ) ) { ?>
189
+ <p class="description" id="tagline-description">
190
+ <?php _e( 'Do not check this if your start page is the homepage, the blog index, or the archives page. AMP for WordPress does not create AMP versions for these pages.', 'super-progressive-web-apps' ); ?>
191
+ </p>
192
+ <?php } ?>
193
 
194
  <?php } ?>
195
 
329
 
330
  // Show Settings Saved Message
331
  settings_errors( 'superpwa_settings_saved_message' ); */
332
+
333
+ // Display the notice to use SuperPWA manifest as OneSignal custom manifest.
334
+ if ( superpwa_onesignal_manifest_notice_check() ) {
335
+
336
+ echo '<div class="notice notice-error"><p>' .
337
+ sprintf(
338
+ __( '<strong>To integrate with OneSignal:</strong> Enable <strong>Use my own manifest.json</strong> and set <code>%s</code><br>as <strong>Custom manifest.json URL</strong> in <a href="%s" target="_blank">OneSignal Configuration > Advanced Settings &rarr;</a>', 'super-progressive-web-apps' ),
339
+ SUPERPWA_MANIFEST_SRC,
340
+ admin_url( 'admin.php?page=onesignal-push#configuration' )
341
+ ) .
342
+ '</p></div>';
343
+ }
344
+
345
  ?>
346
 
347
  <div class="wrap">
admin/basic-setup.php CHANGED
@@ -35,13 +35,6 @@ function superpwa_activate_plugin() {
35
  set_transient( 'superpwa_admin_notice_activation', true, 5 );
36
  }
37
 
38
- /**
39
- * Add admin notice on activation
40
- *
41
- * @since 1.2
42
- */
43
- add_action( 'admin_notices', 'superpwa_admin_notice_activation' );
44
-
45
  /**
46
  * Admin notice on plugin activation
47
  *
@@ -50,16 +43,18 @@ add_action( 'admin_notices', 'superpwa_admin_notice_activation' );
50
  function superpwa_admin_notice_activation() {
51
 
52
  // Return if transient is not set
53
- if ( ! get_transient( 'superpwa_admin_notice_activation' ) )
54
  return;
 
55
 
56
- $superpwa_is_ready = is_ssl() && superpwa_get_contents( SUPERPWA_MANIFEST_ABS ) && superpwa_get_contents( SUPERPWA_SW_ABS ) ? 'Your app is ready with the default settings. ' : '';
57
 
58
  echo '<div class="updated notice is-dismissible"><p>' . sprintf( __( 'Thank you for installing <strong>Super Progressive Web Apps!</strong> '. $superpwa_is_ready .'<a href="%s">Customize your app &rarr;</a>', 'super-progressive-web-apps' ), admin_url( 'options-general.php?page=superpwa' ) ) . '</p></div>';
59
 
60
  // Delete transient
61
  delete_transient( 'superpwa_admin_notice_activation' );
62
  }
 
63
 
64
  /**
65
  * Plugin upgrade todo list
35
  set_transient( 'superpwa_admin_notice_activation', true, 5 );
36
  }
37
 
 
 
 
 
 
 
 
38
  /**
39
  * Admin notice on plugin activation
40
  *
43
  function superpwa_admin_notice_activation() {
44
 
45
  // Return if transient is not set
46
+ if ( ! get_transient( 'superpwa_admin_notice_activation' ) ) {
47
  return;
48
+ }
49
 
50
+ $superpwa_is_ready = is_ssl() && superpwa_get_contents( SUPERPWA_MANIFEST_ABS ) && superpwa_get_contents( SUPERPWA_SW_ABS ) && ( ! superpwa_onesignal_manifest_notice_check() ) ? 'Your app is ready with the default settings. ' : '';
51
 
52
  echo '<div class="updated notice is-dismissible"><p>' . sprintf( __( 'Thank you for installing <strong>Super Progressive Web Apps!</strong> '. $superpwa_is_ready .'<a href="%s">Customize your app &rarr;</a>', 'super-progressive-web-apps' ), admin_url( 'options-general.php?page=superpwa' ) ) . '</p></div>';
53
 
54
  // Delete transient
55
  delete_transient( 'superpwa_admin_notice_activation' );
56
  }
57
+ add_action( 'admin_notices', 'superpwa_admin_notice_activation' );
58
 
59
  /**
60
  * Plugin upgrade todo list
admin/do.php CHANGED
@@ -3,9 +3,10 @@
3
  * Operations and common functions of SuperPWA
4
  *
5
  * @since 1.0
6
- * @function superpwa_after_save_settings_todo() Todo list after saving admin options
7
- * @function superpwa_is_amp() Check if any AMP plugin is installed
8
- * @function superpwa_get_start_url() Return Start Page URL
 
9
  */
10
 
11
  // Exit if accessed directly
@@ -39,24 +40,29 @@ add_action( 'update_option_superpwa_settings', 'superpwa_after_save_settings_tod
39
  function superpwa_is_amp() {
40
 
41
  // AMP for WordPress - https://wordpress.org/plugins/amp
42
- if ( function_exists( 'amp_init' ) )
43
- return 'amp/';
 
44
 
45
  // AMP for WP - https://wordpress.org/plugins/accelerated-mobile-pages/
46
- if ( function_exists( 'ampforwp_generate_endpoint' ) )
47
- return 'amp/';
 
48
 
49
  // Better AMP � https://wordpress.org/plugins/better-amp/
50
- if ( class_exists( 'Better_AMP' ) )
51
  return 'amp/';
 
52
 
53
  // AMP Supremacy - https://wordpress.org/plugins/amp-supremacy/
54
- if ( class_exists( 'AMP_Init' ) )
55
  return 'amp/';
 
56
 
57
  // WP AMP - https://wordpress.org/plugins/wp-amp-ninja/
58
- if ( function_exists( 'wpamp_init' ) )
59
  return '?wpamp';
 
60
 
61
  return false;
62
  }
@@ -91,4 +97,32 @@ function superpwa_get_start_url( $rel = false ) {
91
  $amp_url = superpwa_is_amp() !== false && ( isset( $settings['start_url_amp'] ) && $settings['start_url_amp'] == 1 ) ? superpwa_is_amp() : '';
92
 
93
  return $start_url . $amp_url;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
3
  * Operations and common functions of SuperPWA
4
  *
5
  * @since 1.0
6
+ * @function superpwa_after_save_settings_todo() Todo list after saving admin options
7
+ * @function superpwa_is_amp() Check if any AMP plugin is installed
8
+ * @function superpwa_get_start_url() Return Start Page URL
9
+ * @function superpwa_onesignal_manifest_notice_check() Check if OneSignal integration notice should be displayed or not.
10
  */
11
 
12
  // Exit if accessed directly
40
  function superpwa_is_amp() {
41
 
42
  // AMP for WordPress - https://wordpress.org/plugins/amp
43
+ if ( function_exists( 'amp_init' ) ) {
44
+ return defined( 'AMP_QUERY_VAR' ) ? AMP_QUERY_VAR . '/' : 'amp/';
45
+ }
46
 
47
  // AMP for WP - https://wordpress.org/plugins/accelerated-mobile-pages/
48
+ if ( function_exists( 'ampforwp_generate_endpoint' ) ) {
49
+ return defined( 'AMPFORWP_AMP_QUERY_VAR' ) ? AMPFORWP_AMP_QUERY_VAR . '/' : 'amp/';
50
+ }
51
 
52
  // Better AMP � https://wordpress.org/plugins/better-amp/
53
+ if ( class_exists( 'Better_AMP' ) ) {
54
  return 'amp/';
55
+ }
56
 
57
  // AMP Supremacy - https://wordpress.org/plugins/amp-supremacy/
58
+ if ( class_exists( 'AMP_Init' ) ) {
59
  return 'amp/';
60
+ }
61
 
62
  // WP AMP - https://wordpress.org/plugins/wp-amp-ninja/
63
+ if ( function_exists( 'wpamp_init' ) ) {
64
  return '?wpamp';
65
+ }
66
 
67
  return false;
68
  }
97
  $amp_url = superpwa_is_amp() !== false && ( isset( $settings['start_url_amp'] ) && $settings['start_url_amp'] == 1 ) ? superpwa_is_amp() : '';
98
 
99
  return $start_url . $amp_url;
100
+ }
101
+
102
+ /**
103
+ * Check if OneSignal integration notice should be displayed or not.
104
+ *
105
+ * @return Bool True if notice should be displayed. False otherwise.
106
+ * @since 1.5
107
+ */
108
+ function superpwa_onesignal_manifest_notice_check() {
109
+
110
+ // No notice needed if OneSignal is not installed or there is no gcm_sender_id
111
+ if ( ! superpwa_onesignal_get_gcm_sender_id() ) {
112
+ return false;
113
+ }
114
+
115
+ // Get OneSignal settins
116
+ $onesignal_wp_settings = get_option( 'OneSignalWPSetting' );
117
+
118
+ // No notice needed if OneSignal custom manifest is enabled and the manifest is the SuperPWA manifest
119
+ if (
120
+ ( isset( $onesignal_wp_settings["use_custom_manifest"] ) ) && ( $onesignal_wp_settings["use_custom_manifest"] == 1 ) &&
121
+ ( isset( $onesignal_wp_settings["custom_manifest_url"] ) ) && ( strcasecmp( trim( $onesignal_wp_settings["custom_manifest_url"] ), SUPERPWA_MANIFEST_SRC ) == 0 )
122
+ ) {
123
+ return false;
124
+ }
125
+
126
+ // Display notice for every other case
127
+ return true;
128
  }
public/manifest.php CHANGED
@@ -4,12 +4,13 @@
4
  *
5
  * @since 1.0
6
  * @function superpwa_generate_manifest() Generate and write manifest
7
- * @function superpwa_add_manifest_to_header() Add manifest to header (wp_head)
8
  * @function superpwa_register_service_worker() Register service worker in the footer (wp_footer)
9
  * @function superpwa_delete_manifest() Delete manifest
10
  * @function superpwa_get_pwa_icons() Get PWA Icons
11
  * @function superpwa_get_scope() Get navigation scope of PWA
12
  * @function superpwa_get_orientation() Get orientation of PWA
 
13
  */
14
 
15
  // Exit if accessed directly
@@ -20,6 +21,9 @@ if ( ! defined('ABSPATH') ) exit;
20
  *
21
  * @return true on success, false on failure.
22
  * @since 1.0
 
 
 
23
  */
24
  function superpwa_generate_manifest() {
25
 
@@ -38,6 +42,11 @@ function superpwa_generate_manifest() {
38
  'scope' => superpwa_get_scope(),
39
  );
40
 
 
 
 
 
 
41
  // Delete manifest if it exists
42
  superpwa_delete_manifest();
43
 
@@ -52,7 +61,7 @@ function superpwa_generate_manifest() {
52
  *
53
  * @since 1.0
54
  */
55
- function superpwa_add_manifest_to_header() {
56
 
57
  // Get Settings
58
  $settings = superpwa_get_settings();
@@ -60,7 +69,7 @@ function superpwa_add_manifest_to_header() {
60
  echo '<!-- Manifest added by SuperPWA -->' . PHP_EOL . '<link rel="manifest" href="'. SUPERPWA_MANIFEST_SRC . '">' . PHP_EOL;
61
  echo '<meta name="theme-color" content="'. $settings['theme_color'] .'">' . PHP_EOL;
62
  }
63
- add_action( 'wp_head', 'superpwa_add_manifest_to_header' );
64
 
65
  /**
66
  * Delete manifest
@@ -145,4 +154,28 @@ function superpwa_get_orientation() {
145
  default:
146
  return 'any';
147
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
4
  *
5
  * @since 1.0
6
  * @function superpwa_generate_manifest() Generate and write manifest
7
+ * @function superpwa_add_manifest_to_wp_head() Add manifest to header (wp_head)
8
  * @function superpwa_register_service_worker() Register service worker in the footer (wp_footer)
9
  * @function superpwa_delete_manifest() Delete manifest
10
  * @function superpwa_get_pwa_icons() Get PWA Icons
11
  * @function superpwa_get_scope() Get navigation scope of PWA
12
  * @function superpwa_get_orientation() Get orientation of PWA
13
+ * @function superpwa_onesignal_get_gcm_sender_id() Extract gcm_sender_id from OneSignal settings
14
  */
15
 
16
  // Exit if accessed directly
21
  *
22
  * @return true on success, false on failure.
23
  * @since 1.0
24
+ * @since 1.3 Added support for 512x512 icon.
25
+ * @since 1.4 Added orientation and scope.
26
+ * @since 1.5 Added gcm_sender_id
27
  */
28
  function superpwa_generate_manifest() {
29
 
42
  'scope' => superpwa_get_scope(),
43
  );
44
 
45
+ // gcm_sender_id
46
+ if ( superpwa_onesignal_get_gcm_sender_id() !== false ) {
47
+ $manifest['gcm_sender_id'] = superpwa_onesignal_get_gcm_sender_id();
48
+ }
49
+
50
  // Delete manifest if it exists
51
  superpwa_delete_manifest();
52
 
61
  *
62
  * @since 1.0
63
  */
64
+ function superpwa_add_manifest_to_wp_head() {
65
 
66
  // Get Settings
67
  $settings = superpwa_get_settings();
69
  echo '<!-- Manifest added by SuperPWA -->' . PHP_EOL . '<link rel="manifest" href="'. SUPERPWA_MANIFEST_SRC . '">' . PHP_EOL;
70
  echo '<meta name="theme-color" content="'. $settings['theme_color'] .'">' . PHP_EOL;
71
  }
72
+ add_action( 'wp_head', 'superpwa_add_manifest_to_wp_head', 2 );
73
 
74
  /**
75
  * Delete manifest
154
  default:
155
  return 'any';
156
  }
157
+ }
158
+
159
+ /**
160
+ * Extract gcm_sender_id from OneSignal settings
161
+ *
162
+ * @link https://wordpress.org/plugins/onesignal-free-web-push-notifications/
163
+ *
164
+ * @return String|Bool gcm_sender_id if it exists, false otherwise
165
+ * @since 1.5
166
+ */
167
+ function superpwa_onesignal_get_gcm_sender_id() {
168
+
169
+ // If OneSignal is installed and active
170
+ if ( class_exists( 'OneSignal' ) ) {
171
+
172
+ // Get OneSignal settins
173
+ $onesignal_wp_settings = get_option( 'OneSignalWPSetting' );
174
+
175
+ if ( isset( $onesignal_wp_settings['gcm_sender_id'] ) && ( $onesignal_wp_settings['gcm_sender_id'] != '' ) ) {
176
+ return $onesignal_wp_settings['gcm_sender_id'];
177
+ }
178
+ }
179
+
180
+ return false;
181
  }
readme.txt CHANGED
@@ -1,5 +1,5 @@
1
  === Super Progressive Web Apps ===
2
- Contributors: arunbasillal, josevarghese
3
  Donate link: http://millionclues.com/donate/
4
  Tags: pwa, progressive web apps, manifest, web manifest, android app, chrome app, add to homescreen, mobile web
5
  Requires at least: 3.5.0
@@ -9,15 +9,15 @@ Stable tag: trunk
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
- SuperPWA helps you convert your WordPress website into a Progressive Web App.
13
 
14
  == Description ==
15
 
16
- Progressive Web Apps (PWA) is a new technology that creates a middle ground between a website and a mobile app. They are installed on the phone like a normal app (web app) and can be accessed from the home screen.
17
 
18
  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!
19
 
20
- Super Progressive Web Apps makes it easy for you to convert your WordPress website into a Progressive Web App easily!
21
 
22
  Once SuperPWA is installed, users browsing your website from a supported mobile device will see a "Add To Home Screen" notice (from the bottom of the screen) and will be able to 'install your website' on the home screen of their device. Every page visited is stored locally on their device and will be available to read even when they are offline!
23
 
@@ -49,10 +49,11 @@ Here are the current features of Super Progressive Web Apps:
49
  * New in version 1.3: Improved in-browser service worker update handling.
50
  * New in version 1.4: You can now set the default orientation of your PWA. Choose from "any" (Follow Device Orientation), "Portrait" and "Landscape".
51
  * New in version 1.4: You can now set the theme_color property in the manifest.
 
52
 
53
  **Upcoming features:**
54
 
55
- * Push notifications.
56
 
57
  ### Progressive Web App Minimum Requirements
58
 
@@ -143,6 +144,13 @@ PWA's require browsers with support for service workers and for iOS devices, sup
143
 
144
  == Changelog ==
145
 
 
 
 
 
 
 
 
146
  = 1.4 =
147
  * Date: 21.February.2018
148
  * New Feature: Added UI for default orientation of your PWA. Orientation can now be set as "any", "portrait" or "landscape". [Feature request from @doofustoo](https://wordpress.org/support/topic/almost-perfect-335/).
@@ -191,6 +199,12 @@ PWA's require browsers with support for service workers and for iOS devices, sup
191
 
192
  == Upgrade Notice ==
193
 
 
 
 
 
 
 
194
  = 1.4 =
195
  * New Feature: Added UI for default orientation of your PWA. Orientation can now be set as "any", "portrait" or "landscape".
196
  * New Feature: Added UI for theme_color property in manifest.
1
  === Super Progressive Web Apps ===
2
+ Contributors: arunbasillal, josevarghese, superpwa
3
  Donate link: http://millionclues.com/donate/
4
  Tags: pwa, progressive web apps, manifest, web manifest, android app, chrome app, add to homescreen, mobile web
5
  Requires at least: 3.5.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
+ SuperPWA helps you convert your WordPress website into a Progressive Web App instantly.
13
 
14
  == Description ==
15
 
16
+ 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.
17
 
18
  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!
19
 
20
+ Super Progressive Web Apps makes it easy for you to convert your WordPress website into a Progressive Web App instantly!
21
 
22
  Once SuperPWA is installed, users browsing your website from a supported mobile device will see a "Add To Home Screen" notice (from the bottom of the screen) and will be able to 'install your website' on the home screen of their device. Every page visited is stored locally on their device and will be available to read even when they are offline!
23
 
49
  * New in version 1.3: Improved in-browser service worker update handling.
50
  * New in version 1.4: You can now set the default orientation of your PWA. Choose from "any" (Follow Device Orientation), "Portrait" and "Landscape".
51
  * New in version 1.4: You can now set the theme_color property in the manifest.
52
+ * New in version 1.5: OneSignal integration for Push notifications.
53
 
54
  **Upcoming features:**
55
 
56
+ * Offline Indicator Notice.
57
 
58
  ### Progressive Web App Minimum Requirements
59
 
144
 
145
  == Changelog ==
146
 
147
+ = 1.5 =
148
+ * Date: 18.March.2018
149
+ * New Feature: OneSignal integration for Push notifications.
150
+ * Enhancement: Moved manifest to the top of wp_head for easier detection by browsers.
151
+ * Enhancement: Added support for custom AMP endpoints for AMP for WordPress and AMP for WP.
152
+ * Enhancement: Added UI notice when using AMP for WordPress to warn user not to use the AMP version of start page if the start page is the homepage, the blog index, or the archives page.
153
+
154
  = 1.4 =
155
  * Date: 21.February.2018
156
  * New Feature: Added UI for default orientation of your PWA. Orientation can now be set as "any", "portrait" or "landscape". [Feature request from @doofustoo](https://wordpress.org/support/topic/almost-perfect-335/).
199
 
200
  == Upgrade Notice ==
201
 
202
+ = 1.5 =
203
+ * New Feature: OneSignal integration for Push notifications.
204
+ * Enhancement: Moved manifest to the top of wp_head for easier detection by browsers.
205
+ * Enhancement: Added support for custom AMP endpoints for AMP for WordPress and AMP for WP.
206
+ * Enhancement: Added UI notice when using AMP for WordPress to warn user not to use the AMP version of start page if the start page is the homepage, the blog index, or the archives page.
207
+
208
  = 1.4 =
209
  * New Feature: Added UI for default orientation of your PWA. Orientation can now be set as "any", "portrait" or "landscape".
210
  * New Feature: Added UI for theme_color property in manifest.
superpwa.php CHANGED
@@ -1,11 +1,12 @@
1
  <?php
2
  /**
3
  * Plugin Name: Super Progressive Web Apps
4
- * Plugin URI: https://github.com/SuperPWA/Super-Progressive-Web-Apps
5
  * Description: Convert your WordPress website into a Progressive Web App
6
  * Author: SuperPWA
 
7
  * Contributors: Arun Basil Lal, Jose Varghese
8
- * Version: 1.4
9
  * Text Domain: super-progressive-web-apps
10
  * Domain Path: /languages
11
  * License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
@@ -48,7 +49,7 @@ if ( ! defined('ABSPATH') ) exit;
48
  */
49
  if ( ! defined('SUPERPWA_PATH_ABS ') ) define('SUPERPWA_PATH_ABS', plugin_dir_path( __FILE__ )); // absolute path to the plugin directory. eg - /var/www/html/wp-content/plugins/superpwa/
50
  if ( ! defined('SUPERPWA_PATH_SRC') ) define('SUPERPWA_PATH_SRC', plugin_dir_url( __FILE__ )); // link to the plugin folder. eg - http://example.com/wp/wp-content/plugins/superpwa/
51
- if ( ! defined('SUPERPWA_VERSION') ) define('SUPERPWA_VERSION', '1.4'); // Plugin version
52
  if ( ! defined('SUPERPWA_MANIFEST_FILENAME') ) define('SUPERPWA_MANIFEST_FILENAME', 'superpwa-manifest.json'); // Name of Manifest file
53
  if ( ! defined('SUPERPWA_MANIFEST_ABS') ) define('SUPERPWA_MANIFEST_ABS', trailingslashit( ABSPATH ) . SUPERPWA_MANIFEST_FILENAME); // Absolute path to manifest
54
  if ( ! defined('SUPERPWA_MANIFEST_SRC') ) define('SUPERPWA_MANIFEST_SRC', trailingslashit( get_bloginfo('wpurl') ) . SUPERPWA_MANIFEST_FILENAME); // Link to manifest
1
  <?php
2
  /**
3
  * Plugin Name: Super Progressive Web Apps
4
+ * Plugin URI: https://superpwa.com/
5
  * Description: Convert your WordPress website into a Progressive Web App
6
  * Author: SuperPWA
7
+ * Author URI: https://superpwa.com/
8
  * Contributors: Arun Basil Lal, Jose Varghese
9
+ * Version: 1.5
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
49
  */
50
  if ( ! defined('SUPERPWA_PATH_ABS ') ) define('SUPERPWA_PATH_ABS', plugin_dir_path( __FILE__ )); // absolute path to the plugin directory. eg - /var/www/html/wp-content/plugins/superpwa/
51
  if ( ! defined('SUPERPWA_PATH_SRC') ) define('SUPERPWA_PATH_SRC', plugin_dir_url( __FILE__ )); // link to the plugin folder. eg - http://example.com/wp/wp-content/plugins/superpwa/
52
+ if ( ! defined('SUPERPWA_VERSION') ) define('SUPERPWA_VERSION', '1.5'); // Plugin version
53
  if ( ! defined('SUPERPWA_MANIFEST_FILENAME') ) define('SUPERPWA_MANIFEST_FILENAME', 'superpwa-manifest.json'); // Name of Manifest file
54
  if ( ! defined('SUPERPWA_MANIFEST_ABS') ) define('SUPERPWA_MANIFEST_ABS', trailingslashit( ABSPATH ) . SUPERPWA_MANIFEST_FILENAME); // Absolute path to manifest
55
  if ( ! defined('SUPERPWA_MANIFEST_SRC') ) define('SUPERPWA_MANIFEST_SRC', trailingslashit( get_bloginfo('wpurl') ) . SUPERPWA_MANIFEST_FILENAME); // Link to manifest