The latest PWA plugin 0.6.0 now has offline caching for theme assets, uploaded images, navigations and manifest for app icon as well, so this extension is no longer needed.
An extension to PWA to enable/activate add to homescreen
and offline reading
features of PWA.
Author: rtCamp
Tags: pwa Requires at least: 4.9 Tested up to: 5.7.1 License: GPLv2 or later Requires PHP: 5.4+
- The Official PWA Plugin.
- Generate the PWA Icons and put the icons in theme's
/assets/img/
directory. You can use this site to generate icons. (Example path for 512x512 size will be /assets/img/icon-512x512.png)
Add to Home Screen
popup for mobiles with custom icon setup in WP theme(your-theme/assets/img/icon-{width}x{height}.png)
.- Offline reading by caching assets and pages.
- Submit gravity form even if you are offline. The plugin will send form response once you get back online.
- The offline form submission will only work for the routes added to the plugin settings page.
- If no routes are set the offline form submission script will not be enqueued.
e.g Enable offline form submission with following settings for the forms available on routes
example.com/contact
andexample.com/feedback
/contact
/feedback
- Add app icon images of all sizes in your WordPress theme assets folder with
/assets/img/icon-{width}x{height}.png
path - The valid size of the images can be 72x72, 96x96, 128x128, 144x144, 152x152, 192x192, 384x384, 512x512.
- Example image file name
icon-192x192.png
. - The path of the icons can be changed with
rt_pwa_extensions_app_icon_{height}_{width}
filter - Example snippet to change icon src.
add_filter( 'rt_pwa_extensions_app_icon_72_72', 'update_icon_src' );
/**
* Updates icon src.
*
* @return string
*/
function update_icon_src() {
return 'www.example.com/new-image.png';
}
- The iZooto plugin must be installed and activated to use the izooto notification services.
- Registers izooto service worker using
wp_front_service_worker
hook to main service worker file - Removes Service worker code of izooto from
?izooto=sw
to prevent conflicting it with main service worker.
Before creating a new issue, do browse through the existing issues for resolution or upcoming fixes.
If you still need to log an issue, making sure to include as much detail as you can, including clear steps to reproduce your issue if possible.
Want to contribute a new feature? Start a conversation by logging an issue.
Once you're ready to send a pull request, please run through the following checklist:
-
Browse through the existing issues for anything related to what you want to work on. If you don't find any related issues, open a new one.
-
Fork this repository.
-
Create a branch from
develop
for each issue you'd like to address and commit your changes. -
Push the code changes from your local clone to your fork.
-
Open a pull request and that's it! We'll with feedback as soon as possible (Isn't collaboration a great thing? 😌)
-
Once your pull request has passed final code review and tests, it will be merged into
develop
and be in the pipeline for the next release. Props to you! 🎉
- Add support for gravity form offline submission.
- Add
rt_pwa_extensions_app_icon_{height}_{width}
filter to change app icon path.
- Restructure plugin.
- izooto push notifications plugin integration.
Add to Home Screen
popup for mobiles with custom icon setup in WP theme(<your-theme>/assets/img/icon-{width}x{height}.png'
.- Offline reading by caching assets and pages.
- Setup local unit test environment by running script from terminal
./bin/install-wp-tests.sh <db-name> <db-user> <db-pass> [db-host] [wp-version] [skip-database-creation]
-
Execute
phpunit
in terminal from repository to run all test cases. -
Execute
phpunit ./tests/inc/test-class.php
in terminal with file path to run specific tests.