Version Description
- Date: 28.December.2018
- Tested with WordPress 5.0.2.
- Enhancement: Dynamic service worker and manifest.
- Enhancement: SuperPWA is now compatible with WordPress in a sub-folder.
- Enhancement: Added UI to set Display property in the web app manifest.
- Enhancement: Limit short_name to 12 characters to meet Lighthouse recommendation.
- Enhancement: Added PHP CodeSniffer to stick to "WordPress-Extra" coding standards. Thanks Daniel for the work.
- Enhancement: SuperPWA is available in 12 languages now, thanks to the awesome translators! Translators are credited in the release note.
Download this release
Release Info
Developer | arunbasillal |
Plugin | Super Progressive Web Apps |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.9 to 2.0
- 3rd-party/onesignal.php +4 -22
- README.MD +13 -3
- admin/admin-ui-render-settings.php +61 -23
- admin/admin-ui-setup.php +17 -23
- admin/basic-setup.php +151 -32
- admin/js/main.js +9 -0
- composer.json +27 -0
- composer.lock +178 -0
- functions/common.php +16 -8
- functions/multisite.php +6 -4
- languages/super-progressive-web-apps-fr_FR.po +480 -480
- languages/super-progressive-web-apps.pot +132 -167
- phpcs.xml +6 -0
- public/manifest.php +135 -54
- public/sw.php +39 -27
- readme.txt +23 -2
- superpwa.php +35 -7
3rd-party/onesignal.php
CHANGED
@@ -82,14 +82,14 @@ function superpwa_onesignal_sw_filename( $sw_filename ) {
|
|
82 |
*
|
83 |
* @return (string) Import OneSignal's service worker into SuperPWA
|
84 |
*
|
|
|
|
|
85 |
* @since 1.8
|
|
|
86 |
*/
|
87 |
function superpwa_onesignal_sw( $sw ) {
|
88 |
|
89 |
-
$onesignal
|
90 |
-
$onesignal .= 'header( "Content-Type: application/javascript" );' . PHP_EOL;
|
91 |
-
$onesignal .= 'echo "importScripts( \'' . superpwa_httpsify( plugin_dir_url( 'onesignal-free-web-push-notifications/onesignal.php' ) ) . 'sdk_files/OneSignalSDKWorker.js.php\' );";' . PHP_EOL;
|
92 |
-
$onesignal .= '?>' . PHP_EOL . PHP_EOL;
|
93 |
|
94 |
return $onesignal . $sw;
|
95 |
}
|
@@ -114,20 +114,11 @@ function superpwa_onesignal_activation() {
|
|
114 |
// Filter in gcm_sender_id to SuperPWA manifest
|
115 |
add_filter( 'superpwa_manifest', 'superpwa_onesignal_add_gcm_sender_id' );
|
116 |
|
117 |
-
// Regenerate SuperPWA manifest
|
118 |
-
superpwa_generate_manifest();
|
119 |
-
|
120 |
-
// Delete service worker if it exists
|
121 |
-
superpwa_delete_sw();
|
122 |
-
|
123 |
// Change service worker filename to match OneSignal's service worker
|
124 |
add_filter( 'superpwa_sw_filename', 'superpwa_onesignal_sw_filename' );
|
125 |
|
126 |
// Import OneSignal service worker in SuperPWA
|
127 |
add_filter( 'superpwa_sw_template', 'superpwa_onesignal_sw' );
|
128 |
-
|
129 |
-
// Regenerate SuperPWA service worker
|
130 |
-
superpwa_generate_sw();
|
131 |
}
|
132 |
add_action( 'activate_onesignal-free-web-push-notifications/onesignal.php', 'superpwa_onesignal_activation', 11 );
|
133 |
|
@@ -151,20 +142,11 @@ function superpwa_onesignal_deactivation() {
|
|
151 |
// Remove gcm_sender_id from SuperPWA manifest
|
152 |
remove_filter( 'superpwa_manifest', 'superpwa_onesignal_add_gcm_sender_id' );
|
153 |
|
154 |
-
// Regenerate SuperPWA manifest
|
155 |
-
superpwa_generate_manifest();
|
156 |
-
|
157 |
-
// Delete service worker if it exists
|
158 |
-
superpwa_delete_sw();
|
159 |
-
|
160 |
// Restore the default service worker of SuperPWA
|
161 |
remove_filter( 'superpwa_sw_filename', 'superpwa_onesignal_sw_filename' );
|
162 |
|
163 |
// Remove OneSignal service worker in SuperPWA
|
164 |
remove_filter( 'superpwa_sw_template', 'superpwa_onesignal_sw' );
|
165 |
-
|
166 |
-
// Regenerate SuperPWA service worker
|
167 |
-
superpwa_generate_sw();
|
168 |
}
|
169 |
add_action( 'deactivate_onesignal-free-web-push-notifications/onesignal.php', 'superpwa_onesignal_deactivation', 11 );
|
170 |
|
82 |
*
|
83 |
* @return (string) Import OneSignal's service worker into SuperPWA
|
84 |
*
|
85 |
+
* @author Arun Basil Lal
|
86 |
+
*
|
87 |
* @since 1.8
|
88 |
+
* @since 2.0 Removed content-type header for compatibility with dynamic service workers.
|
89 |
*/
|
90 |
function superpwa_onesignal_sw( $sw ) {
|
91 |
|
92 |
+
$onesignal = 'importScripts( \'' . superpwa_httpsify( plugin_dir_url( 'onesignal-free-web-push-notifications/onesignal.php' ) ) . 'sdk_files/OneSignalSDKWorker.js.php\' );' . PHP_EOL;
|
|
|
|
|
|
|
93 |
|
94 |
return $onesignal . $sw;
|
95 |
}
|
114 |
// Filter in gcm_sender_id to SuperPWA manifest
|
115 |
add_filter( 'superpwa_manifest', 'superpwa_onesignal_add_gcm_sender_id' );
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
// Change service worker filename to match OneSignal's service worker
|
118 |
add_filter( 'superpwa_sw_filename', 'superpwa_onesignal_sw_filename' );
|
119 |
|
120 |
// Import OneSignal service worker in SuperPWA
|
121 |
add_filter( 'superpwa_sw_template', 'superpwa_onesignal_sw' );
|
|
|
|
|
|
|
122 |
}
|
123 |
add_action( 'activate_onesignal-free-web-push-notifications/onesignal.php', 'superpwa_onesignal_activation', 11 );
|
124 |
|
142 |
// Remove gcm_sender_id from SuperPWA manifest
|
143 |
remove_filter( 'superpwa_manifest', 'superpwa_onesignal_add_gcm_sender_id' );
|
144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
// Restore the default service worker of SuperPWA
|
146 |
remove_filter( 'superpwa_sw_filename', 'superpwa_onesignal_sw_filename' );
|
147 |
|
148 |
// Remove OneSignal service worker in SuperPWA
|
149 |
remove_filter( 'superpwa_sw_template', 'superpwa_onesignal_sw' );
|
|
|
|
|
|
|
150 |
}
|
151 |
add_action( 'deactivate_onesignal-free-web-push-notifications/onesignal.php', 'superpwa_onesignal_deactivation', 11 );
|
152 |
|
README.MD
CHANGED
@@ -69,7 +69,7 @@ Users can come back to your website by launching the app from their home screen
|
|
69 |
## ⭐ Support the project
|
70 |
If you feel super excited and want to support us in a small way, please consider starring and/or sharing the repo! This helps us getting known and grow the community.
|
71 |
|
72 |
-
<a href="#"><img src="https://
|
73 |
|
74 |
Also you can support us via [following on social media's and share about us](#share-via-social-medias-and-spread-superpwa).
|
75 |
|
@@ -84,10 +84,18 @@ SuperPWA is easy to configure, it takes less than a minute to set-up your Progre
|
|
84 |
|
85 |
##### Videos on How Add to Home Screen & Progressive Web Apps works on Different Browsers
|
86 |
|
87 |
-
|<a href="https://www.youtube.com/watch?v=n3TjhNblvqs"><img src="http://i3.ytimg.com/vi/n3TjhNblvqs/maxresdefault.jpg" alt="Google Chrome for Android"/> </br>📽️ Google Chrome for Android| <a href="https://www.youtube.com/watch?v=9v4RwahRQFU"><img src="http://i3.ytimg.com/vi/9v4RwahRQFU/maxresdefault.jpg" alt="Mozilla Firefox for Android" /> </br>📽️ Mozilla Firefox for Android | <a href="https://www.youtube.com/watch?v=V8-AdKxm134"><img src="http://i3.ytimg.com/vi/V8-AdKxm134/maxresdefault.jpg" alt="Microsoft Edge for Android"/> </br>📽️ Microsoft Edge for Android | <a href="https://www.youtube.com/watch?v=Sbhgb6_QKfQ"><img src="http://i3.ytimg.com/vi/Sbhgb6_QKfQ/maxresdefault.jpg" alt="Samung Internet for Android "/> </br>📽️ Samung Internet for Android |
|
88 |
-
| :---------: | :---------: | :---------: | :---------: |
|
89 |
</br>
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
#### 📦 What's in the box
|
92 |
|
93 |
Here are the current features of Super Progressive Web Apps:
|
@@ -113,6 +121,8 @@ Here are the current features of Super Progressive Web Apps:
|
|
113 |
* New in version 1.7: Add-Ons for SuperPWA is here! Ships with [UTM Tracking Add-On](https://superpwa.com/addons/utm-tracking/?utm_source=GitHub&utm_medium=Readme-version) to track visits coming from your PWA.
|
114 |
* New in version 1.8: Compatibility issues with OneSignal are now resolved!
|
115 |
* New in version 1.8: New Add-On: [Apple Touch Icons](https://superpwa.com/addons/apple-touch-icons/?utm_source=GitHub&utm_medium=Readme-version) that sets your app icons as Apple Touch Icons.
|
|
|
|
|
116 |
|
117 |
#### 🔮 Upcoming features:
|
118 |
* Offline Indicator Notice.
|
69 |
## ⭐ Support the project
|
70 |
If you feel super excited and want to support us in a small way, please consider starring and/or sharing the repo! This helps us getting known and grow the community.
|
71 |
|
72 |
+
<a href="#"><img src="https://raw.githubusercontent.com/josevarghese/Super-Progressive-Web-Apps/master/jose-github-star-gif.gif" alt="Star our repo" width="300px" height="76.95px" /></a>
|
73 |
|
74 |
Also you can support us via [following on social media's and share about us](#share-via-social-medias-and-spread-superpwa).
|
75 |
|
84 |
|
85 |
##### Videos on How Add to Home Screen & Progressive Web Apps works on Different Browsers
|
86 |
|
87 |
+
|<a href="https://www.youtube.com/watch?v=n3TjhNblvqs"><img src="http://i3.ytimg.com/vi/n3TjhNblvqs/maxresdefault.jpg" alt="Google Chrome for Android"/> </br>📽️ Google Chrome for Android| <a href="https://www.youtube.com/watch?v=9v4RwahRQFU"><img src="http://i3.ytimg.com/vi/9v4RwahRQFU/maxresdefault.jpg" alt="Mozilla Firefox for Android" /> </br>📽️ Mozilla Firefox for Android | <a href="https://www.youtube.com/watch?v=V8-AdKxm134"><img src="http://i3.ytimg.com/vi/V8-AdKxm134/maxresdefault.jpg" alt="Microsoft Edge for Android"/> </br>📽️ Microsoft Edge for Android | <a href="https://www.youtube.com/watch?v=Sbhgb6_QKfQ"><img src="http://i3.ytimg.com/vi/Sbhgb6_QKfQ/maxresdefault.jpg" alt="Samung Internet for Android "/> </br>📽️ Samung Internet for Android | <a href="https://www.youtube.com/watch?v=bV8xE6lOdoY"><img src="http://i3.ytimg.com/vi/bV8xE6lOdoY/maxresdefault.jpg" alt="PWA on iOS - Safari Browser"/> </br>📽️ PWA on iOS - Safari Browser |
|
88 |
+
| :---------: | :---------: | :---------: | :---------: | :---------: |
|
89 |
</br>
|
90 |
|
91 |
+
##### Detailed Documentations for testing PWA on Browsers
|
92 |
+
|
93 |
+
* [PWA on Chrome for Android](https://superpwa.com/doc/test-pwa-google-chrome/)
|
94 |
+
* [PWA on Desktop - Chrome](https://superpwa.com/doc/test-pwa-on-desktop/)
|
95 |
+
* [PWA on iOS device - Safari Browser](https://superpwa.com/doc/test-pwa-ios-devices/)
|
96 |
+
* [PWA on Microsoft Edge Browser for Android](https://superpwa.com/doc/test-pwa-microsoft-edge/)
|
97 |
+
* [PWA on Samsung Internet Browser for Android](https://superpwa.com/doc/test-pwa-samsung-internet-browser/)
|
98 |
+
|
99 |
#### 📦 What's in the box
|
100 |
|
101 |
Here are the current features of Super Progressive Web Apps:
|
121 |
* New in version 1.7: Add-Ons for SuperPWA is here! Ships with [UTM Tracking Add-On](https://superpwa.com/addons/utm-tracking/?utm_source=GitHub&utm_medium=Readme-version) to track visits coming from your PWA.
|
122 |
* New in version 1.8: Compatibility issues with OneSignal are now resolved!
|
123 |
* New in version 1.8: New Add-On: [Apple Touch Icons](https://superpwa.com/addons/apple-touch-icons/?utm_source=GitHub&utm_medium=Readme-version) that sets your app icons as Apple Touch Icons.
|
124 |
+
* New in version 2.0: SuperPWA is now compatible with WordPress installed in a sub-folder.
|
125 |
+
* New in version 2.0: You can now set [display property](https://superpwa.com/doc/web-app-manifest-display-modes/?utm_source=GitHub&utm_medium=Readme-version) from SuperPWA settings.
|
126 |
|
127 |
#### 🔮 Upcoming features:
|
128 |
* Offline Indicator Notice.
|
admin/admin-ui-render-settings.php
CHANGED
@@ -14,6 +14,7 @@
|
|
14 |
* @function superpwa_start_url_cb() Start URL Dropdown
|
15 |
* @function superpwa_offline_page_cb() Offline Page Dropdown
|
16 |
* @function superpwa_orientation_cb() Default Orientation Dropdown
|
|
|
17 |
* @function superpwa_manifest_status_cb() Manifest Status
|
18 |
* @function superpwa_sw_status_cb() Service Worker Status
|
19 |
* @function superpwa_https_status_cb() HTTPS Status
|
@@ -54,10 +55,10 @@ function superpwa_app_short_name_cb() {
|
|
54 |
|
55 |
<fieldset>
|
56 |
|
57 |
-
<input type="text" name="superpwa_settings[app_short_name]" class="regular-text" value="<?php if ( isset( $settings['app_short_name'] ) && ( ! empty($settings['app_short_name']) ) ) echo esc_attr($settings['app_short_name']); ?>"/>
|
58 |
|
59 |
<p class="description">
|
60 |
-
<?php _e('Used when there is insufficient space to display the full name of the application. <code>12</code> characters or less
|
61 |
</p>
|
62 |
|
63 |
</fieldset>
|
@@ -259,7 +260,7 @@ function superpwa_offline_page_cb() {
|
|
259 |
</label>
|
260 |
|
261 |
<p class="description">
|
262 |
-
<?php printf( __( 'Offline page is displayed when the device is offline and the requested page is not already cached. Current offline page is <code>%s</code>', 'super-progressive-web-apps' ), get_permalink($settings['offline_page']) ? get_permalink( $settings['offline_page'] ) : get_bloginfo( '
|
263 |
</p>
|
264 |
|
265 |
<?php
|
@@ -297,44 +298,81 @@ function superpwa_orientation_cb() {
|
|
297 |
<?php
|
298 |
}
|
299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
/**
|
301 |
* Manifest Status
|
302 |
*
|
|
|
|
|
303 |
* @since 1.2
|
304 |
* @since 1.8 Attempt to generate manifest again if the manifest doesn't exist.
|
|
|
305 |
*/
|
306 |
function superpwa_manifest_status_cb() {
|
307 |
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
* Users who had permissions issue in the beginning will check the status after changing file system permissions.
|
312 |
-
* At this point we try to generate the manifest and service worker to see if its possible with the new permissions.
|
313 |
-
*/
|
314 |
-
if ( superpwa_get_contents( superpwa_manifest( 'abs' ) ) || superpwa_generate_manifest() ) {
|
315 |
-
|
316 |
printf( '<p><span class="dashicons dashicons-yes" style="color: #46b450;"></span> ' . __( 'Manifest generated successfully. You can <a href="%s" target="_blank">see it here →</a>', 'super-progressive-web-apps' ) . '</p>', superpwa_manifest( 'src' ) );
|
317 |
} else {
|
318 |
-
|
319 |
-
printf( '<p><span class="dashicons dashicons-no-alt" style="color: #dc3232;"></span> ' . __( 'Manifest generation failed. Check if WordPress can write to your root folder (the same folder with wp-config.php). <a href="%s" target="_blank">Read more →</a>', 'super-progressive-web-apps' ) . '</p>', 'https://superpwa.com/doc/fixing-manifest-service-worker-generation-failed-error/?utm_source=superpwa-plugin&utm_medium=settings-status-no-manifest' );
|
320 |
}
|
321 |
}
|
322 |
|
323 |
/**
|
324 |
* Service Worker Status
|
325 |
*
|
326 |
-
* @
|
327 |
-
* @
|
|
|
|
|
|
|
|
|
328 |
*/
|
329 |
function superpwa_sw_status_cb() {
|
330 |
-
|
331 |
-
//
|
332 |
-
if (
|
333 |
-
|
334 |
-
printf( '<p><span class="dashicons dashicons-yes" style="color: #46b450;"></span> ' . __( 'Service worker generated successfully.', 'super-progressive-web-apps' ) . '</p>' );
|
335 |
} else {
|
336 |
-
|
337 |
-
printf( '<p><span class="dashicons dashicons-no-alt" style="color: #dc3232;"></span> ' . __( 'Service worker generation failed. Check if WordPress can write to your root folder (the same folder with wp-config.php). <a href="%s" target="_blank">Read more →</a>', 'super-progressive-web-apps' ) . '</p>', 'https://superpwa.com/doc/fixing-manifest-service-worker-generation-failed-error/?utm_source=superpwa-plugin&utm_medium=settings-status-no-sw' );
|
338 |
}
|
339 |
}
|
340 |
|
@@ -399,4 +437,4 @@ function superpwa_admin_interface_render() {
|
|
399 |
</form>
|
400 |
</div>
|
401 |
<?php
|
402 |
-
}
|
14 |
* @function superpwa_start_url_cb() Start URL Dropdown
|
15 |
* @function superpwa_offline_page_cb() Offline Page Dropdown
|
16 |
* @function superpwa_orientation_cb() Default Orientation Dropdown
|
17 |
+
* @function superpwa_display_cb() Default Display Dropdown
|
18 |
* @function superpwa_manifest_status_cb() Manifest Status
|
19 |
* @function superpwa_sw_status_cb() Service Worker Status
|
20 |
* @function superpwa_https_status_cb() HTTPS Status
|
55 |
|
56 |
<fieldset>
|
57 |
|
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>
|
260 |
</label>
|
261 |
|
262 |
<p class="description">
|
263 |
+
<?php printf( __( 'Offline page is displayed when the device is offline and the requested page is not already cached. Current offline page is <code>%s</code>', 'super-progressive-web-apps' ), get_permalink($settings['offline_page']) ? get_permalink( $settings['offline_page'] ) : get_bloginfo( 'url' ) ); ?>
|
264 |
</p>
|
265 |
|
266 |
<?php
|
298 |
<?php
|
299 |
}
|
300 |
|
301 |
+
/**
|
302 |
+
* Default Display Dropdown
|
303 |
+
*
|
304 |
+
* @author Jose Varghese
|
305 |
+
*
|
306 |
+
* @since 2.0
|
307 |
+
*/
|
308 |
+
function superpwa_display_cb() {
|
309 |
+
|
310 |
+
// Get Settings
|
311 |
+
$settings = superpwa_get_settings(); ?>
|
312 |
+
|
313 |
+
<!-- Display Dropdown -->
|
314 |
+
<label for="superpwa_settings[display]">
|
315 |
+
<select name="superpwa_settings[display]" id="superpwa_settings[display]">
|
316 |
+
<option value="0" <?php if ( isset( $settings['display'] ) ) { selected( $settings['display'], 0 ); } ?>>
|
317 |
+
<?php _e( 'Full Screen', 'super-progressive-web-apps' ); ?>
|
318 |
+
</option>
|
319 |
+
<option value="1" <?php if ( isset( $settings['display'] ) ) { selected( $settings['display'], 1 ); } ?>>
|
320 |
+
<?php _e( 'Standalone', 'super-progressive-web-apps' ); ?>
|
321 |
+
</option>
|
322 |
+
<option value="2" <?php if ( isset( $settings['display'] ) ) { selected( $settings['display'], 2 ); } ?>>
|
323 |
+
<?php _e( 'Minimal UI', 'super-progressive-web-apps' ); ?>
|
324 |
+
</option>
|
325 |
+
<option value="3" <?php if ( isset( $settings['display'] ) ) { selected( $settings['display'], 3 ); } ?>>
|
326 |
+
<?php _e( 'Browser', 'super-progressive-web-apps' ); ?>
|
327 |
+
</option>
|
328 |
+
</select>
|
329 |
+
</label>
|
330 |
+
|
331 |
+
<p class="description">
|
332 |
+
<?php printf( __( 'Display mode decides what browser UI is shown when your app is launched. <code>Standalone</code> is default. <a href="%s" target="_blank">What\'s the difference? →</a>', 'super-progressive-web-apps' ) . '</p>', 'https://superpwa.com/doc/web-app-manifest-display-modes/?utm_source=superpwa-plugin&utm_medium=settings-display' ); ?>
|
333 |
+
</p>
|
334 |
+
|
335 |
+
<?php
|
336 |
+
}
|
337 |
+
|
338 |
/**
|
339 |
* Manifest Status
|
340 |
*
|
341 |
+
* @author Arun Basil Lal
|
342 |
+
*
|
343 |
* @since 1.2
|
344 |
* @since 1.8 Attempt to generate manifest again if the manifest doesn't exist.
|
345 |
+
* @since 2.0 Remove logic to check if manifest exists in favour of dynamic manifest.
|
346 |
*/
|
347 |
function superpwa_manifest_status_cb() {
|
348 |
|
349 |
+
// Dynamic files need a custom permalink structure.
|
350 |
+
if ( get_option( 'permalink_structure' ) !== '' ) {
|
351 |
+
// Since Manifest is dynamically generated, it should always be present.
|
|
|
|
|
|
|
|
|
|
|
352 |
printf( '<p><span class="dashicons dashicons-yes" style="color: #46b450;"></span> ' . __( 'Manifest generated successfully. You can <a href="%s" target="_blank">see it here →</a>', 'super-progressive-web-apps' ) . '</p>', superpwa_manifest( 'src' ) );
|
353 |
} else {
|
354 |
+
printf( '<p><span class="dashicons dashicons-no-alt" style="color: #dc3232;"></span> ' . __( 'SuperPWA requires a custom permalink structure. Go to <a href="%s" target="_blank">WordPress Settings > Permalinks</a> and choose anything other than "Plain".', 'super-progressive-web-apps' ) . '</p>', admin_url( 'options-permalink.php' ) );
|
|
|
355 |
}
|
356 |
}
|
357 |
|
358 |
/**
|
359 |
* Service Worker Status
|
360 |
*
|
361 |
+
* @author Arun Basil Lal
|
362 |
+
* @author Maria Daniel Deepak <daniel@danieldeepak.com>
|
363 |
+
*
|
364 |
+
* @since 1.2
|
365 |
+
* @since 1.8 Attempt to generate service worker again if it doesn't exist.
|
366 |
+
* @since 2.0 Modify logic to check if Service worker exists.
|
367 |
*/
|
368 |
function superpwa_sw_status_cb() {
|
369 |
+
|
370 |
+
// Dynamic files need a custom permalink structure.
|
371 |
+
if ( get_option( 'permalink_structure' ) !== '' ) {
|
372 |
+
// Since Service worker is dynamically generated, it should always be present.
|
373 |
+
printf( '<p><span class="dashicons dashicons-yes" style="color: #46b450;"></span> ' . __( 'Service worker generated successfully. <a href="%s" target="_blank">see it here →</a>', 'super-progressive-web-apps' ) . '</p>', superpwa_sw( 'src' ) );
|
374 |
} else {
|
375 |
+
printf( '<p><span class="dashicons dashicons-no-alt" style="color: #dc3232;"></span> ' . __( 'SuperPWA requires a custom permalink structure. Go to <a href="%s" target="_blank">WordPress Settings > Permalinks</a> and choose anything other than "Plain".', 'super-progressive-web-apps' ) . '</p>', admin_url( 'options-permalink.php' ) );
|
|
|
376 |
}
|
377 |
}
|
378 |
|
437 |
</form>
|
438 |
</div>
|
439 |
<?php
|
440 |
+
}
|
admin/admin-ui-setup.php
CHANGED
@@ -146,6 +146,15 @@ function superpwa_register_settings() {
|
|
146 |
'superpwa_basic_settings_section', // Page slug
|
147 |
'superpwa_basic_settings_section' // Settings Section ID
|
148 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
// PWA Status
|
151 |
add_settings_section(
|
@@ -197,7 +206,7 @@ function superpwa_validater_and_sanitizer( $settings ) {
|
|
197 |
$settings['app_name'] = sanitize_text_field( $settings['app_name'] ) == '' ? get_bloginfo( 'name' ) : sanitize_text_field( $settings['app_name'] );
|
198 |
|
199 |
// Sanitize Application Short Name
|
200 |
-
$settings['app_short_name'] = sanitize_text_field( $settings['app_short_name'] ) == '' ? get_bloginfo( 'name' ) : sanitize_text_field( $settings['app_short_name'] );
|
201 |
|
202 |
// Sanitize description
|
203 |
$settings['description'] = sanitize_text_field( $settings['description'] );
|
@@ -220,14 +229,17 @@ function superpwa_validater_and_sanitizer( $settings ) {
|
|
220 |
/**
|
221 |
* Get settings from database
|
222 |
*
|
223 |
-
* @
|
224 |
-
*
|
|
|
|
|
|
|
225 |
*/
|
226 |
function superpwa_get_settings() {
|
227 |
|
228 |
$defaults = array(
|
229 |
'app_name' => get_bloginfo( 'name' ),
|
230 |
-
'app_short_name' => get_bloginfo( 'name' ),
|
231 |
'description' => get_bloginfo( 'description' ),
|
232 |
'icon' => SUPERPWA_PATH_SRC . 'public/images/logo.png',
|
233 |
'splash_icon' => SUPERPWA_PATH_SRC . 'public/images/logo-512x512.png',
|
@@ -237,6 +249,7 @@ function superpwa_get_settings() {
|
|
237 |
'start_url_amp' => 0,
|
238 |
'offline_page' => 0,
|
239 |
'orientation' => 1,
|
|
|
240 |
);
|
241 |
|
242 |
$settings = get_option( 'superpwa_settings', $defaults );
|
@@ -268,25 +281,6 @@ function superpwa_enqueue_css_js( $hook ) {
|
|
268 |
}
|
269 |
add_action( 'admin_enqueue_scripts', 'superpwa_enqueue_css_js' );
|
270 |
|
271 |
-
/**
|
272 |
-
* Todo list after saving admin options
|
273 |
-
*
|
274 |
-
* Regenerate manifest
|
275 |
-
* Regenerate service worker
|
276 |
-
*
|
277 |
-
* @since 1.0
|
278 |
-
*/
|
279 |
-
function superpwa_after_save_settings_todo() {
|
280 |
-
|
281 |
-
// Regenerate manifest
|
282 |
-
superpwa_generate_manifest();
|
283 |
-
|
284 |
-
// Regenerate service worker
|
285 |
-
superpwa_generate_sw();
|
286 |
-
}
|
287 |
-
add_action( 'add_option_superpwa_settings', 'superpwa_after_save_settings_todo' );
|
288 |
-
add_action( 'update_option_superpwa_settings', 'superpwa_after_save_settings_todo' );
|
289 |
-
|
290 |
/**
|
291 |
* Admin footer text
|
292 |
*
|
146 |
'superpwa_basic_settings_section', // Page slug
|
147 |
'superpwa_basic_settings_section' // Settings Section ID
|
148 |
);
|
149 |
+
|
150 |
+
// Display
|
151 |
+
add_settings_field(
|
152 |
+
'superpwa_display', // ID
|
153 |
+
__('Display', 'super-progressive-web-apps'), // Title
|
154 |
+
'superpwa_display_cb', // CB
|
155 |
+
'superpwa_basic_settings_section', // Page slug
|
156 |
+
'superpwa_basic_settings_section' // Settings Section ID
|
157 |
+
);
|
158 |
|
159 |
// PWA Status
|
160 |
add_settings_section(
|
206 |
$settings['app_name'] = sanitize_text_field( $settings['app_name'] ) == '' ? get_bloginfo( 'name' ) : sanitize_text_field( $settings['app_name'] );
|
207 |
|
208 |
// Sanitize Application Short Name
|
209 |
+
$settings['app_short_name'] = substr( sanitize_text_field( $settings['app_short_name'] ) == '' ? get_bloginfo( 'name' ) : sanitize_text_field( $settings['app_short_name'] ), 0, 12 );
|
210 |
|
211 |
// Sanitize description
|
212 |
$settings['description'] = sanitize_text_field( $settings['description'] );
|
229 |
/**
|
230 |
* Get settings from database
|
231 |
*
|
232 |
+
* @return (Array) A merged array of default and settings saved in database.
|
233 |
+
*
|
234 |
+
* @author Arun Basil Lal
|
235 |
+
*
|
236 |
+
* @since 1.0
|
237 |
*/
|
238 |
function superpwa_get_settings() {
|
239 |
|
240 |
$defaults = array(
|
241 |
'app_name' => get_bloginfo( 'name' ),
|
242 |
+
'app_short_name' => substr( get_bloginfo( 'name' ), 0, 12 ),
|
243 |
'description' => get_bloginfo( 'description' ),
|
244 |
'icon' => SUPERPWA_PATH_SRC . 'public/images/logo.png',
|
245 |
'splash_icon' => SUPERPWA_PATH_SRC . 'public/images/logo-512x512.png',
|
249 |
'start_url_amp' => 0,
|
250 |
'offline_page' => 0,
|
251 |
'orientation' => 1,
|
252 |
+
'display' => 1,
|
253 |
);
|
254 |
|
255 |
$settings = get_option( 'superpwa_settings', $defaults );
|
281 |
}
|
282 |
add_action( 'admin_enqueue_scripts', 'superpwa_enqueue_css_js' );
|
283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
/**
|
285 |
* Admin footer text
|
286 |
*
|
admin/basic-setup.php
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
* @since 1.0
|
6 |
*
|
7 |
* @function superpwa_activate_plugin() Plugin activatation todo list
|
|
|
8 |
* @function superpwa_admin_notices() Admin notices
|
9 |
* @function superpwa_network_admin_notices() Network Admin notices
|
10 |
* @function superpwa_upgrader() Plugin upgrade todo list
|
@@ -18,7 +19,7 @@
|
|
18 |
if ( ! defined('ABSPATH') ) exit;
|
19 |
|
20 |
/**
|
21 |
-
* Plugin
|
22 |
*
|
23 |
* This function runs when user activates the plugin. Used in register_activation_hook()
|
24 |
* On multisites, during network activation, this is fired only for the main site.
|
@@ -32,13 +33,6 @@ if ( ! defined('ABSPATH') ) exit;
|
|
32 |
* @since 1.6 Added checks for multisite compatibility.
|
33 |
*/
|
34 |
function superpwa_activate_plugin( $network_active ) {
|
35 |
-
|
36 |
-
// Generate manifest with default options
|
37 |
-
superpwa_generate_manifest();
|
38 |
-
|
39 |
-
// Generate service worker
|
40 |
-
superpwa_generate_sw();
|
41 |
-
|
42 |
// Not network active i.e. plugin is activated on a single install (normal WordPress install) or a single site on a multisite network
|
43 |
if ( ! $network_active ) {
|
44 |
|
@@ -53,6 +47,40 @@ function superpwa_activate_plugin( $network_active ) {
|
|
53 |
}
|
54 |
register_activation_hook( SUPERPWA_PATH_ABS . 'superpwa.php', 'superpwa_activate_plugin' );
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
/**
|
57 |
* Admin Notices
|
58 |
*
|
@@ -68,9 +96,13 @@ function superpwa_admin_notices() {
|
|
68 |
// Admin notice on plugin activation
|
69 |
if ( get_transient( 'superpwa_admin_notice_activation' ) ) {
|
70 |
|
71 |
-
$superpwa_is_ready = superpwa_is_pwa_ready() ? 'Your app is ready with the default settings. ' : '';
|
|
|
|
|
|
|
|
|
72 |
|
73 |
-
echo '<div class="updated notice is-dismissible"><p>' .
|
74 |
|
75 |
// Delete transient
|
76 |
delete_transient( 'superpwa_admin_notice_activation' );
|
@@ -146,13 +178,6 @@ function superpwa_upgrader() {
|
|
146 |
if ( $current_ver === false ) {
|
147 |
|
148 |
if ( is_multisite() ) {
|
149 |
-
|
150 |
-
// Generate manifestx
|
151 |
-
superpwa_generate_manifest();
|
152 |
-
|
153 |
-
// Generate service worker
|
154 |
-
superpwa_generate_sw();
|
155 |
-
|
156 |
// For multisites, save the activation status of current blog.
|
157 |
superpwa_multisite_activation_status( true );
|
158 |
}
|
@@ -201,20 +226,44 @@ function superpwa_upgrader() {
|
|
201 |
|
202 |
// Restore the default service worker filename of SuperPWA.
|
203 |
remove_filter( 'superpwa_sw_filename', 'superpwa_onesignal_sw_filename' );
|
204 |
-
|
|
|
205 |
// Delete service worker if it exists.
|
206 |
-
superpwa_delete_sw();
|
207 |
|
208 |
// Change service worker filename to match OneSignal's service worker.
|
209 |
add_filter( 'superpwa_sw_filename', 'superpwa_onesignal_sw_filename' );
|
210 |
}
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
// Add current version to database
|
219 |
update_option( 'superpwa_version', SUPERPWA_VERSION );
|
220 |
|
@@ -239,12 +288,13 @@ add_action( 'admin_init', 'superpwa_upgrader' );
|
|
239 |
* @since 1.6 register_deactivation_hook() moved to this file (basic-setup.php) from main plugin file (superpwa.php)
|
240 |
*/
|
241 |
function superpwa_deactivate_plugin( $network_active ) {
|
242 |
-
|
243 |
// Delete manifest
|
244 |
-
superpwa_delete_manifest();
|
245 |
-
|
|
|
246 |
// Delete service worker
|
247 |
-
superpwa_delete_sw();
|
248 |
|
249 |
// For multisites, save the de-activation status of current blog.
|
250 |
superpwa_multisite_activation_status( false );
|
@@ -272,7 +322,7 @@ add_action( 'plugins_loaded', 'superpwa_load_plugin_textdomain' );
|
|
272 |
* @since 1.0
|
273 |
*/
|
274 |
function superpwa_settings_link( $links ) {
|
275 |
-
|
276 |
return array_merge(
|
277 |
array(
|
278 |
'settings' => '<a href="' . admin_url( 'admin.php?page=superpwa' ) . '">' . __( 'Settings', 'super-progressive-web-apps' ) . '</a>'
|
@@ -280,7 +330,7 @@ function superpwa_settings_link( $links ) {
|
|
280 |
$links
|
281 |
);
|
282 |
}
|
283 |
-
add_filter( '
|
284 |
|
285 |
/**
|
286 |
* Add donate and other links to plugins list
|
@@ -298,4 +348,73 @@ function superpwa_plugin_row_meta( $links, $file ) {
|
|
298 |
|
299 |
return $links;
|
300 |
}
|
301 |
-
add_filter( 'plugin_row_meta', 'superpwa_plugin_row_meta', 10, 2 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @since 1.0
|
6 |
*
|
7 |
* @function superpwa_activate_plugin() Plugin activatation todo list
|
8 |
+
* @function superpwa_activation_redirect() Redirect to SuperPWA UI on plugin activation
|
9 |
* @function superpwa_admin_notices() Admin notices
|
10 |
* @function superpwa_network_admin_notices() Network Admin notices
|
11 |
* @function superpwa_upgrader() Plugin upgrade todo list
|
19 |
if ( ! defined('ABSPATH') ) exit;
|
20 |
|
21 |
/**
|
22 |
+
* Plugin activation todo list
|
23 |
*
|
24 |
* This function runs when user activates the plugin. Used in register_activation_hook()
|
25 |
* On multisites, during network activation, this is fired only for the main site.
|
33 |
* @since 1.6 Added checks for multisite compatibility.
|
34 |
*/
|
35 |
function superpwa_activate_plugin( $network_active ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
// Not network active i.e. plugin is activated on a single install (normal WordPress install) or a single site on a multisite network
|
37 |
if ( ! $network_active ) {
|
38 |
|
47 |
}
|
48 |
register_activation_hook( SUPERPWA_PATH_ABS . 'superpwa.php', 'superpwa_activate_plugin' );
|
49 |
|
50 |
+
/**
|
51 |
+
* Redirect to SuperPWA UI on plugin activation.
|
52 |
+
*
|
53 |
+
* Will redirect to SuperPWA settings page when plugin is activated.
|
54 |
+
* Will not redirect if multiple plugins are activated at the same time.
|
55 |
+
* Will not redirect when activated network wide on multisite. Network admins know their way.
|
56 |
+
*
|
57 |
+
* @since 2.0
|
58 |
+
*/
|
59 |
+
function superpwa_activation_redirect( $plugin, $network_wide ) {
|
60 |
+
// Return if not SuperPWA or if plugin is activated network wide.
|
61 |
+
if ( $plugin !== plugin_basename( SUPERPWA_PLUGIN_FILE ) || $network_wide === true ) {
|
62 |
+
return false;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* An instance of the WP_Plugins_List_Table class.
|
67 |
+
*
|
68 |
+
* @link https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-admin/plugins.php#L15
|
69 |
+
*/
|
70 |
+
$wp_list_table_instance = new WP_Plugins_List_Table();
|
71 |
+
$current_action = $wp_list_table_instance->current_action();
|
72 |
+
|
73 |
+
// When only one plugin is activated, the current_action() method will return activate.
|
74 |
+
if ( $current_action !== 'activate' ) {
|
75 |
+
return false;
|
76 |
+
}
|
77 |
+
|
78 |
+
// Redirect to SuperPWA settings page.
|
79 |
+
exit( wp_redirect( admin_url( 'admin.php?page=superpwa' ) ) );
|
80 |
+
}
|
81 |
+
|
82 |
+
add_action( 'activated_plugin', 'superpwa_activation_redirect', PHP_INT_MAX, 2 );
|
83 |
+
|
84 |
/**
|
85 |
* Admin Notices
|
86 |
*
|
96 |
// Admin notice on plugin activation
|
97 |
if ( get_transient( 'superpwa_admin_notice_activation' ) ) {
|
98 |
|
99 |
+
$superpwa_is_ready = superpwa_is_pwa_ready() ? __( 'Your app is ready with the default settings. ', 'super-progressive-web-apps' ) : '';
|
100 |
+
|
101 |
+
// Do not display link to settings UI if we are already in the UI.
|
102 |
+
$screen = get_current_screen();
|
103 |
+
$superpwa_ui_link_text = ( strpos( $screen->id, 'superpwa' ) === false ) ? sprintf( __( '<a href="%s">Customize your app →</a>', 'super-progressive-web-apps' ), admin_url( 'admin.php?page=superpwa' ) ) : '';
|
104 |
|
105 |
+
echo '<div class="updated notice is-dismissible"><p>' . __( 'Thank you for installing <strong>Super Progressive Web Apps!</strong> ', 'super-progressive-web-apps' ) . $superpwa_is_ready . $superpwa_ui_link_text . '</p></div>';
|
106 |
|
107 |
// Delete transient
|
108 |
delete_transient( 'superpwa_admin_notice_activation' );
|
178 |
if ( $current_ver === false ) {
|
179 |
|
180 |
if ( is_multisite() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
// For multisites, save the activation status of current blog.
|
182 |
superpwa_multisite_activation_status( true );
|
183 |
}
|
226 |
|
227 |
// Restore the default service worker filename of SuperPWA.
|
228 |
remove_filter( 'superpwa_sw_filename', 'superpwa_onesignal_sw_filename' );
|
229 |
+
|
230 |
+
// TODO: Commenting the following line for now. Delete it later.
|
231 |
// Delete service worker if it exists.
|
232 |
+
// superpwa_delete_sw();
|
233 |
|
234 |
// Change service worker filename to match OneSignal's service worker.
|
235 |
add_filter( 'superpwa_sw_filename', 'superpwa_onesignal_sw_filename' );
|
236 |
}
|
237 |
|
238 |
+
/**
|
239 |
+
* Add display to database when upgrading from pre 2.0 versions.
|
240 |
+
* Delete manifest and service worker files.
|
241 |
+
*
|
242 |
+
* Until 2.0, there was no UI for display.
|
243 |
+
* In the manifest, display was hard coded as 'standalone'.
|
244 |
+
*
|
245 |
+
* Starting with 2.0, manifest and servcei worker files are dynamic and no longer static.
|
246 |
+
*
|
247 |
+
* @since 2.0
|
248 |
+
*/
|
249 |
+
if ( version_compare( $current_ver, '1.9', '<=' ) ) {
|
250 |
+
|
251 |
+
// Get settings
|
252 |
+
$settings = superpwa_get_settings();
|
253 |
+
|
254 |
+
// Display was set as 'standalone' until version 2.0. Set it as 1, which is 'standalone'.
|
255 |
+
$settings['display'] = 1;
|
256 |
+
|
257 |
+
// Write settings back to database
|
258 |
+
update_option( 'superpwa_settings', $settings );
|
259 |
+
|
260 |
+
// Delete manifest
|
261 |
+
superpwa_delete_manifest();
|
262 |
+
|
263 |
+
// Delete service worker
|
264 |
+
superpwa_delete_sw();
|
265 |
+
}
|
266 |
+
|
267 |
// Add current version to database
|
268 |
update_option( 'superpwa_version', SUPERPWA_VERSION );
|
269 |
|
288 |
* @since 1.6 register_deactivation_hook() moved to this file (basic-setup.php) from main plugin file (superpwa.php)
|
289 |
*/
|
290 |
function superpwa_deactivate_plugin( $network_active ) {
|
291 |
+
// TODO: Commenting the following line for now. Delete it later.
|
292 |
// Delete manifest
|
293 |
+
// superpwa_delete_manifest();
|
294 |
+
|
295 |
+
// TODO: Commenting the following line for now. Delete it later.
|
296 |
// Delete service worker
|
297 |
+
// superpwa_delete_sw();
|
298 |
|
299 |
// For multisites, save the de-activation status of current blog.
|
300 |
superpwa_multisite_activation_status( false );
|
322 |
* @since 1.0
|
323 |
*/
|
324 |
function superpwa_settings_link( $links ) {
|
325 |
+
|
326 |
return array_merge(
|
327 |
array(
|
328 |
'settings' => '<a href="' . admin_url( 'admin.php?page=superpwa' ) . '">' . __( 'Settings', 'super-progressive-web-apps' ) . '</a>'
|
330 |
$links
|
331 |
);
|
332 |
}
|
333 |
+
add_filter( 'plugin_action_links_' . plugin_basename( SUPERPWA_PLUGIN_FILE ), 'superpwa_settings_link' );
|
334 |
|
335 |
/**
|
336 |
* Add donate and other links to plugins list
|
348 |
|
349 |
return $links;
|
350 |
}
|
351 |
+
add_filter( 'plugin_row_meta', 'superpwa_plugin_row_meta', 10, 2 );
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Adds rewrite rules to handle request to SW javascript and Manifest json.
|
355 |
+
*
|
356 |
+
* @since 2.0
|
357 |
+
*
|
358 |
+
* @uses superpwa_get_sw_filename()
|
359 |
+
* @uses superpwa_get_manifest_filename()
|
360 |
+
*/
|
361 |
+
function superpwa_add_rewrite_rules() {
|
362 |
+
$sw_filename = superpwa_get_sw_filename();
|
363 |
+
add_rewrite_rule( "^/{$sw_filename}$",
|
364 |
+
"index.php?{$sw_filename}=1"
|
365 |
+
);
|
366 |
+
|
367 |
+
$manifest_filename = superpwa_get_manifest_filename();
|
368 |
+
add_rewrite_rule( "^/{$manifest_filename}$",
|
369 |
+
"index.php?{$manifest_filename}=1"
|
370 |
+
);
|
371 |
+
}
|
372 |
+
|
373 |
+
/**
|
374 |
+
* Generates SW and Manifest on the fly.
|
375 |
+
*
|
376 |
+
* This way no physical files have to be placed on WP root folder. Hallelujah!
|
377 |
+
*
|
378 |
+
* @since 2.0
|
379 |
+
*
|
380 |
+
* @uses superpwa_get_sw_filename()
|
381 |
+
* @uses superpwa_get_manifest_filename()
|
382 |
+
* @uses superpwa_get_manifest()
|
383 |
+
*/
|
384 |
+
function superpwa_generate_sw_and_manifest_on_fly( $query ) {
|
385 |
+
if ( ! property_exists( $query, 'query_vars' ) || ! is_array( $query->query_vars ) ) {
|
386 |
+
return;
|
387 |
+
}
|
388 |
+
$query_vars_as_string = implode( ',', $query->query_vars );
|
389 |
+
$manifest_filename = superpwa_get_manifest_filename();
|
390 |
+
$sw_filename = superpwa_get_sw_filename();
|
391 |
+
|
392 |
+
if ( strpos( $query_vars_as_string, $manifest_filename ) !== false ) {
|
393 |
+
// Generate manifest from Settings and send the response w/ header.
|
394 |
+
header( 'Content-Type: application/json' );
|
395 |
+
echo json_encode( superpwa_manifest_template() );
|
396 |
+
exit();
|
397 |
+
}
|
398 |
+
if ( strpos( $query_vars_as_string, $sw_filename ) !== false ) {
|
399 |
+
header( 'Content-type: text/javascript' );
|
400 |
+
echo superpwa_sw_template();
|
401 |
+
exit();
|
402 |
+
}
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Sets up the hooks once.
|
407 |
+
*
|
408 |
+
* Possibly put in the same order as execution for better understanding.
|
409 |
+
*
|
410 |
+
* @link https://codex.wordpress.org/Plugin_API/Action_Reference Actions run during a typical Request.
|
411 |
+
* @link https://codex.wordpress.org/Plugin_API/Action_Reference/plugins_loaded
|
412 |
+
*
|
413 |
+
* @since 2.0
|
414 |
+
*/
|
415 |
+
function superpwa_setup_hooks() {
|
416 |
+
add_action( 'init', 'superpwa_add_rewrite_rules' );
|
417 |
+
add_action( 'parse_request', 'superpwa_generate_sw_and_manifest_on_fly' );
|
418 |
+
}
|
419 |
+
|
420 |
+
add_action( 'plugins_loaded', 'superpwa_setup_hooks' );
|
admin/js/main.js
CHANGED
@@ -30,4 +30,13 @@ jQuery(document).ready(function($){
|
|
30 |
})
|
31 |
.open();
|
32 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
});
|
30 |
})
|
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 {
|
38 |
+
$('.superpwa-app-short-name').css({'color': 'inherit'});
|
39 |
+
$('#superpwa-app-short-name-limit').css({'color': 'inherit'});
|
40 |
+
}
|
41 |
+
});
|
42 |
});
|
composer.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "superpwa/super-progressive-web-apps",
|
3 |
+
"description": "Super Progressive Web Apps WordPress plugin",
|
4 |
+
"type": "wordpress-plugin",
|
5 |
+
"license": "GPL-2.0-or-later",
|
6 |
+
"authors": [
|
7 |
+
{
|
8 |
+
"name": "Arun Basil Lal",
|
9 |
+
"email": "arun@superpwa.com"
|
10 |
+
},
|
11 |
+
{
|
12 |
+
"name": "Jose Varghese",
|
13 |
+
"email": "jose@superpwa.com"
|
14 |
+
},
|
15 |
+
{
|
16 |
+
"name": "Maria Daniel Deepak",
|
17 |
+
"email": "daniel@danieldeepak.com"
|
18 |
+
}
|
19 |
+
],
|
20 |
+
"minimum-stability": "stable",
|
21 |
+
"require": {},
|
22 |
+
"require-dev": {
|
23 |
+
"squizlabs/php_codesniffer": "^3.3",
|
24 |
+
"wp-coding-standards/wpcs": "^1.2",
|
25 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0"
|
26 |
+
}
|
27 |
+
}
|
composer.lock
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_readme": [
|
3 |
+
"This file locks the dependencies of your project to a known state",
|
4 |
+
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
+
"This file is @generated automatically"
|
6 |
+
],
|
7 |
+
"content-hash": "79c1036666580515751ce8911524cb95",
|
8 |
+
"packages": [],
|
9 |
+
"packages-dev": [
|
10 |
+
{
|
11 |
+
"name": "dealerdirect/phpcodesniffer-composer-installer",
|
12 |
+
"version": "v0.5.0",
|
13 |
+
"source": {
|
14 |
+
"type": "git",
|
15 |
+
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
|
16 |
+
"reference": "e749410375ff6fb7a040a68878c656c2e610b132"
|
17 |
+
},
|
18 |
+
"dist": {
|
19 |
+
"type": "zip",
|
20 |
+
"url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132",
|
21 |
+
"reference": "e749410375ff6fb7a040a68878c656c2e610b132",
|
22 |
+
"shasum": ""
|
23 |
+
},
|
24 |
+
"require": {
|
25 |
+
"composer-plugin-api": "^1.0",
|
26 |
+
"php": "^5.3|^7",
|
27 |
+
"squizlabs/php_codesniffer": "^2|^3"
|
28 |
+
},
|
29 |
+
"require-dev": {
|
30 |
+
"composer/composer": "*",
|
31 |
+
"phpcompatibility/php-compatibility": "^9.0",
|
32 |
+
"sensiolabs/security-checker": "^4.1.0"
|
33 |
+
},
|
34 |
+
"type": "composer-plugin",
|
35 |
+
"extra": {
|
36 |
+
"class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
|
37 |
+
},
|
38 |
+
"autoload": {
|
39 |
+
"psr-4": {
|
40 |
+
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
|
41 |
+
}
|
42 |
+
},
|
43 |
+
"notification-url": "https://packagist.org/downloads/",
|
44 |
+
"license": [
|
45 |
+
"MIT"
|
46 |
+
],
|
47 |
+
"authors": [
|
48 |
+
{
|
49 |
+
"name": "Franck Nijhof",
|
50 |
+
"email": "franck.nijhof@dealerdirect.com",
|
51 |
+
"homepage": "http://www.frenck.nl",
|
52 |
+
"role": "Developer / IT Manager"
|
53 |
+
}
|
54 |
+
],
|
55 |
+
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
|
56 |
+
"homepage": "http://www.dealerdirect.com",
|
57 |
+
"keywords": [
|
58 |
+
"PHPCodeSniffer",
|
59 |
+
"PHP_CodeSniffer",
|
60 |
+
"code quality",
|
61 |
+
"codesniffer",
|
62 |
+
"composer",
|
63 |
+
"installer",
|
64 |
+
"phpcs",
|
65 |
+
"plugin",
|
66 |
+
"qa",
|
67 |
+
"quality",
|
68 |
+
"standard",
|
69 |
+
"standards",
|
70 |
+
"style guide",
|
71 |
+
"stylecheck",
|
72 |
+
"tests"
|
73 |
+
],
|
74 |
+
"time": "2018-10-26T13:21:45+00:00"
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"name": "squizlabs/php_codesniffer",
|
78 |
+
"version": "3.3.2",
|
79 |
+
"source": {
|
80 |
+
"type": "git",
|
81 |
+
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
82 |
+
"reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e"
|
83 |
+
},
|
84 |
+
"dist": {
|
85 |
+
"type": "zip",
|
86 |
+
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e",
|
87 |
+
"reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e",
|
88 |
+
"shasum": ""
|
89 |
+
},
|
90 |
+
"require": {
|
91 |
+
"ext-simplexml": "*",
|
92 |
+
"ext-tokenizer": "*",
|
93 |
+
"ext-xmlwriter": "*",
|
94 |
+
"php": ">=5.4.0"
|
95 |
+
},
|
96 |
+
"require-dev": {
|
97 |
+
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
98 |
+
},
|
99 |
+
"bin": [
|
100 |
+
"bin/phpcs",
|
101 |
+
"bin/phpcbf"
|
102 |
+
],
|
103 |
+
"type": "library",
|
104 |
+
"extra": {
|
105 |
+
"branch-alias": {
|
106 |
+
"dev-master": "3.x-dev"
|
107 |
+
}
|
108 |
+
},
|
109 |
+
"notification-url": "https://packagist.org/downloads/",
|
110 |
+
"license": [
|
111 |
+
"BSD-3-Clause"
|
112 |
+
],
|
113 |
+
"authors": [
|
114 |
+
{
|
115 |
+
"name": "Greg Sherwood",
|
116 |
+
"role": "lead"
|
117 |
+
}
|
118 |
+
],
|
119 |
+
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
120 |
+
"homepage": "http://www.squizlabs.com/php-codesniffer",
|
121 |
+
"keywords": [
|
122 |
+
"phpcs",
|
123 |
+
"standards"
|
124 |
+
],
|
125 |
+
"time": "2018-09-23T23:08:17+00:00"
|
126 |
+
},
|
127 |
+
{
|
128 |
+
"name": "wp-coding-standards/wpcs",
|
129 |
+
"version": "1.2.0",
|
130 |
+
"source": {
|
131 |
+
"type": "git",
|
132 |
+
"url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git",
|
133 |
+
"reference": "7aa217ab38156c5cb4eae0f04ae376027c407a9b"
|
134 |
+
},
|
135 |
+
"dist": {
|
136 |
+
"type": "zip",
|
137 |
+
"url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/7aa217ab38156c5cb4eae0f04ae376027c407a9b",
|
138 |
+
"reference": "7aa217ab38156c5cb4eae0f04ae376027c407a9b",
|
139 |
+
"shasum": ""
|
140 |
+
},
|
141 |
+
"require": {
|
142 |
+
"php": ">=5.3",
|
143 |
+
"squizlabs/php_codesniffer": "^2.9.0 || ^3.0.2"
|
144 |
+
},
|
145 |
+
"require-dev": {
|
146 |
+
"phpcompatibility/php-compatibility": "^9.0"
|
147 |
+
},
|
148 |
+
"suggest": {
|
149 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
|
150 |
+
},
|
151 |
+
"type": "phpcodesniffer-standard",
|
152 |
+
"notification-url": "https://packagist.org/downloads/",
|
153 |
+
"license": [
|
154 |
+
"MIT"
|
155 |
+
],
|
156 |
+
"authors": [
|
157 |
+
{
|
158 |
+
"name": "Contributors",
|
159 |
+
"homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors"
|
160 |
+
}
|
161 |
+
],
|
162 |
+
"description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
|
163 |
+
"keywords": [
|
164 |
+
"phpcs",
|
165 |
+
"standards",
|
166 |
+
"wordpress"
|
167 |
+
],
|
168 |
+
"time": "2018-11-12T10:13:12+00:00"
|
169 |
+
}
|
170 |
+
],
|
171 |
+
"aliases": [],
|
172 |
+
"minimum-stability": "stable",
|
173 |
+
"stability-flags": [],
|
174 |
+
"prefer-stable": false,
|
175 |
+
"prefer-lowest": false,
|
176 |
+
"platform": [],
|
177 |
+
"platform-dev": []
|
178 |
+
}
|
functions/common.php
CHANGED
@@ -18,41 +18,49 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
18 |
*
|
19 |
* @return (string|bool) AMP page url on success, false otherwise
|
20 |
*
|
|
|
|
|
|
|
21 |
* @since 1.2
|
22 |
* @since 1.9 Added support for tagDiv AMP
|
|
|
23 |
*/
|
24 |
function superpwa_is_amp() {
|
25 |
|
|
|
|
|
|
|
|
|
26 |
// AMP for WordPress - https://wordpress.org/plugins/amp
|
27 |
if ( is_plugin_active( 'amp/amp.php' ) ) {
|
28 |
return defined( 'AMP_QUERY_VAR' ) ? AMP_QUERY_VAR . '/' : 'amp/';
|
29 |
}
|
30 |
-
|
31 |
// AMP for WP - https://wordpress.org/plugins/accelerated-mobile-pages/
|
32 |
if ( is_plugin_active( 'accelerated-mobile-pages/accelerated-moblie-pages.php' ) ) {
|
33 |
return defined( 'AMPFORWP_AMP_QUERY_VAR' ) ? AMPFORWP_AMP_QUERY_VAR . '/' : 'amp/';
|
34 |
}
|
35 |
-
|
36 |
-
// Better AMP
|
37 |
if ( is_plugin_active( 'better-amp/better-amp.php' ) ) {
|
38 |
return 'amp/';
|
39 |
}
|
40 |
-
|
41 |
// AMP Supremacy - https://wordpress.org/plugins/amp-supremacy/
|
42 |
if ( is_plugin_active( 'amp-supremacy/amp-supremacy.php' ) ) {
|
43 |
return 'amp/';
|
44 |
}
|
45 |
-
|
46 |
// WP AMP - https://wordpress.org/plugins/wp-amp-ninja/
|
47 |
if ( is_plugin_active( 'wp-amp-ninja/wp-amp-ninja.php' ) ) {
|
48 |
return '?wpamp';
|
49 |
}
|
50 |
-
|
51 |
// tagDiv AMP - http://forum.tagdiv.com/tagdiv-amp/
|
52 |
if ( is_plugin_active( 'td-amp/td-amp.php' ) ) {
|
53 |
return defined( 'AMP_QUERY_VAR' ) ? AMP_QUERY_VAR . '/' : 'amp/';
|
54 |
}
|
55 |
-
|
56 |
return false;
|
57 |
}
|
58 |
|
@@ -75,7 +83,7 @@ function superpwa_get_start_url( $rel = false ) {
|
|
75 |
$settings = superpwa_get_settings();
|
76 |
|
77 |
// Start Page
|
78 |
-
$start_url = get_permalink( $settings['start_url'] ) ? get_permalink( $settings['start_url'] ) : get_bloginfo( '
|
79 |
|
80 |
// Force HTTPS
|
81 |
$start_url = superpwa_httpsify( $start_url );
|
18 |
*
|
19 |
* @return (string|bool) AMP page url on success, false otherwise
|
20 |
*
|
21 |
+
* @author Arun Basil Lal
|
22 |
+
* @author Maria Daniel Deepak <daniel@danieldeepak.com>
|
23 |
+
*
|
24 |
* @since 1.2
|
25 |
* @since 1.9 Added support for tagDiv AMP
|
26 |
+
* @since 2.0 require wp-admin/includes/plugin.php if is_plugin_active isn't defined
|
27 |
*/
|
28 |
function superpwa_is_amp() {
|
29 |
|
30 |
+
if ( ! function_exists( 'is_plugin_active' ) ) {
|
31 |
+
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
32 |
+
}
|
33 |
+
|
34 |
// AMP for WordPress - https://wordpress.org/plugins/amp
|
35 |
if ( is_plugin_active( 'amp/amp.php' ) ) {
|
36 |
return defined( 'AMP_QUERY_VAR' ) ? AMP_QUERY_VAR . '/' : 'amp/';
|
37 |
}
|
38 |
+
|
39 |
// AMP for WP - https://wordpress.org/plugins/accelerated-mobile-pages/
|
40 |
if ( is_plugin_active( 'accelerated-mobile-pages/accelerated-moblie-pages.php' ) ) {
|
41 |
return defined( 'AMPFORWP_AMP_QUERY_VAR' ) ? AMPFORWP_AMP_QUERY_VAR . '/' : 'amp/';
|
42 |
}
|
43 |
+
|
44 |
+
// Better AMP - https://wordpress.org/plugins/better-amp/
|
45 |
if ( is_plugin_active( 'better-amp/better-amp.php' ) ) {
|
46 |
return 'amp/';
|
47 |
}
|
48 |
+
|
49 |
// AMP Supremacy - https://wordpress.org/plugins/amp-supremacy/
|
50 |
if ( is_plugin_active( 'amp-supremacy/amp-supremacy.php' ) ) {
|
51 |
return 'amp/';
|
52 |
}
|
53 |
+
|
54 |
// WP AMP - https://wordpress.org/plugins/wp-amp-ninja/
|
55 |
if ( is_plugin_active( 'wp-amp-ninja/wp-amp-ninja.php' ) ) {
|
56 |
return '?wpamp';
|
57 |
}
|
58 |
+
|
59 |
// tagDiv AMP - http://forum.tagdiv.com/tagdiv-amp/
|
60 |
if ( is_plugin_active( 'td-amp/td-amp.php' ) ) {
|
61 |
return defined( 'AMP_QUERY_VAR' ) ? AMP_QUERY_VAR . '/' : 'amp/';
|
62 |
}
|
63 |
+
|
64 |
return false;
|
65 |
}
|
66 |
|
83 |
$settings = superpwa_get_settings();
|
84 |
|
85 |
// Start Page
|
86 |
+
$start_url = get_permalink( $settings['start_url'] ) ? get_permalink( $settings['start_url'] ) : get_bloginfo( 'url' );
|
87 |
|
88 |
// Force HTTPS
|
89 |
$start_url = superpwa_httpsify( $start_url );
|
functions/multisite.php
CHANGED
@@ -82,12 +82,14 @@ function superpwa_multisite_network_deactivator() {
|
|
82 |
|
83 |
// Switch to each blog
|
84 |
switch_to_blog( $blog_id );
|
85 |
-
|
|
|
86 |
// Delete manifest
|
87 |
-
superpwa_delete_manifest();
|
88 |
-
|
|
|
89 |
// Delete service worker
|
90 |
-
superpwa_delete_sw();
|
91 |
|
92 |
/**
|
93 |
* Delete SuperPWA version info for current blog.
|
82 |
|
83 |
// Switch to each blog
|
84 |
switch_to_blog( $blog_id );
|
85 |
+
|
86 |
+
// TODO: Commenting the following line for now. Delete it later.
|
87 |
// Delete manifest
|
88 |
+
// superpwa_delete_manifest();
|
89 |
+
|
90 |
+
// TODO: Commenting the following line for now. Delete it later.
|
91 |
// Delete service worker
|
92 |
+
// superpwa_delete_sw();
|
93 |
|
94 |
/**
|
95 |
* Delete SuperPWA version info for current blog.
|
languages/super-progressive-web-apps-fr_FR.po
CHANGED
@@ -1,480 +1,480 @@
|
|
1 |
-
# Copyright (C) 2018 Super Progressive Web Apps
|
2 |
-
# This file is distributed under the same license as the Super Progressive Web Apps package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: Super Progressive Web Apps 1.8\n"
|
6 |
-
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/super-progressive-"
|
7 |
-
"web-apps\n"
|
8 |
-
"POT-Creation-Date: 2018-06-11 15:50:32+00:00\n"
|
9 |
-
"PO-Revision-Date: 2018-06-11 21:30+0530\n"
|
10 |
-
"Last-Translator: WP Media <contact@wp-rocket.me>\n"
|
11 |
-
"Language-Team: \n"
|
12 |
-
"Language: fr_FR\n"
|
13 |
-
"MIME-Version: 1.0\n"
|
14 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
-
"Content-Transfer-Encoding: 8bit\n"
|
16 |
-
"X-Generator: Poedit 2.0.8\n"
|
17 |
-
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
18 |
-
|
19 |
-
#: 3rd-party/onesignal.php:190
|
20 |
-
msgid ""
|
21 |
-
"<strong>SuperPWA</strong> is not compatible with OneSignal on multisites "
|
22 |
-
"yet. Disable one of these plugins until the compatibility is available."
|
23 |
-
"<br>Please refer to the <a href=\"%s\" target=\"_blank\">OneSignal "
|
24 |
-
"integration documentation</a> for more info. "
|
25 |
-
msgstr ""
|
26 |
-
|
27 |
-
#: 3rd-party/onesignal.php:212
|
28 |
-
msgid ""
|
29 |
-
"<strong>Action Required to integrate SuperPWA with OneSignal:</strong><br>1. "
|
30 |
-
"Go to <a href=\"%s\" target=\"_blank\">OneSignal Configuration > Scroll down "
|
31 |
-
"to Advanced Settings →</a><br>2. Enable <strong>Use my own manifest."
|
32 |
-
"json</strong><br>3. Set <code>%s</code>as <strong>Custom manifest.json URL</"
|
33 |
-
"strong> and Save Settings.<br>Please refer the <a href=\"%s\" target=\"_blank"
|
34 |
-
"\">OneSignal integration documentation</a> for more info. "
|
35 |
-
msgstr ""
|
36 |
-
|
37 |
-
#. Plugin Name of the plugin/theme
|
38 |
-
#: addons/utm-tracking.php:35 admin/admin-ui-setup.php:28
|
39 |
-
#: admin/admin-ui-setup.php:31 admin/admin-ui-setup.php:34
|
40 |
-
msgid "Super Progressive Web Apps"
|
41 |
-
msgstr "Super Progressive Web Apps"
|
42 |
-
|
43 |
-
#: addons/utm-tracking.php:35 admin/admin-ui-render-addons.php:49
|
44 |
-
msgid "UTM Tracking"
|
45 |
-
msgstr "Suivi UTM"
|
46 |
-
|
47 |
-
#: addons/utm-tracking.php:146
|
48 |
-
msgid "Current Start URL"
|
49 |
-
msgstr "URL de départ actuelle"
|
50 |
-
|
51 |
-
#: addons/utm-tracking.php:155
|
52 |
-
msgid "Campaign Source"
|
53 |
-
msgstr "Source de Campagne"
|
54 |
-
|
55 |
-
#: addons/utm-tracking.php:164
|
56 |
-
msgid "Campaign Medium"
|
57 |
-
msgstr "Medium de la Campagne"
|
58 |
-
|
59 |
-
#: addons/utm-tracking.php:173
|
60 |
-
msgid "Campaign Name"
|
61 |
-
msgstr "Nom de la Campagne"
|
62 |
-
|
63 |
-
#: addons/utm-tracking.php:182
|
64 |
-
msgid "Campaign Term"
|
65 |
-
msgstr "Terme de la Campagne"
|
66 |
-
|
67 |
-
#: addons/utm-tracking.php:191
|
68 |
-
msgid "Campaign Content"
|
69 |
-
msgstr "Contenu de la Campagne"
|
70 |
-
|
71 |
-
#: addons/utm-tracking.php:234
|
72 |
-
msgid ""
|
73 |
-
"This add-on automatically adds UTM campaign parameters to the <code>Start "
|
74 |
-
"Page</code> URL in your <a href=\"%s\" target=\"_blank\">manifest</a>. This "
|
75 |
-
"will help you identify visitors coming specifically from your app. <a href="
|
76 |
-
"\"%s\" target=\"_blank\">Read more</a> about UTM Tracking."
|
77 |
-
msgstr ""
|
78 |
-
"Ce module ajoute automatiquement les paramètres de campagne UTM à l'URL de "
|
79 |
-
"la <code>Page de Départ</code> dans votre <a href=\"%s\" target=\"_blank"
|
80 |
-
"\">manifeste</a> . Cela vous aidera à identifier les visiteurs provenant "
|
81 |
-
"spécifiquement de votre application. <a href=\"%s\" target=\"_blank\">En "
|
82 |
-
"savoir plus</a> sur le Suivi UTM."
|
83 |
-
|
84 |
-
#: addons/utm-tracking.php:264
|
85 |
-
msgid ""
|
86 |
-
"Campaign Source is mandatory and defaults to <code>superpwa</code>. The "
|
87 |
-
"remaining fields are optional."
|
88 |
-
msgstr ""
|
89 |
-
"La source de la Campagne est obligatoire et utilise par défaut "
|
90 |
-
"<code>superpwa</code>. Les autres champs sont facultatifs."
|
91 |
-
|
92 |
-
#: addons/utm-tracking.php:362 admin/admin-ui-render-settings.php:360
|
93 |
-
msgid "Settings saved."
|
94 |
-
msgstr "Réglages enregistrés."
|
95 |
-
|
96 |
-
#: addons/utm-tracking.php:371
|
97 |
-
msgid "UTM Tracking for"
|
98 |
-
msgstr "Suivi UTM pour"
|
99 |
-
|
100 |
-
#: addons/utm-tracking.php:382 admin/admin-ui-render-settings.php:383
|
101 |
-
msgid "Save Settings"
|
102 |
-
msgstr "Sauvegarder les réglages"
|
103 |
-
|
104 |
-
#: admin/admin-ui-render-addons.php:50
|
105 |
-
msgid ""
|
106 |
-
"Track visits from your app by adding UTM tracking parameters to the Start "
|
107 |
-
"Page URL."
|
108 |
-
msgstr ""
|
109 |
-
"Suivez les visites de votre application en ajoutant les paramètres de suivi "
|
110 |
-
"UTM à l’URL de page de départ."
|
111 |
-
|
112 |
-
#: admin/admin-ui-render-addons.php:55
|
113 |
-
msgid "Customize Settings →"
|
114 |
-
msgstr "Personnaliser les paramètres de →"
|
115 |
-
|
116 |
-
#: admin/admin-ui-render-addons.php:60
|
117 |
-
msgid "Apple Touch Icons"
|
118 |
-
msgstr "Icônes Apple Touch"
|
119 |
-
|
120 |
-
#: admin/admin-ui-render-addons.php:61
|
121 |
-
msgid ""
|
122 |
-
"Set the Application Icon and Splash Screen Icon as Apple Touch Icons for "
|
123 |
-
"compatibility with iOS devices."
|
124 |
-
msgstr ""
|
125 |
-
"Définir l’icône de l’Application et l’icône de l’écran d’accueil comme les "
|
126 |
-
"icônes Apple Touch pour la compatibilité avec les appareils iOS."
|
127 |
-
|
128 |
-
#: admin/admin-ui-render-addons.php:66
|
129 |
-
msgid "More Details →"
|
130 |
-
msgstr "Plus de détails →"
|
131 |
-
|
132 |
-
#: admin/admin-ui-render-addons.php:115
|
133 |
-
msgid "<strong>Add-On activated: %s.</strong> <a href=\"%s\"%s>%s</a>"
|
134 |
-
msgstr "<strong>Module activé : %s.</strong> <a href=\"%s\" %s=\"\">%s</a>"
|
135 |
-
|
136 |
-
#: admin/admin-ui-render-addons.php:123
|
137 |
-
msgid "Add-On deactivated"
|
138 |
-
msgstr "Module désactivé"
|
139 |
-
|
140 |
-
#: admin/admin-ui-render-addons.php:135
|
141 |
-
msgid "Add-Ons for"
|
142 |
-
msgstr "Modules pour"
|
143 |
-
|
144 |
-
#: admin/admin-ui-render-addons.php:137
|
145 |
-
msgid "Add-Ons extend the functionality of SuperPWA."
|
146 |
-
msgstr "Les modules étendent les fonctionnalités de SuperPWA."
|
147 |
-
|
148 |
-
#: admin/admin-ui-render-addons.php:177 admin/admin-ui-render-addons.php:349
|
149 |
-
msgid "Deactivate"
|
150 |
-
msgstr "Désactiver"
|
151 |
-
|
152 |
-
#: admin/admin-ui-render-addons.php:182
|
153 |
-
msgid "More information about %s"
|
154 |
-
msgstr "Plus d’informations sur %s"
|
155 |
-
|
156 |
-
#: admin/admin-ui-render-addons.php:182
|
157 |
-
msgid "More Details"
|
158 |
-
msgstr "Plus de détails"
|
159 |
-
|
160 |
-
#: admin/admin-ui-render-addons.php:197
|
161 |
-
msgid ""
|
162 |
-
"<span class=\"compatibility-compatible\"><strong>Add-On active.</strong> <a "
|
163 |
-
"href=\"%s\"%s>%s</a></span>"
|
164 |
-
msgstr ""
|
165 |
-
"<span class=\"compatibility-compatible\"><strong>Le module actif.</strong> "
|
166 |
-
"<a href=\"%s\" %s=\"\">%s</a></span>"
|
167 |
-
|
168 |
-
#: admin/admin-ui-render-addons.php:200
|
169 |
-
msgid ""
|
170 |
-
"<span class=\"compatibility-compatible\"><strong>Compatible</strong> with "
|
171 |
-
"your version of SuperPWA</span>"
|
172 |
-
msgstr ""
|
173 |
-
"<span class=\"compatibility-compatible\"><strong>Compatible</strong> avec "
|
174 |
-
"votre version de SuperPWA</span>"
|
175 |
-
|
176 |
-
#: admin/admin-ui-render-addons.php:203
|
177 |
-
msgid ""
|
178 |
-
"<span class=\"compatibility-incompatible\"><strong>Please upgrade</strong> "
|
179 |
-
"to the latest version of SuperPWA</span>"
|
180 |
-
msgstr ""
|
181 |
-
"<span class=\"compatibility-incompatible\"><strong>Veuillez mettre à niveau</"
|
182 |
-
"strong> vers la dernière version de SuperPWA</span>"
|
183 |
-
|
184 |
-
#: admin/admin-ui-render-addons.php:217
|
185 |
-
msgid "SuperPWA Newsletter"
|
186 |
-
msgstr "Newsletter de SuperPWA"
|
187 |
-
|
188 |
-
#: admin/admin-ui-render-addons.php:221
|
189 |
-
msgid ""
|
190 |
-
"Learn more about Progressive Web Apps<br>and get latest updates about "
|
191 |
-
"SuperPWA"
|
192 |
-
msgstr ""
|
193 |
-
"En savoir plus sur les Progressive Web Apps<br>et recevez les dernières "
|
194 |
-
"actualités de SuperPWA"
|
195 |
-
|
196 |
-
#: admin/admin-ui-render-addons.php:229
|
197 |
-
msgid "Enter your email"
|
198 |
-
msgstr "Entrez votre email"
|
199 |
-
|
200 |
-
#: admin/admin-ui-render-addons.php:231
|
201 |
-
msgid "Subscribe"
|
202 |
-
msgstr "S'abonner"
|
203 |
-
|
204 |
-
#: admin/admin-ui-render-addons.php:233
|
205 |
-
msgid ""
|
206 |
-
"we'll share our <code>root</code> password before we share your email with "
|
207 |
-
"anyone else."
|
208 |
-
msgstr ""
|
209 |
-
"nous partagerons notre mot de passe <code>root</code> avant de partager "
|
210 |
-
"votre email avec qui que ce soit d'autre."
|
211 |
-
|
212 |
-
#: admin/admin-ui-render-addons.php:345
|
213 |
-
msgid "Activate"
|
214 |
-
msgstr "Activer"
|
215 |
-
|
216 |
-
#: admin/admin-ui-render-addons.php:354
|
217 |
-
msgid "Install"
|
218 |
-
msgstr "Installer"
|
219 |
-
|
220 |
-
#: admin/admin-ui-render-settings.php:60
|
221 |
-
msgid ""
|
222 |
-
"Used when there is insufficient space to display the full name of the "
|
223 |
-
"application. <code>12</code> characters or less."
|
224 |
-
msgstr ""
|
225 |
-
"Utilisé lorsque l'espace est insuffisant pour afficher le nom complet de "
|
226 |
-
"l'application. <code>12</code> caractères ou moins."
|
227 |
-
|
228 |
-
#: admin/admin-ui-render-settings.php:83
|
229 |
-
msgid "A brief description of what your app is about."
|
230 |
-
msgstr "Une brève description du sujet sur lequel porte votre application."
|
231 |
-
|
232 |
-
#: admin/admin-ui-render-settings.php:104
|
233 |
-
#: admin/admin-ui-render-settings.php:127
|
234 |
-
msgid "Choose Icon"
|
235 |
-
msgstr "Choisir une icône"
|
236 |
-
|
237 |
-
#: admin/admin-ui-render-settings.php:108
|
238 |
-
msgid ""
|
239 |
-
"This will be the icon of your app when installed on the phone. Must be a "
|
240 |
-
"<code>PNG</code> image exactly <code>192x192</code> in size."
|
241 |
-
msgstr ""
|
242 |
-
"Ce sera l'icône de votre application lorsqu'elle est installée sur un "
|
243 |
-
"smartphone. Elle doit être une image <code>PNG</code> d'exactement "
|
244 |
-
"<code>192x192</code> pixels."
|
245 |
-
|
246 |
-
#: admin/admin-ui-render-settings.php:131
|
247 |
-
msgid ""
|
248 |
-
"This icon will be displayed on the splash screen of your app on supported "
|
249 |
-
"devices. Must be a <code>PNG</code> image exactly <code>512x512</code> in "
|
250 |
-
"size."
|
251 |
-
msgstr ""
|
252 |
-
"Cette icône sera affichée sur l'écran de démarrage de votre application sur "
|
253 |
-
"les appareils compatibles. Ça doit être une image <code>PNG</code> "
|
254 |
-
"d'exactement <code>512x512</code> pixels."
|
255 |
-
|
256 |
-
#: admin/admin-ui-render-settings.php:151
|
257 |
-
msgid "Background color of the splash screen."
|
258 |
-
msgstr "Couleur d’arrière-plan de l’écran de démarrage."
|
259 |
-
|
260 |
-
#: admin/admin-ui-render-settings.php:171
|
261 |
-
msgid ""
|
262 |
-
"Theme color is used on supported devices to tint the UI elements of the "
|
263 |
-
"browser and app switcher. When in doubt, use the same color as "
|
264 |
-
"<code>Background Color</code>."
|
265 |
-
msgstr ""
|
266 |
-
"La couleur du thème est utilisée sur les appareils pris en charge pour "
|
267 |
-
"personnaliser la teinte des éléments d’interface utilisateur du navigateur "
|
268 |
-
"et du switcher d’app. En cas de doute, utilisez la même couleur que la "
|
269 |
-
"<code>Couleur d’arrière-plan</code>."
|
270 |
-
|
271 |
-
#: admin/admin-ui-render-settings.php:194
|
272 |
-
msgid "— Homepage —"
|
273 |
-
msgstr "— Page d’accueil —"
|
274 |
-
|
275 |
-
#: admin/admin-ui-render-settings.php:201
|
276 |
-
msgid ""
|
277 |
-
"Specify the page to load when the application is launched from a device. "
|
278 |
-
"Current start page is <code>%s</code>"
|
279 |
-
msgstr ""
|
280 |
-
"Spécifiez la page à charger lorsque l'application est lancée à partir d'un "
|
281 |
-
"appareil. La page d'accueil actuelle est <code>%s</code>"
|
282 |
-
|
283 |
-
#: admin/admin-ui-render-settings.php:209
|
284 |
-
msgid "Use AMP version of the start page."
|
285 |
-
msgstr "Utiliser la version AMP de la page de démarrage."
|
286 |
-
|
287 |
-
#: admin/admin-ui-render-settings.php:215
|
288 |
-
msgid ""
|
289 |
-
"Do not check this if your start page is the homepage, the blog index, or the "
|
290 |
-
"archives page. AMP for WordPress does not create AMP versions for these "
|
291 |
-
"pages."
|
292 |
-
msgstr ""
|
293 |
-
"Ne cochez pas cette case si votre page de départ est la page d'accueil de "
|
294 |
-
"votre site, l'index du blog ou la page d'archives. AMP pour WordPress ne "
|
295 |
-
"crée pas de versions AMP pour ces pages."
|
296 |
-
|
297 |
-
#: admin/admin-ui-render-settings.php:241
|
298 |
-
msgid "— Default —"
|
299 |
-
msgstr "— Par défaut —"
|
300 |
-
|
301 |
-
#: admin/admin-ui-render-settings.php:248
|
302 |
-
msgid ""
|
303 |
-
"Offline page is displayed when the device is offline and the requested page "
|
304 |
-
"is not already cached. Current offline page is <code>%s</code>"
|
305 |
-
msgstr ""
|
306 |
-
"La page hors connexion s’affiche lorsque l'appareil est hors connexion et "
|
307 |
-
"que la page demandée n’est pas déjà mise en cache. La page hors connexion "
|
308 |
-
"actuelle est <code>%s</code>"
|
309 |
-
|
310 |
-
#: admin/admin-ui-render-settings.php:268
|
311 |
-
msgid "Follow Device Orientation"
|
312 |
-
msgstr "Suivre l'orientation de l'appareil"
|
313 |
-
|
314 |
-
#: admin/admin-ui-render-settings.php:271
|
315 |
-
msgid "Portrait"
|
316 |
-
msgstr "Portrait"
|
317 |
-
|
318 |
-
#: admin/admin-ui-render-settings.php:274
|
319 |
-
msgid "Landscape"
|
320 |
-
msgstr "Paysage"
|
321 |
-
|
322 |
-
#: admin/admin-ui-render-settings.php:280
|
323 |
-
msgid ""
|
324 |
-
"Set the orientation of your app on devices. When set to <code>Follow Device "
|
325 |
-
"Orientation</code> your app will rotate as the device is rotated."
|
326 |
-
msgstr ""
|
327 |
-
"Définissez l'orientation de votre application sur les appareils. Lorsque "
|
328 |
-
"l'option <code>Suivre l'orientation de l'appareil</code> est définie, votre "
|
329 |
-
"application tourne en fonction de l'appareil."
|
330 |
-
|
331 |
-
#: admin/admin-ui-render-settings.php:302
|
332 |
-
msgid ""
|
333 |
-
"Manifest generated successfully. You can <a href=\"%s\" target=\"_blank"
|
334 |
-
"\">see it here →</a>"
|
335 |
-
msgstr ""
|
336 |
-
"Le manifeste a été généré avec succès. Vous pouvez <a href=\"%s\" target="
|
337 |
-
"\"_blank\">le voir ici →</a>"
|
338 |
-
|
339 |
-
#: admin/admin-ui-render-settings.php:305
|
340 |
-
msgid ""
|
341 |
-
"Manifest generation failed. Check if WordPress can write to your root folder "
|
342 |
-
"(the same folder with wp-config.php). <a href=\"%s\" target=\"_blank\">Read "
|
343 |
-
"more →</a>"
|
344 |
-
msgstr ""
|
345 |
-
"Échec de génération du manifeste. Vérifiez si WordPress peut écrire dans "
|
346 |
-
"votre dossier racine (même dossier que wp-config.php). <a href=\"%s\" target="
|
347 |
-
"\"_blank\">En savoir plux →</a>"
|
348 |
-
|
349 |
-
#: admin/admin-ui-render-settings.php:320
|
350 |
-
msgid "Service worker generated successfully."
|
351 |
-
msgstr "Service Worker généré avec succès."
|
352 |
-
|
353 |
-
#: admin/admin-ui-render-settings.php:323
|
354 |
-
msgid ""
|
355 |
-
"Service worker generation failed. Check if WordPress can write to your root "
|
356 |
-
"folder (the same folder with wp-config.php). <a href=\"%s\" target=\"_blank"
|
357 |
-
"\">Read more →</a>"
|
358 |
-
msgstr ""
|
359 |
-
"La génération de Service Worker a échouée. Vérifiez si WordPress peut écrire "
|
360 |
-
"dans votre dossier racine (même dossier que wp-config.php). <a href=\"%s\" "
|
361 |
-
"target=\"_blank\">En savoir plus →</a>"
|
362 |
-
|
363 |
-
#: admin/admin-ui-render-settings.php:336
|
364 |
-
msgid "Your website is served over HTTPS."
|
365 |
-
msgstr "Votre site Web est servi via HTTPS."
|
366 |
-
|
367 |
-
#: admin/admin-ui-render-settings.php:339
|
368 |
-
msgid ""
|
369 |
-
"Progressive Web Apps require that your website is served over HTTPS. Please "
|
370 |
-
"contact your host to add a SSL certificate to your domain."
|
371 |
-
msgstr ""
|
372 |
-
"Les applications Web progressives exigent que votre site est desservie via "
|
373 |
-
"HTTPS. Contactez votre hébergeur pour ajouter un certificat SSL à votre "
|
374 |
-
"domaine."
|
375 |
-
|
376 |
-
#. Author of the plugin/theme
|
377 |
-
#: admin/admin-ui-setup.php:28
|
378 |
-
msgid "SuperPWA"
|
379 |
-
msgstr "SuperPWA"
|
380 |
-
|
381 |
-
#: admin/admin-ui-setup.php:31 admin/basic-setup.php:278
|
382 |
-
msgid "Settings"
|
383 |
-
msgstr "Réglages"
|
384 |
-
|
385 |
-
#: admin/admin-ui-setup.php:34
|
386 |
-
msgid "Add-Ons"
|
387 |
-
msgstr "Add-ons"
|
388 |
-
|
389 |
-
#: admin/admin-ui-setup.php:63
|
390 |
-
msgid "Application Name"
|
391 |
-
msgstr "Nom de l’application"
|
392 |
-
|
393 |
-
#: admin/admin-ui-setup.php:72
|
394 |
-
msgid "Application Short Name"
|
395 |
-
msgstr "Nom court de l’application"
|
396 |
-
|
397 |
-
#: admin/admin-ui-setup.php:81
|
398 |
-
msgid "Description"
|
399 |
-
msgstr "Description"
|
400 |
-
|
401 |
-
#: admin/admin-ui-setup.php:90
|
402 |
-
msgid "Application Icon"
|
403 |
-
msgstr "Icône de l’application"
|
404 |
-
|
405 |
-
#: admin/admin-ui-setup.php:99
|
406 |
-
msgid "Splash Screen Icon"
|
407 |
-
msgstr "Icône de l’écran de démarrage"
|
408 |
-
|
409 |
-
#: admin/admin-ui-setup.php:108
|
410 |
-
msgid "Background Color"
|
411 |
-
msgstr "Couleur d'arrière plan"
|
412 |
-
|
413 |
-
#: admin/admin-ui-setup.php:117
|
414 |
-
msgid "Theme Color"
|
415 |
-
msgstr "Couleur du thème"
|
416 |
-
|
417 |
-
#: admin/admin-ui-setup.php:126
|
418 |
-
msgid "Start Page"
|
419 |
-
msgstr "Page de départ"
|
420 |
-
|
421 |
-
#: admin/admin-ui-setup.php:135
|
422 |
-
msgid "Offline Page"
|
423 |
-
msgstr "Page hors ligne"
|
424 |
-
|
425 |
-
#: admin/admin-ui-setup.php:144
|
426 |
-
msgid "Orientation"
|
427 |
-
msgstr "Orientation"
|
428 |
-
|
429 |
-
#: admin/admin-ui-setup.php:153
|
430 |
-
msgid "Status"
|
431 |
-
msgstr "Statut"
|
432 |
-
|
433 |
-
#: admin/admin-ui-setup.php:161
|
434 |
-
msgid "Manifest"
|
435 |
-
msgstr "Manifeste"
|
436 |
-
|
437 |
-
#: admin/admin-ui-setup.php:170
|
438 |
-
msgid "Service Worker"
|
439 |
-
msgstr "Service Worker"
|
440 |
-
|
441 |
-
#: admin/admin-ui-setup.php:179
|
442 |
-
msgid "HTTPS"
|
443 |
-
msgstr "HTTPS"
|
444 |
-
|
445 |
-
#: admin/admin-ui-setup.php:305
|
446 |
-
msgid ""
|
447 |
-
"If you like SuperPWA, please <a href=\"%s\" target=\"_blank\">make a "
|
448 |
-
"donation</a> or leave a <a href=\"%s\" target=\"_blank\">★★"
|
449 |
-
"★★★</a> rating to support continued development. Thanks a "
|
450 |
-
"bunch!"
|
451 |
-
msgstr ""
|
452 |
-
"Si vous aimez SuperPWA, <a href=\"%s\" target=\"_blank\">faites un don</a> "
|
453 |
-
"ou laissez une note <a href=\"%s\" target=\"_blank\">★★★"
|
454 |
-
"★★</a> pour soutenir son développement. Merci beaucoup !"
|
455 |
-
|
456 |
-
#: admin/basic-setup.php:82 admin/basic-setup.php:116
|
457 |
-
msgid ""
|
458 |
-
"<strong>SuperPWA</strong>: Successfully updated to version %s. Thank you! <a "
|
459 |
-
"href=\"%s\" target=\"_blank\">Discover new features and read the story →"
|
460 |
-
"</a>"
|
461 |
-
msgstr ""
|
462 |
-
"<strong>SuperPWA</strong>: Succès de la mise à jour vers la version %s. "
|
463 |
-
"Merci ! <a href=\"%s\" target=\"_blank\">Découvrez les nouvelles "
|
464 |
-
"fonctionnalités et lisez notre histoire →</a>"
|
465 |
-
|
466 |
-
#: admin/basic-setup.php:294
|
467 |
-
msgid "Demo"
|
468 |
-
msgstr "Démo"
|
469 |
-
|
470 |
-
#. Plugin URI of the plugin/theme
|
471 |
-
msgid "https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=plugin-uri"
|
472 |
-
msgstr "https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=plugin-uri"
|
473 |
-
|
474 |
-
#. Description of the plugin/theme
|
475 |
-
msgid "Convert your WordPress website into a Progressive Web App"
|
476 |
-
msgstr "Transformer votre site WordPress en une application Web progressive"
|
477 |
-
|
478 |
-
#. Author URI of the plugin/theme
|
479 |
-
msgid "https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=author-uri"
|
480 |
-
msgstr "https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=author-uri"
|
1 |
+
# Copyright (C) 2018 Super Progressive Web Apps
|
2 |
+
# This file is distributed under the same license as the Super Progressive Web Apps package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Super Progressive Web Apps 1.8\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/super-progressive-"
|
7 |
+
"web-apps\n"
|
8 |
+
"POT-Creation-Date: 2018-06-11 15:50:32+00:00\n"
|
9 |
+
"PO-Revision-Date: 2018-06-11 21:30+0530\n"
|
10 |
+
"Last-Translator: WP Media <contact@wp-rocket.me>\n"
|
11 |
+
"Language-Team: \n"
|
12 |
+
"Language: fr_FR\n"
|
13 |
+
"MIME-Version: 1.0\n"
|
14 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
+
"Content-Transfer-Encoding: 8bit\n"
|
16 |
+
"X-Generator: Poedit 2.0.8\n"
|
17 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
18 |
+
|
19 |
+
#: 3rd-party/onesignal.php:190
|
20 |
+
msgid ""
|
21 |
+
"<strong>SuperPWA</strong> is not compatible with OneSignal on multisites "
|
22 |
+
"yet. Disable one of these plugins until the compatibility is available."
|
23 |
+
"<br>Please refer to the <a href=\"%s\" target=\"_blank\">OneSignal "
|
24 |
+
"integration documentation</a> for more info. "
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: 3rd-party/onesignal.php:212
|
28 |
+
msgid ""
|
29 |
+
"<strong>Action Required to integrate SuperPWA with OneSignal:</strong><br>1. "
|
30 |
+
"Go to <a href=\"%s\" target=\"_blank\">OneSignal Configuration > Scroll down "
|
31 |
+
"to Advanced Settings →</a><br>2. Enable <strong>Use my own manifest."
|
32 |
+
"json</strong><br>3. Set <code>%s</code>as <strong>Custom manifest.json URL</"
|
33 |
+
"strong> and Save Settings.<br>Please refer the <a href=\"%s\" target=\"_blank"
|
34 |
+
"\">OneSignal integration documentation</a> for more info. "
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#. Plugin Name of the plugin/theme
|
38 |
+
#: addons/utm-tracking.php:35 admin/admin-ui-setup.php:28
|
39 |
+
#: admin/admin-ui-setup.php:31 admin/admin-ui-setup.php:34
|
40 |
+
msgid "Super Progressive Web Apps"
|
41 |
+
msgstr "Super Progressive Web Apps"
|
42 |
+
|
43 |
+
#: addons/utm-tracking.php:35 admin/admin-ui-render-addons.php:49
|
44 |
+
msgid "UTM Tracking"
|
45 |
+
msgstr "Suivi UTM"
|
46 |
+
|
47 |
+
#: addons/utm-tracking.php:146
|
48 |
+
msgid "Current Start URL"
|
49 |
+
msgstr "URL de départ actuelle"
|
50 |
+
|
51 |
+
#: addons/utm-tracking.php:155
|
52 |
+
msgid "Campaign Source"
|
53 |
+
msgstr "Source de Campagne"
|
54 |
+
|
55 |
+
#: addons/utm-tracking.php:164
|
56 |
+
msgid "Campaign Medium"
|
57 |
+
msgstr "Medium de la Campagne"
|
58 |
+
|
59 |
+
#: addons/utm-tracking.php:173
|
60 |
+
msgid "Campaign Name"
|
61 |
+
msgstr "Nom de la Campagne"
|
62 |
+
|
63 |
+
#: addons/utm-tracking.php:182
|
64 |
+
msgid "Campaign Term"
|
65 |
+
msgstr "Terme de la Campagne"
|
66 |
+
|
67 |
+
#: addons/utm-tracking.php:191
|
68 |
+
msgid "Campaign Content"
|
69 |
+
msgstr "Contenu de la Campagne"
|
70 |
+
|
71 |
+
#: addons/utm-tracking.php:234
|
72 |
+
msgid ""
|
73 |
+
"This add-on automatically adds UTM campaign parameters to the <code>Start "
|
74 |
+
"Page</code> URL in your <a href=\"%s\" target=\"_blank\">manifest</a>. This "
|
75 |
+
"will help you identify visitors coming specifically from your app. <a href="
|
76 |
+
"\"%s\" target=\"_blank\">Read more</a> about UTM Tracking."
|
77 |
+
msgstr ""
|
78 |
+
"Ce module ajoute automatiquement les paramètres de campagne UTM à l'URL de "
|
79 |
+
"la <code>Page de Départ</code> dans votre <a href=\"%s\" target=\"_blank"
|
80 |
+
"\">manifeste</a> . Cela vous aidera à identifier les visiteurs provenant "
|
81 |
+
"spécifiquement de votre application. <a href=\"%s\" target=\"_blank\">En "
|
82 |
+
"savoir plus</a> sur le Suivi UTM."
|
83 |
+
|
84 |
+
#: addons/utm-tracking.php:264
|
85 |
+
msgid ""
|
86 |
+
"Campaign Source is mandatory and defaults to <code>superpwa</code>. The "
|
87 |
+
"remaining fields are optional."
|
88 |
+
msgstr ""
|
89 |
+
"La source de la Campagne est obligatoire et utilise par défaut "
|
90 |
+
"<code>superpwa</code>. Les autres champs sont facultatifs."
|
91 |
+
|
92 |
+
#: addons/utm-tracking.php:362 admin/admin-ui-render-settings.php:360
|
93 |
+
msgid "Settings saved."
|
94 |
+
msgstr "Réglages enregistrés."
|
95 |
+
|
96 |
+
#: addons/utm-tracking.php:371
|
97 |
+
msgid "UTM Tracking for"
|
98 |
+
msgstr "Suivi UTM pour"
|
99 |
+
|
100 |
+
#: addons/utm-tracking.php:382 admin/admin-ui-render-settings.php:383
|
101 |
+
msgid "Save Settings"
|
102 |
+
msgstr "Sauvegarder les réglages"
|
103 |
+
|
104 |
+
#: admin/admin-ui-render-addons.php:50
|
105 |
+
msgid ""
|
106 |
+
"Track visits from your app by adding UTM tracking parameters to the Start "
|
107 |
+
"Page URL."
|
108 |
+
msgstr ""
|
109 |
+
"Suivez les visites de votre application en ajoutant les paramètres de suivi "
|
110 |
+
"UTM à l’URL de page de départ."
|
111 |
+
|
112 |
+
#: admin/admin-ui-render-addons.php:55
|
113 |
+
msgid "Customize Settings →"
|
114 |
+
msgstr "Personnaliser les paramètres de →"
|
115 |
+
|
116 |
+
#: admin/admin-ui-render-addons.php:60
|
117 |
+
msgid "Apple Touch Icons"
|
118 |
+
msgstr "Icônes Apple Touch"
|
119 |
+
|
120 |
+
#: admin/admin-ui-render-addons.php:61
|
121 |
+
msgid ""
|
122 |
+
"Set the Application Icon and Splash Screen Icon as Apple Touch Icons for "
|
123 |
+
"compatibility with iOS devices."
|
124 |
+
msgstr ""
|
125 |
+
"Définir l’icône de l’Application et l’icône de l’écran d’accueil comme les "
|
126 |
+
"icônes Apple Touch pour la compatibilité avec les appareils iOS."
|
127 |
+
|
128 |
+
#: admin/admin-ui-render-addons.php:66
|
129 |
+
msgid "More Details →"
|
130 |
+
msgstr "Plus de détails →"
|
131 |
+
|
132 |
+
#: admin/admin-ui-render-addons.php:115
|
133 |
+
msgid "<strong>Add-On activated: %s.</strong> <a href=\"%s\"%s>%s</a>"
|
134 |
+
msgstr "<strong>Module activé : %s.</strong> <a href=\"%s\" %s=\"\">%s</a>"
|
135 |
+
|
136 |
+
#: admin/admin-ui-render-addons.php:123
|
137 |
+
msgid "Add-On deactivated"
|
138 |
+
msgstr "Module désactivé"
|
139 |
+
|
140 |
+
#: admin/admin-ui-render-addons.php:135
|
141 |
+
msgid "Add-Ons for"
|
142 |
+
msgstr "Modules pour"
|
143 |
+
|
144 |
+
#: admin/admin-ui-render-addons.php:137
|
145 |
+
msgid "Add-Ons extend the functionality of SuperPWA."
|
146 |
+
msgstr "Les modules étendent les fonctionnalités de SuperPWA."
|
147 |
+
|
148 |
+
#: admin/admin-ui-render-addons.php:177 admin/admin-ui-render-addons.php:349
|
149 |
+
msgid "Deactivate"
|
150 |
+
msgstr "Désactiver"
|
151 |
+
|
152 |
+
#: admin/admin-ui-render-addons.php:182
|
153 |
+
msgid "More information about %s"
|
154 |
+
msgstr "Plus d’informations sur %s"
|
155 |
+
|
156 |
+
#: admin/admin-ui-render-addons.php:182
|
157 |
+
msgid "More Details"
|
158 |
+
msgstr "Plus de détails"
|
159 |
+
|
160 |
+
#: admin/admin-ui-render-addons.php:197
|
161 |
+
msgid ""
|
162 |
+
"<span class=\"compatibility-compatible\"><strong>Add-On active.</strong> <a "
|
163 |
+
"href=\"%s\"%s>%s</a></span>"
|
164 |
+
msgstr ""
|
165 |
+
"<span class=\"compatibility-compatible\"><strong>Le module actif.</strong> "
|
166 |
+
"<a href=\"%s\" %s=\"\">%s</a></span>"
|
167 |
+
|
168 |
+
#: admin/admin-ui-render-addons.php:200
|
169 |
+
msgid ""
|
170 |
+
"<span class=\"compatibility-compatible\"><strong>Compatible</strong> with "
|
171 |
+
"your version of SuperPWA</span>"
|
172 |
+
msgstr ""
|
173 |
+
"<span class=\"compatibility-compatible\"><strong>Compatible</strong> avec "
|
174 |
+
"votre version de SuperPWA</span>"
|
175 |
+
|
176 |
+
#: admin/admin-ui-render-addons.php:203
|
177 |
+
msgid ""
|
178 |
+
"<span class=\"compatibility-incompatible\"><strong>Please upgrade</strong> "
|
179 |
+
"to the latest version of SuperPWA</span>"
|
180 |
+
msgstr ""
|
181 |
+
"<span class=\"compatibility-incompatible\"><strong>Veuillez mettre à niveau</"
|
182 |
+
"strong> vers la dernière version de SuperPWA</span>"
|
183 |
+
|
184 |
+
#: admin/admin-ui-render-addons.php:217
|
185 |
+
msgid "SuperPWA Newsletter"
|
186 |
+
msgstr "Newsletter de SuperPWA"
|
187 |
+
|
188 |
+
#: admin/admin-ui-render-addons.php:221
|
189 |
+
msgid ""
|
190 |
+
"Learn more about Progressive Web Apps<br>and get latest updates about "
|
191 |
+
"SuperPWA"
|
192 |
+
msgstr ""
|
193 |
+
"En savoir plus sur les Progressive Web Apps<br>et recevez les dernières "
|
194 |
+
"actualités de SuperPWA"
|
195 |
+
|
196 |
+
#: admin/admin-ui-render-addons.php:229
|
197 |
+
msgid "Enter your email"
|
198 |
+
msgstr "Entrez votre email"
|
199 |
+
|
200 |
+
#: admin/admin-ui-render-addons.php:231
|
201 |
+
msgid "Subscribe"
|
202 |
+
msgstr "S'abonner"
|
203 |
+
|
204 |
+
#: admin/admin-ui-render-addons.php:233
|
205 |
+
msgid ""
|
206 |
+
"we'll share our <code>root</code> password before we share your email with "
|
207 |
+
"anyone else."
|
208 |
+
msgstr ""
|
209 |
+
"nous partagerons notre mot de passe <code>root</code> avant de partager "
|
210 |
+
"votre email avec qui que ce soit d'autre."
|
211 |
+
|
212 |
+
#: admin/admin-ui-render-addons.php:345
|
213 |
+
msgid "Activate"
|
214 |
+
msgstr "Activer"
|
215 |
+
|
216 |
+
#: admin/admin-ui-render-addons.php:354
|
217 |
+
msgid "Install"
|
218 |
+
msgstr "Installer"
|
219 |
+
|
220 |
+
#: admin/admin-ui-render-settings.php:60
|
221 |
+
msgid ""
|
222 |
+
"Used when there is insufficient space to display the full name of the "
|
223 |
+
"application. <code>12</code> characters or less."
|
224 |
+
msgstr ""
|
225 |
+
"Utilisé lorsque l'espace est insuffisant pour afficher le nom complet de "
|
226 |
+
"l'application. <code>12</code> caractères ou moins."
|
227 |
+
|
228 |
+
#: admin/admin-ui-render-settings.php:83
|
229 |
+
msgid "A brief description of what your app is about."
|
230 |
+
msgstr "Une brève description du sujet sur lequel porte votre application."
|
231 |
+
|
232 |
+
#: admin/admin-ui-render-settings.php:104
|
233 |
+
#: admin/admin-ui-render-settings.php:127
|
234 |
+
msgid "Choose Icon"
|
235 |
+
msgstr "Choisir une icône"
|
236 |
+
|
237 |
+
#: admin/admin-ui-render-settings.php:108
|
238 |
+
msgid ""
|
239 |
+
"This will be the icon of your app when installed on the phone. Must be a "
|
240 |
+
"<code>PNG</code> image exactly <code>192x192</code> in size."
|
241 |
+
msgstr ""
|
242 |
+
"Ce sera l'icône de votre application lorsqu'elle est installée sur un "
|
243 |
+
"smartphone. Elle doit être une image <code>PNG</code> d'exactement "
|
244 |
+
"<code>192x192</code> pixels."
|
245 |
+
|
246 |
+
#: admin/admin-ui-render-settings.php:131
|
247 |
+
msgid ""
|
248 |
+
"This icon will be displayed on the splash screen of your app on supported "
|
249 |
+
"devices. Must be a <code>PNG</code> image exactly <code>512x512</code> in "
|
250 |
+
"size."
|
251 |
+
msgstr ""
|
252 |
+
"Cette icône sera affichée sur l'écran de démarrage de votre application sur "
|
253 |
+
"les appareils compatibles. Ça doit être une image <code>PNG</code> "
|
254 |
+
"d'exactement <code>512x512</code> pixels."
|
255 |
+
|
256 |
+
#: admin/admin-ui-render-settings.php:151
|
257 |
+
msgid "Background color of the splash screen."
|
258 |
+
msgstr "Couleur d’arrière-plan de l’écran de démarrage."
|
259 |
+
|
260 |
+
#: admin/admin-ui-render-settings.php:171
|
261 |
+
msgid ""
|
262 |
+
"Theme color is used on supported devices to tint the UI elements of the "
|
263 |
+
"browser and app switcher. When in doubt, use the same color as "
|
264 |
+
"<code>Background Color</code>."
|
265 |
+
msgstr ""
|
266 |
+
"La couleur du thème est utilisée sur les appareils pris en charge pour "
|
267 |
+
"personnaliser la teinte des éléments d’interface utilisateur du navigateur "
|
268 |
+
"et du switcher d’app. En cas de doute, utilisez la même couleur que la "
|
269 |
+
"<code>Couleur d’arrière-plan</code>."
|
270 |
+
|
271 |
+
#: admin/admin-ui-render-settings.php:194
|
272 |
+
msgid "— Homepage —"
|
273 |
+
msgstr "— Page d’accueil —"
|
274 |
+
|
275 |
+
#: admin/admin-ui-render-settings.php:201
|
276 |
+
msgid ""
|
277 |
+
"Specify the page to load when the application is launched from a device. "
|
278 |
+
"Current start page is <code>%s</code>"
|
279 |
+
msgstr ""
|
280 |
+
"Spécifiez la page à charger lorsque l'application est lancée à partir d'un "
|
281 |
+
"appareil. La page d'accueil actuelle est <code>%s</code>"
|
282 |
+
|
283 |
+
#: admin/admin-ui-render-settings.php:209
|
284 |
+
msgid "Use AMP version of the start page."
|
285 |
+
msgstr "Utiliser la version AMP de la page de démarrage."
|
286 |
+
|
287 |
+
#: admin/admin-ui-render-settings.php:215
|
288 |
+
msgid ""
|
289 |
+
"Do not check this if your start page is the homepage, the blog index, or the "
|
290 |
+
"archives page. AMP for WordPress does not create AMP versions for these "
|
291 |
+
"pages."
|
292 |
+
msgstr ""
|
293 |
+
"Ne cochez pas cette case si votre page de départ est la page d'accueil de "
|
294 |
+
"votre site, l'index du blog ou la page d'archives. AMP pour WordPress ne "
|
295 |
+
"crée pas de versions AMP pour ces pages."
|
296 |
+
|
297 |
+
#: admin/admin-ui-render-settings.php:241
|
298 |
+
msgid "— Default —"
|
299 |
+
msgstr "— Par défaut —"
|
300 |
+
|
301 |
+
#: admin/admin-ui-render-settings.php:248
|
302 |
+
msgid ""
|
303 |
+
"Offline page is displayed when the device is offline and the requested page "
|
304 |
+
"is not already cached. Current offline page is <code>%s</code>"
|
305 |
+
msgstr ""
|
306 |
+
"La page hors connexion s’affiche lorsque l'appareil est hors connexion et "
|
307 |
+
"que la page demandée n’est pas déjà mise en cache. La page hors connexion "
|
308 |
+
"actuelle est <code>%s</code>"
|
309 |
+
|
310 |
+
#: admin/admin-ui-render-settings.php:268
|
311 |
+
msgid "Follow Device Orientation"
|
312 |
+
msgstr "Suivre l'orientation de l'appareil"
|
313 |
+
|
314 |
+
#: admin/admin-ui-render-settings.php:271
|
315 |
+
msgid "Portrait"
|
316 |
+
msgstr "Portrait"
|
317 |
+
|
318 |
+
#: admin/admin-ui-render-settings.php:274
|
319 |
+
msgid "Landscape"
|
320 |
+
msgstr "Paysage"
|
321 |
+
|
322 |
+
#: admin/admin-ui-render-settings.php:280
|
323 |
+
msgid ""
|
324 |
+
"Set the orientation of your app on devices. When set to <code>Follow Device "
|
325 |
+
"Orientation</code> your app will rotate as the device is rotated."
|
326 |
+
msgstr ""
|
327 |
+
"Définissez l'orientation de votre application sur les appareils. Lorsque "
|
328 |
+
"l'option <code>Suivre l'orientation de l'appareil</code> est définie, votre "
|
329 |
+
"application tourne en fonction de l'appareil."
|
330 |
+
|
331 |
+
#: admin/admin-ui-render-settings.php:302
|
332 |
+
msgid ""
|
333 |
+
"Manifest generated successfully. You can <a href=\"%s\" target=\"_blank"
|
334 |
+
"\">see it here →</a>"
|
335 |
+
msgstr ""
|
336 |
+
"Le manifeste a été généré avec succès. Vous pouvez <a href=\"%s\" target="
|
337 |
+
"\"_blank\">le voir ici →</a>"
|
338 |
+
|
339 |
+
#: admin/admin-ui-render-settings.php:305
|
340 |
+
msgid ""
|
341 |
+
"Manifest generation failed. Check if WordPress can write to your root folder "
|
342 |
+
"(the same folder with wp-config.php). <a href=\"%s\" target=\"_blank\">Read "
|
343 |
+
"more →</a>"
|
344 |
+
msgstr ""
|
345 |
+
"Échec de génération du manifeste. Vérifiez si WordPress peut écrire dans "
|
346 |
+
"votre dossier racine (même dossier que wp-config.php). <a href=\"%s\" target="
|
347 |
+
"\"_blank\">En savoir plux →</a>"
|
348 |
+
|
349 |
+
#: admin/admin-ui-render-settings.php:320
|
350 |
+
msgid "Service worker generated successfully."
|
351 |
+
msgstr "Service Worker généré avec succès."
|
352 |
+
|
353 |
+
#: admin/admin-ui-render-settings.php:323
|
354 |
+
msgid ""
|
355 |
+
"Service worker generation failed. Check if WordPress can write to your root "
|
356 |
+
"folder (the same folder with wp-config.php). <a href=\"%s\" target=\"_blank"
|
357 |
+
"\">Read more →</a>"
|
358 |
+
msgstr ""
|
359 |
+
"La génération de Service Worker a échouée. Vérifiez si WordPress peut écrire "
|
360 |
+
"dans votre dossier racine (même dossier que wp-config.php). <a href=\"%s\" "
|
361 |
+
"target=\"_blank\">En savoir plus →</a>"
|
362 |
+
|
363 |
+
#: admin/admin-ui-render-settings.php:336
|
364 |
+
msgid "Your website is served over HTTPS."
|
365 |
+
msgstr "Votre site Web est servi via HTTPS."
|
366 |
+
|
367 |
+
#: admin/admin-ui-render-settings.php:339
|
368 |
+
msgid ""
|
369 |
+
"Progressive Web Apps require that your website is served over HTTPS. Please "
|
370 |
+
"contact your host to add a SSL certificate to your domain."
|
371 |
+
msgstr ""
|
372 |
+
"Les applications Web progressives exigent que votre site est desservie via "
|
373 |
+
"HTTPS. Contactez votre hébergeur pour ajouter un certificat SSL à votre "
|
374 |
+
"domaine."
|
375 |
+
|
376 |
+
#. Author of the plugin/theme
|
377 |
+
#: admin/admin-ui-setup.php:28
|
378 |
+
msgid "SuperPWA"
|
379 |
+
msgstr "SuperPWA"
|
380 |
+
|
381 |
+
#: admin/admin-ui-setup.php:31 admin/basic-setup.php:278
|
382 |
+
msgid "Settings"
|
383 |
+
msgstr "Réglages"
|
384 |
+
|
385 |
+
#: admin/admin-ui-setup.php:34
|
386 |
+
msgid "Add-Ons"
|
387 |
+
msgstr "Add-ons"
|
388 |
+
|
389 |
+
#: admin/admin-ui-setup.php:63
|
390 |
+
msgid "Application Name"
|
391 |
+
msgstr "Nom de l’application"
|
392 |
+
|
393 |
+
#: admin/admin-ui-setup.php:72
|
394 |
+
msgid "Application Short Name"
|
395 |
+
msgstr "Nom court de l’application"
|
396 |
+
|
397 |
+
#: admin/admin-ui-setup.php:81
|
398 |
+
msgid "Description"
|
399 |
+
msgstr "Description"
|
400 |
+
|
401 |
+
#: admin/admin-ui-setup.php:90
|
402 |
+
msgid "Application Icon"
|
403 |
+
msgstr "Icône de l’application"
|
404 |
+
|
405 |
+
#: admin/admin-ui-setup.php:99
|
406 |
+
msgid "Splash Screen Icon"
|
407 |
+
msgstr "Icône de l’écran de démarrage"
|
408 |
+
|
409 |
+
#: admin/admin-ui-setup.php:108
|
410 |
+
msgid "Background Color"
|
411 |
+
msgstr "Couleur d'arrière plan"
|
412 |
+
|
413 |
+
#: admin/admin-ui-setup.php:117
|
414 |
+
msgid "Theme Color"
|
415 |
+
msgstr "Couleur du thème"
|
416 |
+
|
417 |
+
#: admin/admin-ui-setup.php:126
|
418 |
+
msgid "Start Page"
|
419 |
+
msgstr "Page de départ"
|
420 |
+
|
421 |
+
#: admin/admin-ui-setup.php:135
|
422 |
+
msgid "Offline Page"
|
423 |
+
msgstr "Page hors ligne"
|
424 |
+
|
425 |
+
#: admin/admin-ui-setup.php:144
|
426 |
+
msgid "Orientation"
|
427 |
+
msgstr "Orientation"
|
428 |
+
|
429 |
+
#: admin/admin-ui-setup.php:153
|
430 |
+
msgid "Status"
|
431 |
+
msgstr "Statut"
|
432 |
+
|
433 |
+
#: admin/admin-ui-setup.php:161
|
434 |
+
msgid "Manifest"
|
435 |
+
msgstr "Manifeste"
|
436 |
+
|
437 |
+
#: admin/admin-ui-setup.php:170
|
438 |
+
msgid "Service Worker"
|
439 |
+
msgstr "Service Worker"
|
440 |
+
|
441 |
+
#: admin/admin-ui-setup.php:179
|
442 |
+
msgid "HTTPS"
|
443 |
+
msgstr "HTTPS"
|
444 |
+
|
445 |
+
#: admin/admin-ui-setup.php:305
|
446 |
+
msgid ""
|
447 |
+
"If you like SuperPWA, please <a href=\"%s\" target=\"_blank\">make a "
|
448 |
+
"donation</a> or leave a <a href=\"%s\" target=\"_blank\">★★"
|
449 |
+
"★★★</a> rating to support continued development. Thanks a "
|
450 |
+
"bunch!"
|
451 |
+
msgstr ""
|
452 |
+
"Si vous aimez SuperPWA, <a href=\"%s\" target=\"_blank\">faites un don</a> "
|
453 |
+
"ou laissez une note <a href=\"%s\" target=\"_blank\">★★★"
|
454 |
+
"★★</a> pour soutenir son développement. Merci beaucoup !"
|
455 |
+
|
456 |
+
#: admin/basic-setup.php:82 admin/basic-setup.php:116
|
457 |
+
msgid ""
|
458 |
+
"<strong>SuperPWA</strong>: Successfully updated to version %s. Thank you! <a "
|
459 |
+
"href=\"%s\" target=\"_blank\">Discover new features and read the story →"
|
460 |
+
"</a>"
|
461 |
+
msgstr ""
|
462 |
+
"<strong>SuperPWA</strong>: Succès de la mise à jour vers la version %s. "
|
463 |
+
"Merci ! <a href=\"%s\" target=\"_blank\">Découvrez les nouvelles "
|
464 |
+
"fonctionnalités et lisez notre histoire →</a>"
|
465 |
+
|
466 |
+
#: admin/basic-setup.php:294
|
467 |
+
msgid "Demo"
|
468 |
+
msgstr "Démo"
|
469 |
+
|
470 |
+
#. Plugin URI of the plugin/theme
|
471 |
+
msgid "https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=plugin-uri"
|
472 |
+
msgstr "https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=plugin-uri"
|
473 |
+
|
474 |
+
#. Description of the plugin/theme
|
475 |
+
msgid "Convert your WordPress website into a Progressive Web App"
|
476 |
+
msgstr "Transformer votre site WordPress en une application Web progressive"
|
477 |
+
|
478 |
+
#. Author URI of the plugin/theme
|
479 |
+
msgid "https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=author-uri"
|
480 |
+
msgstr "https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=author-uri"
|
languages/super-progressive-web-apps.pot
CHANGED
@@ -1,44 +1,54 @@
|
|
1 |
-
# Copyright (C) 2018
|
2 |
-
# This file is distributed under the same license as the Super Progressive Web Apps
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Super Progressive Web Apps
|
6 |
-
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/super-progressive-"
|
7 |
-
"
|
8 |
-
"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"
|
13 |
-
"
|
14 |
-
"
|
|
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
"
|
22 |
msgstr ""
|
23 |
|
24 |
-
|
25 |
-
msgid ""
|
26 |
-
"<strong>Action Required to integrate SuperPWA with OneSignal:</strong><br>1. "
|
27 |
-
"Go to <a href=\"%s\" target=\"_blank\">OneSignal Configuration > Scroll down "
|
28 |
-
"to Advanced Settings →</a><br>2. Enable <strong>Use my own manifest."
|
29 |
-
"json</strong><br>3. Set <code>%s</code>as <strong>Custom manifest.json URL</"
|
30 |
-
"strong> and Save Settings.<br>Please refer the <a href=\"%s\" target=\"_blank"
|
31 |
-
"\">OneSignal integration documentation</a> for more info. "
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#. #-#-#-#-# super-progressive-web-apps.pot (Super Progressive Web Apps 1.9) #-#-#-#-#
|
35 |
-
#. Plugin Name of the plugin/theme
|
36 |
-
#: addons/utm-tracking.php:35 admin/admin-ui-setup.php:28
|
37 |
-
#: admin/admin-ui-setup.php:31 admin/admin-ui-setup.php:34
|
38 |
-
msgid "Super Progressive Web Apps"
|
39 |
msgstr ""
|
40 |
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
msgid "UTM Tracking"
|
43 |
msgstr ""
|
44 |
|
@@ -67,20 +77,15 @@ msgid "Campaign Content"
|
|
67 |
msgstr ""
|
68 |
|
69 |
#: addons/utm-tracking.php:234
|
70 |
-
msgid ""
|
71 |
-
"This add-on automatically adds UTM campaign parameters to the <code>Start "
|
72 |
-
"Page</code> URL in your <a href=\"%s\" target=\"_blank\">manifest</a>. This "
|
73 |
-
"will help you identify visitors coming specifically from your app. <a href="
|
74 |
-
"\"%s\" target=\"_blank\">Read more</a> about UTM Tracking."
|
75 |
msgstr ""
|
76 |
|
77 |
#: addons/utm-tracking.php:264
|
78 |
-
msgid ""
|
79 |
-
"Campaign Source is mandatory and defaults to <code>superpwa</code>. The "
|
80 |
-
"remaining fields are optional."
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: addons/utm-tracking.php:362
|
|
|
84 |
msgid "Settings saved."
|
85 |
msgstr ""
|
86 |
|
@@ -88,14 +93,13 @@ msgstr ""
|
|
88 |
msgid "UTM Tracking for"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: addons/utm-tracking.php:382
|
|
|
92 |
msgid "Save Settings"
|
93 |
msgstr ""
|
94 |
|
95 |
#: admin/admin-ui-render-addons.php:50
|
96 |
-
msgid ""
|
97 |
-
"Track visits from your app by adding UTM tracking parameters to the Start "
|
98 |
-
"Page URL."
|
99 |
msgstr ""
|
100 |
|
101 |
#: admin/admin-ui-render-addons.php:55
|
@@ -107,9 +111,7 @@ msgid "Apple Touch Icons"
|
|
107 |
msgstr ""
|
108 |
|
109 |
#: admin/admin-ui-render-addons.php:61
|
110 |
-
msgid ""
|
111 |
-
"Set the Application Icon and Splash Screen Icon as Apple Touch Icons for "
|
112 |
-
"compatibility with iOS devices."
|
113 |
msgstr ""
|
114 |
|
115 |
#: admin/admin-ui-render-addons.php:66
|
@@ -132,7 +134,8 @@ msgstr ""
|
|
132 |
msgid "Add-Ons extend the functionality of SuperPWA."
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: admin/admin-ui-render-addons.php:177
|
|
|
136 |
msgid "Deactivate"
|
137 |
msgstr ""
|
138 |
|
@@ -145,21 +148,15 @@ msgid "More Details"
|
|
145 |
msgstr ""
|
146 |
|
147 |
#: admin/admin-ui-render-addons.php:197
|
148 |
-
msgid ""
|
149 |
-
"<span class=\"compatibility-compatible\"><strong>Add-On active.</strong> <a "
|
150 |
-
"href=\"%s\"%s>%s</a></span>"
|
151 |
msgstr ""
|
152 |
|
153 |
#: admin/admin-ui-render-addons.php:200
|
154 |
-
msgid ""
|
155 |
-
"<span class=\"compatibility-compatible\"><strong>Compatible</strong> with "
|
156 |
-
"your version of SuperPWA</span>"
|
157 |
msgstr ""
|
158 |
|
159 |
#: admin/admin-ui-render-addons.php:203
|
160 |
-
msgid ""
|
161 |
-
"<span class=\"compatibility-incompatible\"><strong>Please upgrade</strong> "
|
162 |
-
"to the latest version of SuperPWA</span>"
|
163 |
msgstr ""
|
164 |
|
165 |
#: admin/admin-ui-render-addons.php:217
|
@@ -167,9 +164,7 @@ msgid "SuperPWA Newsletter"
|
|
167 |
msgstr ""
|
168 |
|
169 |
#: admin/admin-ui-render-addons.php:221
|
170 |
-
msgid ""
|
171 |
-
"Learn more about Progressive Web Apps<br>and get latest updates about "
|
172 |
-
"SuperPWA"
|
173 |
msgstr ""
|
174 |
|
175 |
#: admin/admin-ui-render-addons.php:229
|
@@ -181,9 +176,7 @@ msgid "Subscribe"
|
|
181 |
msgstr ""
|
182 |
|
183 |
#: admin/admin-ui-render-addons.php:233
|
184 |
-
msgid ""
|
185 |
-
"we'll share our <code>root</code> password before we share your email with "
|
186 |
-
"anyone else."
|
187 |
msgstr ""
|
188 |
|
189 |
#: admin/admin-ui-render-addons.php:345
|
@@ -194,141 +187,114 @@ msgstr ""
|
|
194 |
msgid "Install"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: admin/admin-ui-render-settings.php:
|
198 |
-
msgid ""
|
199 |
-
"Used when there is insufficient space to display the full name of the "
|
200 |
-
"application. <code>12</code> characters or less."
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: admin/admin-ui-render-settings.php:
|
204 |
msgid "A brief description of what your app is about."
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: admin/admin-ui-render-settings.php:
|
208 |
-
#: admin/admin-ui-render-settings.php:
|
209 |
msgid "Choose Icon"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: admin/admin-ui-render-settings.php:
|
213 |
-
msgid ""
|
214 |
-
"This will be the icon of your app when installed on the phone. Must be a "
|
215 |
-
"<code>PNG</code> image exactly <code>192x192</code> in size."
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: admin/admin-ui-render-settings.php:
|
219 |
-
msgid ""
|
220 |
-
"This icon will be displayed on the splash screen of your app on supported "
|
221 |
-
"devices. Must be a <code>PNG</code> image exactly <code>512x512</code> in "
|
222 |
-
"size."
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: admin/admin-ui-render-settings.php:
|
226 |
msgid "Background color of the splash screen."
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: admin/admin-ui-render-settings.php:
|
230 |
-
msgid ""
|
231 |
-
"Theme color is used on supported devices to tint the UI elements of the "
|
232 |
-
"browser and app switcher. When in doubt, use the same color as "
|
233 |
-
"<code>Background Color</code>."
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: admin/admin-ui-render-settings.php:
|
237 |
-
msgid "
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: admin/admin-ui-render-settings.php:
|
241 |
-
msgid ""
|
242 |
-
"Specify the page to load when the application is launched from a device. "
|
243 |
-
"Current start page is <code>%s</code>"
|
244 |
-
msgstr ""
|
245 |
-
|
246 |
-
#: admin/admin-ui-render-settings.php:209
|
247 |
msgid "Use AMP version of the start page."
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: admin/admin-ui-render-settings.php:
|
251 |
-
msgid ""
|
252 |
-
"Do not check this if your start page is the homepage, the blog index, or the "
|
253 |
-
"archives page. AMP for WordPress does not create AMP versions for these "
|
254 |
-
"pages."
|
255 |
-
msgstr ""
|
256 |
-
|
257 |
-
#: admin/admin-ui-render-settings.php:228
|
258 |
-
msgid ""
|
259 |
-
"Please enable AMP support for Page in <a href=\"%s\">Theme Settings > Theme "
|
260 |
-
"Panel</a> > AMP > Post Type Support."
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: admin/admin-ui-render-settings.php:
|
264 |
-
msgid "
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: admin/admin-ui-render-settings.php:
|
268 |
-
msgid ""
|
269 |
-
"Offline page is displayed when the device is offline and the requested page "
|
270 |
-
"is not already cached. Current offline page is <code>%s</code>"
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: admin/admin-ui-render-settings.php:
|
274 |
msgid "Follow Device Orientation"
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: admin/admin-ui-render-settings.php:
|
278 |
msgid "Portrait"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: admin/admin-ui-render-settings.php:
|
282 |
msgid "Landscape"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: admin/admin-ui-render-settings.php:
|
286 |
-
msgid ""
|
287 |
-
"Set the orientation of your app on devices. When set to <code>Follow Device "
|
288 |
-
"Orientation</code> your app will rotate as the device is rotated."
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: admin/admin-ui-render-settings.php:
|
292 |
-
msgid ""
|
293 |
-
"Manifest generated successfully. You can <a href=\"%s\" target=\"_blank"
|
294 |
-
"\">see it here →</a>"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: admin/admin-ui-render-settings.php:
|
298 |
-
msgid ""
|
299 |
-
"Manifest generation failed. Check if WordPress can write to your root folder "
|
300 |
-
"(the same folder with wp-config.php). <a href=\"%s\" target=\"_blank\">Read "
|
301 |
-
"more →</a>"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: admin/admin-ui-render-settings.php:
|
305 |
-
msgid "
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: admin/admin-ui-render-settings.php:
|
309 |
-
msgid ""
|
310 |
-
"Service worker generation failed. Check if WordPress can write to your root "
|
311 |
-
"folder (the same folder with wp-config.php). <a href=\"%s\" target=\"_blank"
|
312 |
-
"\">Read more →</a>"
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: admin/admin-ui-render-settings.php:
|
316 |
-
msgid "
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: admin/admin-ui-render-settings.php:
|
320 |
-
msgid ""
|
321 |
-
"Progressive Web Apps require that your website is served over HTTPS. Please "
|
322 |
-
"contact your host to add a SSL certificate to your domain."
|
323 |
msgstr ""
|
324 |
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
|
|
|
|
|
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: admin/admin-ui-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
msgid "Settings"
|
333 |
msgstr ""
|
334 |
|
@@ -377,48 +343,47 @@ msgid "Orientation"
|
|
377 |
msgstr ""
|
378 |
|
379 |
#: admin/admin-ui-setup.php:153
|
|
|
|
|
|
|
|
|
380 |
msgid "Status"
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: admin/admin-ui-setup.php:
|
384 |
msgid "Manifest"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: admin/admin-ui-setup.php:
|
388 |
msgid "Service Worker"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: admin/admin-ui-setup.php:
|
392 |
msgid "HTTPS"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: admin/admin-ui-setup.php:
|
396 |
-
msgid ""
|
397 |
-
"If you like SuperPWA, please <a href=\"%s\" target=\"_blank\">make a "
|
398 |
-
"donation</a> or leave a <a href=\"%s\" target=\"_blank\">★★"
|
399 |
-
"★★★</a> rating to support continued development. Thanks a "
|
400 |
-
"bunch!"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: admin/basic-setup.php:
|
404 |
-
msgid ""
|
405 |
-
"<strong>SuperPWA</strong>: Successfully updated to version %s. Thank you! <a "
|
406 |
-
"href=\"%s\" target=\"_blank\">Discover new features and read the story →"
|
407 |
-
"</a>"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: admin/basic-setup.php:
|
411 |
-
msgid "
|
412 |
msgstr ""
|
413 |
|
414 |
-
|
415 |
-
|
|
|
416 |
msgstr ""
|
417 |
|
418 |
-
|
419 |
-
|
|
|
420 |
msgstr ""
|
421 |
|
422 |
-
|
423 |
-
msgid "
|
424 |
msgstr ""
|
1 |
+
# Copyright (C) 2018 SuperPWA
|
2 |
+
# This file is distributed under the same license as the Super Progressive Web Apps plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Super Progressive Web Apps 2.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/super-progressive-web-apps\n"
|
7 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2018-12-27T20:31:33+00:00\n"
|
13 |
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
+
"X-Generator: WP-CLI 2.1.0\n"
|
15 |
+
"X-Domain: super-progressive-web-apps\n"
|
16 |
|
17 |
+
#. Plugin Name of the plugin
|
18 |
+
#: addons/utm-tracking.php:35
|
19 |
+
#: admin/admin-ui-setup.php:28
|
20 |
+
#: admin/admin-ui-setup.php:31
|
21 |
+
#: admin/admin-ui-setup.php:34
|
22 |
+
msgid "Super Progressive Web Apps"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#. Plugin URI of the plugin
|
26 |
+
msgid "https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=plugin-uri"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
msgstr ""
|
28 |
|
29 |
+
#. Description of the plugin
|
30 |
+
msgid "Convert your WordPress website into a Progressive Web App"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#. Author of the plugin
|
34 |
+
#: admin/admin-ui-setup.php:28
|
35 |
+
msgid "SuperPWA"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#. Author URI of the plugin
|
39 |
+
msgid "https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=author-uri"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: 3rd-party/onesignal.php:172
|
43 |
+
msgid "<strong>SuperPWA</strong> is not compatible with OneSignal on multisites yet. Disable one of these plugins until the compatibility is available.<br>Please refer to the <a href=\"%s\" target=\"_blank\">OneSignal integration documentation</a> for more info. "
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: 3rd-party/onesignal.php:194
|
47 |
+
msgid "<strong>Action Required to integrate SuperPWA with OneSignal:</strong><br>1. Go to <a href=\"%s\" target=\"_blank\">OneSignal Configuration > Scroll down to Advanced Settings →</a><br>2. Enable <strong>Use my own manifest.json</strong><br>3. Set <code>%s</code>as <strong>Custom manifest.json URL</strong> and Save Settings.<br>Please refer the <a href=\"%s\" target=\"_blank\">OneSignal integration documentation</a> for more info. "
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: addons/utm-tracking.php:35
|
51 |
+
#: admin/admin-ui-render-addons.php:49
|
52 |
msgid "UTM Tracking"
|
53 |
msgstr ""
|
54 |
|
77 |
msgstr ""
|
78 |
|
79 |
#: addons/utm-tracking.php:234
|
80 |
+
msgid "This add-on automatically adds UTM campaign parameters to the <code>Start Page</code> URL in your <a href=\"%s\" target=\"_blank\">manifest</a>. This will help you identify visitors coming specifically from your app. <a href=\"%s\" target=\"_blank\">Read more</a> about UTM Tracking."
|
|
|
|
|
|
|
|
|
81 |
msgstr ""
|
82 |
|
83 |
#: addons/utm-tracking.php:264
|
84 |
+
msgid "Campaign Source is mandatory and defaults to <code>superpwa</code>. The remaining fields are optional."
|
|
|
|
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: addons/utm-tracking.php:362
|
88 |
+
#: admin/admin-ui-render-settings.php:412
|
89 |
msgid "Settings saved."
|
90 |
msgstr ""
|
91 |
|
93 |
msgid "UTM Tracking for"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: addons/utm-tracking.php:382
|
97 |
+
#: admin/admin-ui-render-settings.php:435
|
98 |
msgid "Save Settings"
|
99 |
msgstr ""
|
100 |
|
101 |
#: admin/admin-ui-render-addons.php:50
|
102 |
+
msgid "Track visits from your app by adding UTM tracking parameters to the Start Page URL."
|
|
|
|
|
103 |
msgstr ""
|
104 |
|
105 |
#: admin/admin-ui-render-addons.php:55
|
111 |
msgstr ""
|
112 |
|
113 |
#: admin/admin-ui-render-addons.php:61
|
114 |
+
msgid "Set the Application Icon and Splash Screen Icon as Apple Touch Icons for compatibility with iOS devices."
|
|
|
|
|
115 |
msgstr ""
|
116 |
|
117 |
#: admin/admin-ui-render-addons.php:66
|
134 |
msgid "Add-Ons extend the functionality of SuperPWA."
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: admin/admin-ui-render-addons.php:177
|
138 |
+
#: admin/admin-ui-render-addons.php:349
|
139 |
msgid "Deactivate"
|
140 |
msgstr ""
|
141 |
|
148 |
msgstr ""
|
149 |
|
150 |
#: admin/admin-ui-render-addons.php:197
|
151 |
+
msgid "<span class=\"compatibility-compatible\"><strong>Add-On active.</strong> <a href=\"%s\"%s>%s</a></span>"
|
|
|
|
|
152 |
msgstr ""
|
153 |
|
154 |
#: admin/admin-ui-render-addons.php:200
|
155 |
+
msgid "<span class=\"compatibility-compatible\"><strong>Compatible</strong> with your version of SuperPWA</span>"
|
|
|
|
|
156 |
msgstr ""
|
157 |
|
158 |
#: admin/admin-ui-render-addons.php:203
|
159 |
+
msgid "<span class=\"compatibility-incompatible\"><strong>Please upgrade</strong> to the latest version of SuperPWA</span>"
|
|
|
|
|
160 |
msgstr ""
|
161 |
|
162 |
#: admin/admin-ui-render-addons.php:217
|
164 |
msgstr ""
|
165 |
|
166 |
#: admin/admin-ui-render-addons.php:221
|
167 |
+
msgid "Learn more about Progressive Web Apps<br>and get latest updates about SuperPWA"
|
|
|
|
|
168 |
msgstr ""
|
169 |
|
170 |
#: admin/admin-ui-render-addons.php:229
|
176 |
msgstr ""
|
177 |
|
178 |
#: admin/admin-ui-render-addons.php:233
|
179 |
+
msgid "we'll share our <code>root</code> password before we share your email with anyone else."
|
|
|
|
|
180 |
msgstr ""
|
181 |
|
182 |
#: admin/admin-ui-render-addons.php:345
|
187 |
msgid "Install"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: admin/admin-ui-render-settings.php:61
|
191 |
+
msgid "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>"
|
|
|
|
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: admin/admin-ui-render-settings.php:84
|
195 |
msgid "A brief description of what your app is about."
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: admin/admin-ui-render-settings.php:105
|
199 |
+
#: admin/admin-ui-render-settings.php:128
|
200 |
msgid "Choose Icon"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: admin/admin-ui-render-settings.php:109
|
204 |
+
msgid "This will be the icon of your app when installed on the phone. Must be a <code>PNG</code> image exactly <code>192x192</code> in size."
|
|
|
|
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: admin/admin-ui-render-settings.php:132
|
208 |
+
msgid "This icon will be displayed on the splash screen of your app on supported devices. Must be a <code>PNG</code> image exactly <code>512x512</code> in size."
|
|
|
|
|
|
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: admin/admin-ui-render-settings.php:152
|
212 |
msgid "Background color of the splash screen."
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: admin/admin-ui-render-settings.php:172
|
216 |
+
msgid "Theme color is used on supported devices to tint the UI elements of the browser and app switcher. When in doubt, use the same color as <code>Background Color</code>."
|
|
|
|
|
|
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: admin/admin-ui-render-settings.php:202
|
220 |
+
msgid "Specify the page to load when the application is launched from a device. Current start page is <code>%s</code>"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: admin/admin-ui-render-settings.php:210
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
msgid "Use AMP version of the start page."
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: admin/admin-ui-render-settings.php:216
|
228 |
+
msgid "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."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: admin/admin-ui-render-settings.php:229
|
232 |
+
msgid "Please enable AMP support for Page in <a href=\"%s\">Theme Settings > Theme Panel</a> > AMP > Post Type Support."
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: admin/admin-ui-render-settings.php:263
|
236 |
+
msgid "Offline page is displayed when the device is offline and the requested page is not already cached. Current offline page is <code>%s</code>"
|
|
|
|
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: admin/admin-ui-render-settings.php:283
|
240 |
msgid "Follow Device Orientation"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: admin/admin-ui-render-settings.php:286
|
244 |
msgid "Portrait"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: admin/admin-ui-render-settings.php:289
|
248 |
msgid "Landscape"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: admin/admin-ui-render-settings.php:295
|
252 |
+
msgid "Set the orientation of your app on devices. When set to <code>Follow Device Orientation</code> your app will rotate as the device is rotated."
|
|
|
|
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: admin/admin-ui-render-settings.php:317
|
256 |
+
msgid "Full Screen"
|
|
|
|
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: admin/admin-ui-render-settings.php:320
|
260 |
+
msgid "Standalone"
|
|
|
|
|
|
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: admin/admin-ui-render-settings.php:323
|
264 |
+
msgid "Minimal UI"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: admin/admin-ui-render-settings.php:326
|
268 |
+
msgid "Browser"
|
|
|
|
|
|
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: admin/admin-ui-render-settings.php:332
|
272 |
+
msgid "Display mode decides what browser UI is shown when your app is launched. <code>Standalone</code> is default. <a href=\"%s\" target=\"_blank\">What's the difference? →</a>"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: admin/admin-ui-render-settings.php:352
|
276 |
+
msgid "Manifest generated successfully. You can <a href=\"%s\" target=\"_blank\">see it here →</a>"
|
|
|
|
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: admin/admin-ui-render-settings.php:354
|
280 |
+
#: admin/admin-ui-render-settings.php:375
|
281 |
+
msgid "SuperPWA requires a custom permalink structure. Go to <a href=\"%s\" target=\"_blank\">WordPress Settings > Permalinks</a> and choose anything other than \"Plain\"."
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
+
#: admin/admin-ui-render-settings.php:373
|
285 |
+
msgid "Service worker generated successfully. <a href=\"%s\" target=\"_blank\">see it here →</a>"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: admin/admin-ui-render-settings.php:388
|
289 |
+
msgid "Your website is served over HTTPS."
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: admin/admin-ui-render-settings.php:391
|
293 |
+
msgid "Progressive Web Apps require that your website is served over HTTPS. Please contact your host to add a SSL certificate to your domain."
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: admin/admin-ui-setup.php:31
|
297 |
+
#: admin/basic-setup.php:328
|
298 |
msgid "Settings"
|
299 |
msgstr ""
|
300 |
|
343 |
msgstr ""
|
344 |
|
345 |
#: admin/admin-ui-setup.php:153
|
346 |
+
msgid "Display"
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: admin/admin-ui-setup.php:162
|
350 |
msgid "Status"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: admin/admin-ui-setup.php:170
|
354 |
msgid "Manifest"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: admin/admin-ui-setup.php:179
|
358 |
msgid "Service Worker"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: admin/admin-ui-setup.php:188
|
362 |
msgid "HTTPS"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: admin/admin-ui-setup.php:299
|
366 |
+
msgid "If you like SuperPWA, please <a href=\"%s\" target=\"_blank\">make a donation</a> or leave a <a href=\"%s\" target=\"_blank\">★★★★★</a> rating to support continued development. Thanks a bunch!"
|
|
|
|
|
|
|
|
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: admin/basic-setup.php:99
|
370 |
+
msgid "Your app is ready with the default settings. "
|
|
|
|
|
|
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: admin/basic-setup.php:103
|
374 |
+
msgid "<a href=\"%s\">Customize your app →</a>"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: admin/basic-setup.php:105
|
378 |
+
#: admin/basic-setup.php:139
|
379 |
+
msgid "Thank you for installing <strong>Super Progressive Web Apps!</strong> "
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: admin/basic-setup.php:114
|
383 |
+
#: admin/basic-setup.php:148
|
384 |
+
msgid "<strong>SuperPWA</strong>: Successfully updated to version %s. Thank you! <a href=\"%s\" target=\"_blank\">Discover new features and read the story →</a>"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: admin/basic-setup.php:344
|
388 |
+
msgid "Demo"
|
389 |
msgstr ""
|
phpcs.xml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<ruleset name="Super Progressive Web Apps">
|
3 |
+
<description>Super Progressive Web Apps coding standard</description>
|
4 |
+
|
5 |
+
<rule ref="WordPress-Extra"/>
|
6 |
+
</ruleset>
|
public/manifest.php
CHANGED
@@ -12,94 +12,134 @@
|
|
12 |
* @function superpwa_get_pwa_icons() Get PWA Icons
|
13 |
* @function superpwa_get_scope() Get navigation scope of PWA
|
14 |
* @function superpwa_get_orientation() Get orientation of PWA
|
|
|
15 |
*/
|
16 |
|
17 |
// Exit if accessed directly
|
18 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Manifest filename, absolute path and link
|
22 |
*
|
23 |
* For Multisite compatibility. Used to be constants defined in superpwa.php
|
24 |
* On a multisite, each sub-site needs a different manifest file.
|
25 |
*
|
26 |
-
* @
|
27 |
-
*
|
28 |
-
*
|
|
|
|
|
|
|
|
|
29 |
*
|
30 |
-
* @return String filename, absolute path or link to manifest.
|
31 |
-
*
|
32 |
* @since 1.6
|
|
|
33 |
*/
|
34 |
function superpwa_manifest( $arg = 'src' ) {
|
35 |
-
|
36 |
-
$manifest_filename =
|
37 |
-
|
38 |
-
switch( $arg ) {
|
39 |
-
|
40 |
// Name of Manifest file
|
41 |
-
case 'filename':
|
42 |
return $manifest_filename;
|
43 |
break;
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
case 'abs':
|
47 |
return trailingslashit( ABSPATH ) . $manifest_filename;
|
48 |
break;
|
49 |
-
|
50 |
// Link to manifest
|
51 |
case 'src':
|
52 |
default:
|
53 |
-
return
|
54 |
break;
|
55 |
}
|
56 |
}
|
57 |
|
58 |
/**
|
59 |
-
*
|
|
|
|
|
60 |
*
|
61 |
-
* @return
|
62 |
*
|
63 |
-
* @since
|
64 |
-
* @since
|
65 |
-
* @since 1.4 Added orientation and scope.
|
66 |
-
* @since 1.5 Added gcm_sender_id
|
67 |
-
* @since 1.6 Added description
|
68 |
-
* @since 1.8 Removed gcm_sender_id and introduced filter superpwa_manifest. gcm_sender_id is added in /3rd-party/onesignal.php
|
69 |
*/
|
70 |
-
function
|
71 |
|
72 |
// Get Settings
|
73 |
$settings = superpwa_get_settings();
|
74 |
-
|
75 |
-
$manifest
|
76 |
-
$manifest['name']
|
77 |
-
$manifest['short_name']
|
78 |
-
|
79 |
// Description
|
80 |
if ( isset( $settings['description'] ) && ! empty( $settings['description'] ) ) {
|
81 |
-
$manifest['description']
|
82 |
-
}
|
83 |
-
|
84 |
-
$manifest['icons'] = superpwa_get_pwa_icons();
|
85 |
-
$manifest['background_color'] = $settings['background_color'];
|
86 |
-
$manifest['theme_color'] = $settings['theme_color'];
|
87 |
-
$manifest['display'] = 'standalone';
|
88 |
-
$manifest['orientation'] = superpwa_get_orientation();
|
89 |
-
$manifest['start_url'] = superpwa_get_start_url( true );
|
90 |
-
$manifest['scope'] = superpwa_get_scope();
|
91 |
-
|
92 |
-
// Filter the manifest.
|
93 |
-
$manifest = apply_filters( 'superpwa_manifest', $manifest );
|
94 |
-
|
95 |
-
// Delete manifest if it exists.
|
96 |
-
superpwa_delete_manifest();
|
97 |
-
|
98 |
-
// Write the manfiest to disk.
|
99 |
-
if ( ! superpwa_put_contents( superpwa_manifest( 'abs' ), json_encode( $manifest ) ) ) {
|
100 |
-
return false;
|
101 |
}
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
return true;
|
104 |
}
|
105 |
|
@@ -134,9 +174,11 @@ add_action( 'wp_head', 'superpwa_add_manifest_to_wp_head', 0 );
|
|
134 |
/**
|
135 |
* Delete manifest
|
136 |
*
|
137 |
-
* @return
|
138 |
-
*
|
139 |
-
* @since
|
|
|
|
|
140 |
*/
|
141 |
function superpwa_delete_manifest() {
|
142 |
return superpwa_delete( superpwa_manifest( 'abs' ) );
|
@@ -180,7 +222,7 @@ function superpwa_get_pwa_icons() {
|
|
180 |
* @since 1.4
|
181 |
*/
|
182 |
function superpwa_get_scope() {
|
183 |
-
return parse_url( trailingslashit( get_bloginfo( '
|
184 |
}
|
185 |
|
186 |
/**
|
@@ -213,4 +255,43 @@ function superpwa_get_orientation() {
|
|
213 |
default:
|
214 |
return 'any';
|
215 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
}
|
12 |
* @function superpwa_get_pwa_icons() Get PWA Icons
|
13 |
* @function superpwa_get_scope() Get navigation scope of PWA
|
14 |
* @function superpwa_get_orientation() Get orientation of PWA
|
15 |
+
* @function superpwa_get_display() Get display of PWA
|
16 |
*/
|
17 |
|
18 |
// Exit if accessed directly
|
19 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
20 |
|
21 |
+
/**
|
22 |
+
* Returns the Manifest filename.
|
23 |
+
*
|
24 |
+
* @since 2.0
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
function superpwa_get_manifest_filename() {
|
29 |
+
return 'superpwa-manifest' . superpwa_multisite_filename_postfix() . '.json';
|
30 |
+
}
|
31 |
+
|
32 |
/**
|
33 |
* Manifest filename, absolute path and link
|
34 |
*
|
35 |
* For Multisite compatibility. Used to be constants defined in superpwa.php
|
36 |
* On a multisite, each sub-site needs a different manifest file.
|
37 |
*
|
38 |
+
* @uses superpwa_get_manifest_filename()
|
39 |
+
*
|
40 |
+
* @param $arg filename for manifest filename (replaces SUPERPWA_MANIFEST_FILENAME)
|
41 |
+
* abs for absolute path to manifest (replaces SUPERPWA_MANIFEST_ABS)
|
42 |
+
* src for link to manifest (replaces SUPERPWA_MANIFEST_SRC). Default value
|
43 |
+
*
|
44 |
+
* @return String filename, absolute path or link to manifest.
|
45 |
*
|
|
|
|
|
46 |
* @since 1.6
|
47 |
+
* @since 2.0 src uses home_url instead of network_site_url since manifest is no longer in the root folder.
|
48 |
*/
|
49 |
function superpwa_manifest( $arg = 'src' ) {
|
50 |
+
|
51 |
+
$manifest_filename = superpwa_get_manifest_filename();
|
52 |
+
|
53 |
+
switch ( $arg ) {
|
54 |
+
// TODO: Case `filename` can be deprecated in favor of @see superpwa_get_manifest_filename().
|
55 |
// Name of Manifest file
|
56 |
+
case 'filename':
|
57 |
return $manifest_filename;
|
58 |
break;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Absolute path to manifest.
|
62 |
+
*
|
63 |
+
* @since 2.0 manifest is no longer a physical file and absolute path doesn't make sense.
|
64 |
+
* Also using home_url instead of network_site_url in "src" in 2.0 changes the apparent location of the file.
|
65 |
+
* However, absolute path is preserved at the "old" location, so that phyiscal files can be deleted when upgrading from pre-2.0 versions.
|
66 |
+
*/
|
67 |
case 'abs':
|
68 |
return trailingslashit( ABSPATH ) . $manifest_filename;
|
69 |
break;
|
70 |
+
|
71 |
// Link to manifest
|
72 |
case 'src':
|
73 |
default:
|
74 |
+
return home_url( '/' ) . $manifest_filename;
|
75 |
break;
|
76 |
}
|
77 |
}
|
78 |
|
79 |
/**
|
80 |
+
* Returns the Manifest template.
|
81 |
+
*
|
82 |
+
* @author Maria Daniel Deepak <daniel@danieldeepak.com>
|
83 |
*
|
84 |
+
* @return array
|
85 |
*
|
86 |
+
* @since 2.0 Replaces superpwa_generate_manifest()
|
87 |
+
* @since 2.0 Added display
|
|
|
|
|
|
|
|
|
88 |
*/
|
89 |
+
function superpwa_manifest_template() {
|
90 |
|
91 |
// Get Settings
|
92 |
$settings = superpwa_get_settings();
|
93 |
+
|
94 |
+
$manifest = array();
|
95 |
+
$manifest['name'] = $settings['app_name'];
|
96 |
+
$manifest['short_name'] = $settings['app_short_name'];
|
97 |
+
|
98 |
// Description
|
99 |
if ( isset( $settings['description'] ) && ! empty( $settings['description'] ) ) {
|
100 |
+
$manifest['description'] = $settings['description'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
+
|
103 |
+
$manifest['icons'] = superpwa_get_pwa_icons();
|
104 |
+
$manifest['background_color'] = $settings['background_color'];
|
105 |
+
$manifest['theme_color'] = $settings['theme_color'];
|
106 |
+
$manifest['display'] = superpwa_get_display();
|
107 |
+
$manifest['orientation'] = superpwa_get_orientation();
|
108 |
+
$manifest['start_url'] = superpwa_get_start_url( true );
|
109 |
+
$manifest['scope'] = superpwa_get_scope();
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Values that go in to Manifest JSON.
|
113 |
+
*
|
114 |
+
* The Web app manifest is a simple JSON file that tells the browser about your web application.
|
115 |
+
*
|
116 |
+
* @param array $manifest
|
117 |
+
*/
|
118 |
+
return apply_filters( 'superpwa_manifest', $manifest );
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Generate and write manifest into WordPress root folder
|
123 |
+
*
|
124 |
+
* @return (boolean) true on success, false on failure.
|
125 |
+
*
|
126 |
+
* @since 1.0
|
127 |
+
* @since 1.3 Added support for 512x512 icon.
|
128 |
+
* @since 1.4 Added orientation and scope.
|
129 |
+
* @since 1.5 Added gcm_sender_id
|
130 |
+
* @since 1.6 Added description
|
131 |
+
* @since 1.8 Removed gcm_sender_id and introduced filter superpwa_manifest. gcm_sender_id is added in
|
132 |
+
* /3rd-party/onesignal.php
|
133 |
+
* @since 2.0 Deprecated since Manifest is generated on the fly
|
134 |
+
* {@see superpwa_generate_sw_and_manifest_on_fly()}.
|
135 |
+
*
|
136 |
+
* @author Arun Basil Lal
|
137 |
+
* @author Maria Daniel Deepak <daniel@danieldeepak.com>
|
138 |
+
*
|
139 |
+
* @deprecated 2.0 No longer used by internal code.
|
140 |
+
*/
|
141 |
+
function superpwa_generate_manifest() {
|
142 |
+
// Returns TRUE for backward compatibility.
|
143 |
return true;
|
144 |
}
|
145 |
|
174 |
/**
|
175 |
* Delete manifest
|
176 |
*
|
177 |
+
* @return (boolean) true on success, false on failure
|
178 |
+
*
|
179 |
+
* @since 1.0
|
180 |
+
*
|
181 |
+
* @deprecated 2.0 No longer used by internal code.
|
182 |
*/
|
183 |
function superpwa_delete_manifest() {
|
184 |
return superpwa_delete( superpwa_manifest( 'abs' ) );
|
222 |
* @since 1.4
|
223 |
*/
|
224 |
function superpwa_get_scope() {
|
225 |
+
return parse_url( trailingslashit( get_bloginfo( 'url' ) ), PHP_URL_PATH );
|
226 |
}
|
227 |
|
228 |
/**
|
255 |
default:
|
256 |
return 'any';
|
257 |
}
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Get display of PWA
|
262 |
+
*
|
263 |
+
* @return string Display of PWA as set in the plugin settings.
|
264 |
+
*
|
265 |
+
* @author Jose Varghese
|
266 |
+
*
|
267 |
+
* @since 2.0
|
268 |
+
*/
|
269 |
+
function superpwa_get_display() {
|
270 |
+
|
271 |
+
// Get Settings
|
272 |
+
$settings = superpwa_get_settings();
|
273 |
+
|
274 |
+
$display = isset( $settings['display'] ) ? $settings['display'] : 0;
|
275 |
+
|
276 |
+
switch ( $display ) {
|
277 |
+
|
278 |
+
case 0:
|
279 |
+
return 'fullscreen';
|
280 |
+
break;
|
281 |
+
|
282 |
+
case 1:
|
283 |
+
return 'standalone';
|
284 |
+
break;
|
285 |
+
|
286 |
+
case 2:
|
287 |
+
return 'minimal-ui';
|
288 |
+
break;
|
289 |
+
|
290 |
+
case 3:
|
291 |
+
return 'browser';
|
292 |
+
break;
|
293 |
+
|
294 |
+
default:
|
295 |
+
return 'standalone';
|
296 |
+
}
|
297 |
}
|
public/sw.php
CHANGED
@@ -15,6 +15,17 @@
|
|
15 |
// Exit if accessed directly
|
16 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
/**
|
19 |
* Service worker filename, absolute path and link
|
20 |
*
|
@@ -23,34 +34,42 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
23 |
*
|
24 |
* @param $arg filename for service worker filename (replaces SUPERPWA_SW_FILENAME)
|
25 |
* abs for absolute path to service worker (replaces SUPERPWA_SW_ABS)
|
26 |
-
* src for
|
27 |
*
|
28 |
* @return (string) filename, absolute path or link to manifest.
|
29 |
*
|
30 |
* @since 1.6
|
31 |
* @since 1.7 src to service worker is made relative to accomodate for domain mapped multisites.
|
32 |
* @since 1.8 Added filter superpwa_sw_filename.
|
|
|
|
|
33 |
*/
|
34 |
function superpwa_sw( $arg = 'src' ) {
|
35 |
|
36 |
-
$sw_filename =
|
37 |
|
38 |
switch( $arg ) {
|
39 |
-
|
40 |
// Name of service worker file
|
41 |
case 'filename':
|
42 |
return $sw_filename;
|
43 |
break;
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
case 'abs':
|
47 |
return trailingslashit( ABSPATH ) . $sw_filename;
|
48 |
break;
|
49 |
-
|
50 |
// Link to service worker
|
51 |
case 'src':
|
52 |
default:
|
53 |
-
return
|
54 |
break;
|
55 |
}
|
56 |
}
|
@@ -58,25 +77,16 @@ function superpwa_sw( $arg = 'src' ) {
|
|
58 |
/**
|
59 |
* Generate and write service worker into superpwa-sw.js
|
60 |
*
|
61 |
-
* @return
|
62 |
-
*
|
63 |
-
* @since
|
|
|
|
|
|
|
|
|
64 |
*/
|
65 |
function superpwa_generate_sw() {
|
66 |
-
|
67 |
-
// Get Settings
|
68 |
-
$settings = superpwa_get_settings();
|
69 |
-
|
70 |
-
// Get the service worker tempalte
|
71 |
-
$sw = superpwa_sw_template();
|
72 |
-
|
73 |
-
// Delete service worker if it exists
|
74 |
-
superpwa_delete_sw();
|
75 |
-
|
76 |
-
if ( ! superpwa_put_contents( superpwa_sw( 'abs' ), $sw ) ) {
|
77 |
-
return false;
|
78 |
-
}
|
79 |
-
|
80 |
return true;
|
81 |
}
|
82 |
|
@@ -103,9 +113,9 @@ function superpwa_sw_template() {
|
|
103 |
* To learn more and add one to your website, visit - https://superpwa.com
|
104 |
*/
|
105 |
|
106 |
-
const cacheName = '<?php echo parse_url( get_bloginfo( '
|
107 |
const startPage = '<?php echo superpwa_get_start_url(); ?>';
|
108 |
-
const offlinePage = '<?php echo get_permalink( $settings['offline_page'] ) ? superpwa_httpsify( get_permalink( $settings['offline_page'] ) ) : superpwa_httpsify( get_bloginfo( '
|
109 |
const filesToCache = [<?php echo apply_filters( 'superpwa_sw_files_to_cache', 'startPage, offlinePage' ); ?>];
|
110 |
const neverCacheUrls = [<?php echo apply_filters( 'superpwa_sw_never_cache_urls', '/\/wp-admin/,/\/wp-login/,/preview=true/' ); ?>];
|
111 |
|
@@ -215,7 +225,7 @@ function superpwa_register_sw() {
|
|
215 |
|
216 |
wp_enqueue_script( 'superpwa-register-sw', SUPERPWA_PATH_SRC . 'public/js/register-sw.js', array(), null, true );
|
217 |
wp_localize_script( 'superpwa-register-sw', 'superpwa_sw', array(
|
218 |
-
'url' => superpwa_sw( 'src' ),
|
219 |
)
|
220 |
);
|
221 |
}
|
@@ -227,6 +237,8 @@ add_action( 'wp_enqueue_scripts', 'superpwa_register_sw' );
|
|
227 |
* @return true on success, false on failure
|
228 |
*
|
229 |
* @since 1.0
|
|
|
|
|
230 |
*/
|
231 |
function superpwa_delete_sw() {
|
232 |
return superpwa_delete( superpwa_sw( 'abs' ) );
|
15 |
// Exit if accessed directly
|
16 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
17 |
|
18 |
+
/**
|
19 |
+
* Returns the Service worker's filename.
|
20 |
+
*
|
21 |
+
* @since 2.0
|
22 |
+
*
|
23 |
+
* @return string
|
24 |
+
*/
|
25 |
+
function superpwa_get_sw_filename() {
|
26 |
+
return apply_filters( 'superpwa_sw_filename', 'superpwa-sw' . superpwa_multisite_filename_postfix() . '.js' );
|
27 |
+
}
|
28 |
+
|
29 |
/**
|
30 |
* Service worker filename, absolute path and link
|
31 |
*
|
34 |
*
|
35 |
* @param $arg filename for service worker filename (replaces SUPERPWA_SW_FILENAME)
|
36 |
* abs for absolute path to service worker (replaces SUPERPWA_SW_ABS)
|
37 |
+
* src for link to service worker (replaces SUPERPWA_SW_SRC). Default value
|
38 |
*
|
39 |
* @return (string) filename, absolute path or link to manifest.
|
40 |
*
|
41 |
* @since 1.6
|
42 |
* @since 1.7 src to service worker is made relative to accomodate for domain mapped multisites.
|
43 |
* @since 1.8 Added filter superpwa_sw_filename.
|
44 |
+
* @since 2.0 src actually returns the link and the URL_PATH is extracted in superpwa_register_sw().
|
45 |
+
* @since 2.0 src uses home_url instead of network_site_url since manifest is no longer in the root folder.
|
46 |
*/
|
47 |
function superpwa_sw( $arg = 'src' ) {
|
48 |
|
49 |
+
$sw_filename = superpwa_get_sw_filename();
|
50 |
|
51 |
switch( $arg ) {
|
52 |
+
// TODO: Case `filename` can be deprecated in favor of @see superpwa_get_sw_filename().
|
53 |
// Name of service worker file
|
54 |
case 'filename':
|
55 |
return $sw_filename;
|
56 |
break;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Absolute path to service worker. SW must be in the root folder.
|
60 |
+
*
|
61 |
+
* @since 2.0 service worker is no longer a physical file and absolute path doesn't make sense.
|
62 |
+
* Also using home_url instead of network_site_url in "src" in 2.0 changes the apparent location of the file.
|
63 |
+
* However, absolute path is preserved at the "old" location, so that phyiscal files can be deleted when upgrading from pre-2.0 versions.
|
64 |
+
*/
|
65 |
case 'abs':
|
66 |
return trailingslashit( ABSPATH ) . $sw_filename;
|
67 |
break;
|
68 |
+
|
69 |
// Link to service worker
|
70 |
case 'src':
|
71 |
default:
|
72 |
+
return home_url( '/' ) . $sw_filename;
|
73 |
break;
|
74 |
}
|
75 |
}
|
77 |
/**
|
78 |
* Generate and write service worker into superpwa-sw.js
|
79 |
*
|
80 |
+
* @return (boolean) true on success, false on failure.
|
81 |
+
*
|
82 |
+
* @since 1.0
|
83 |
+
* @since 2.0 Deprecated since Service worker is generated on the fly
|
84 |
+
* {@see superpwa_generate_sw_and_manifest_on_fly()}.
|
85 |
+
*
|
86 |
+
* @deprecated 2.0 No longer used by internal code.
|
87 |
*/
|
88 |
function superpwa_generate_sw() {
|
89 |
+
// Returns TRUE for backward compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
return true;
|
91 |
}
|
92 |
|
113 |
* To learn more and add one to your website, visit - https://superpwa.com
|
114 |
*/
|
115 |
|
116 |
+
const cacheName = '<?php echo parse_url( get_bloginfo( 'url' ), PHP_URL_HOST ) . '-superpwa-' . SUPERPWA_VERSION; ?>';
|
117 |
const startPage = '<?php echo superpwa_get_start_url(); ?>';
|
118 |
+
const offlinePage = '<?php echo get_permalink( $settings['offline_page'] ) ? superpwa_httpsify( get_permalink( $settings['offline_page'] ) ) : superpwa_httpsify( get_bloginfo( 'url' ) ); ?>';
|
119 |
const filesToCache = [<?php echo apply_filters( 'superpwa_sw_files_to_cache', 'startPage, offlinePage' ); ?>];
|
120 |
const neverCacheUrls = [<?php echo apply_filters( 'superpwa_sw_never_cache_urls', '/\/wp-admin/,/\/wp-login/,/preview=true/' ); ?>];
|
121 |
|
225 |
|
226 |
wp_enqueue_script( 'superpwa-register-sw', SUPERPWA_PATH_SRC . 'public/js/register-sw.js', array(), null, true );
|
227 |
wp_localize_script( 'superpwa-register-sw', 'superpwa_sw', array(
|
228 |
+
'url' => parse_url( superpwa_sw( 'src' ), PHP_URL_PATH ),
|
229 |
)
|
230 |
);
|
231 |
}
|
237 |
* @return true on success, false on failure
|
238 |
*
|
239 |
* @since 1.0
|
240 |
+
*
|
241 |
+
* @deprecated 2.0 No longer used by internal code.
|
242 |
*/
|
243 |
function superpwa_delete_sw() {
|
244 |
return superpwa_delete( superpwa_sw( 'abs' ) );
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
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.6.0
|
6 |
-
Tested up to:
|
7 |
Requires PHP: 5.3
|
8 |
Stable tag: trunk
|
9 |
License: GPLv2 or later
|
@@ -62,6 +62,8 @@ Here are the current features of Super Progressive Web Apps:
|
|
62 |
* New in version 1.7: Add-Ons for SuperPWA is here! Ships with [UTM Tracking Add-On](https://superpwa.com/addons/utm-tracking/?utm_source=wordpress.org&utm_medium=description) to track visits coming from your PWA.
|
63 |
* New in version 1.8: Compatibility issues with OneSignal are now resolved!
|
64 |
* New in version 1.8: New Add-On: [Apple Touch Icons](https://superpwa.com/addons/apple-touch-icons/?utm_source=wordpress.org&utm_medium=description) that sets your app icons as Apple Touch Icons.
|
|
|
|
|
65 |
|
66 |
**Upcoming features:**
|
67 |
|
@@ -176,6 +178,16 @@ Feel free to get in touch if you have any questions.
|
|
176 |
|
177 |
== Changelog ==
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
= 1.9 =
|
180 |
* Date: [25.July.2018](https://superpwa.com/superpwa-1-9-chrome-mini-infobar-ready/?utm_source=wordpress.org&utm_medium=changelog)
|
181 |
* Tested with WordPress 4.9.7.
|
@@ -281,6 +293,15 @@ Feel free to get in touch if you have any questions.
|
|
281 |
|
282 |
== Upgrade Notice ==
|
283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
= 1.9 =
|
285 |
* Tested with WordPress 4.9.7.
|
286 |
* Enhancement: Added compatibility with Google Chrome 68 Mini Info-Bar.
|
1 |
=== Super Progressive Web Apps ===
|
2 |
+
Contributors: superpwa, arunbasillal, josevarghese, mariadanieldeepak
|
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.6.0
|
6 |
+
Tested up to: 5.0.2
|
7 |
Requires PHP: 5.3
|
8 |
Stable tag: trunk
|
9 |
License: GPLv2 or later
|
62 |
* New in version 1.7: Add-Ons for SuperPWA is here! Ships with [UTM Tracking Add-On](https://superpwa.com/addons/utm-tracking/?utm_source=wordpress.org&utm_medium=description) to track visits coming from your PWA.
|
63 |
* New in version 1.8: Compatibility issues with OneSignal are now resolved!
|
64 |
* New in version 1.8: New Add-On: [Apple Touch Icons](https://superpwa.com/addons/apple-touch-icons/?utm_source=wordpress.org&utm_medium=description) that sets your app icons as Apple Touch Icons.
|
65 |
+
* New in version 2.0: SuperPWA is now compatible with WordPress installed in a sub-folder.
|
66 |
+
* New in version 2.0: You can now set [display property](https://superpwa.com/doc/web-app-manifest-display-modes/?utm_source=wordpress.org&utm_medium=description) from SuperPWA settings.
|
67 |
|
68 |
**Upcoming features:**
|
69 |
|
178 |
|
179 |
== Changelog ==
|
180 |
|
181 |
+
= 2.0 =
|
182 |
+
* Date: [28.December.2018](https://superpwa.com/superpwa-2-0/)
|
183 |
+
* Tested with WordPress 5.0.2.
|
184 |
+
* Enhancement: Dynamic service worker and manifest.
|
185 |
+
* Enhancement: SuperPWA is now compatible with WordPress in a sub-folder.
|
186 |
+
* Enhancement: Added UI to set [Display property](https://superpwa.com/doc/web-app-manifest-display-modes/?utm_source=wordpress.org&utm_medium=changelog) in the web app manifest.
|
187 |
+
* Enhancement: Limit short_name to 12 characters to meet Lighthouse recommendation.
|
188 |
+
* Enhancement: Added PHP CodeSniffer to stick to "WordPress-Extra" coding standards. Thanks Daniel for the work.
|
189 |
+
* Enhancement: SuperPWA is available in 12 languages now, thanks to the awesome translators! Translators are credited in the [release note](https://superpwa.com/superpwa-2-0/).
|
190 |
+
|
191 |
= 1.9 =
|
192 |
* Date: [25.July.2018](https://superpwa.com/superpwa-1-9-chrome-mini-infobar-ready/?utm_source=wordpress.org&utm_medium=changelog)
|
193 |
* Tested with WordPress 4.9.7.
|
293 |
|
294 |
== Upgrade Notice ==
|
295 |
|
296 |
+
= 2.0 =
|
297 |
+
* Tested with WordPress 5.0.2.
|
298 |
+
* Enhancement: Dynamic service worker and manifest.
|
299 |
+
* Enhancement: SuperPWA is now compatible with WordPress in a sub-folder.
|
300 |
+
* Enhancement: Added UI to set Display property in the web app manifest.
|
301 |
+
* Enhancement: Limit short_name to 12 characters to meet Lighthouse recommendation.
|
302 |
+
* Enhancement: Added PHP CodeSniffer to stick to "WordPress-Extra" coding standards. Thanks Daniel for the work.
|
303 |
+
* Enhancement: SuperPWA is available in 12 languages now, thanks to the awesome translators! Translators are credited in the release note.
|
304 |
+
|
305 |
= 1.9 =
|
306 |
* Tested with WordPress 4.9.7.
|
307 |
* Enhancement: Added compatibility with Google Chrome 68 Mini Info-Bar.
|
superpwa.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Author: SuperPWA
|
7 |
* Author URI: https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=author-uri
|
8 |
* Contributors: Arun Basil Lal, Jose Varghese
|
9 |
-
* Version:
|
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
|
@@ -38,15 +38,43 @@
|
|
38 |
if ( ! defined('ABSPATH') ) exit;
|
39 |
|
40 |
/**
|
41 |
-
*
|
42 |
*
|
43 |
* @since 1.0
|
44 |
-
* @since 1.6 Depreciated constants for multisite compatibility: SUPERPWA_MANIFEST_FILENAME, SUPERPWA_MANIFEST_ABS, SUPERPWA_MANIFEST_SRC
|
45 |
-
* @since 1.6 Depreciated constants for multisite compatibility: SUPERPWA_SW_FILENAME, SUPERPWA_SW_ABS, SUPERPWA_SW_SRC
|
46 |
*/
|
47 |
-
if ( ! defined( 'SUPERPWA_VERSION' ) )
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
// Load everything
|
52 |
require_once( SUPERPWA_PATH_ABS . 'loader.php' );
|
6 |
* Author: SuperPWA
|
7 |
* Author URI: https://superpwa.com/?utm_source=superpwa-plugin&utm_medium=author-uri
|
8 |
* Contributors: Arun Basil Lal, Jose Varghese
|
9 |
+
* Version: 2.0
|
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
|
38 |
if ( ! defined('ABSPATH') ) exit;
|
39 |
|
40 |
/**
|
41 |
+
* SuperPWA current version
|
42 |
*
|
43 |
* @since 1.0
|
|
|
|
|
44 |
*/
|
45 |
+
if ( ! defined( 'SUPERPWA_VERSION' ) ) {
|
46 |
+
define( 'SUPERPWA_VERSION' , '2.0' );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Absolute path to the plugin directory.
|
51 |
+
* eg - /var/www/html/wp-content/plugins/super-progressive-web-apps/
|
52 |
+
*
|
53 |
+
* @since 1.0
|
54 |
+
*/
|
55 |
+
if ( ! defined( 'SUPERPWA_PATH_ABS' ) ) {
|
56 |
+
define( 'SUPERPWA_PATH_ABS' , plugin_dir_path( __FILE__ ) );
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Link to the plugin folder.
|
61 |
+
* eg - https://example.com/wp-content/plugins/super-progressive-web-apps/
|
62 |
+
*
|
63 |
+
* @since 1.0
|
64 |
+
*/
|
65 |
+
if ( ! defined( 'SUPERPWA_PATH_SRC' ) ) {
|
66 |
+
define( 'SUPERPWA_PATH_SRC' , plugin_dir_url( __FILE__ ) );
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Full path to the plugin file.
|
71 |
+
* eg - /var/www/html/wp-content/plugins/Super-Progressive-Web-Apps/superpwa.php
|
72 |
+
*
|
73 |
+
* @since 2.0
|
74 |
+
*/
|
75 |
+
if ( ! defined( 'SUPERPWA_PLUGIN_FILE' ) ) {
|
76 |
+
define( 'SUPERPWA_PLUGIN_FILE', __FILE__ );
|
77 |
+
}
|
78 |
|
79 |
// Load everything
|
80 |
require_once( SUPERPWA_PATH_ABS . 'loader.php' );
|