Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate integrations #713

Merged
merged 9 commits into from
Mar 4, 2022
Prev Previous commit
Next Next commit
Add type and defer attribute
  • Loading branch information
thelovekesh committed Feb 28, 2022
commit d9d9db6dbda42c968f40c6b20729bf29b24b5664
5 changes: 3 additions & 2 deletions pwa.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function _pwa_deactivate_plugin() {
}

register_deactivation_hook( PWA_PLUGIN_FILE, '_pwa_deactivate_plugin' );

add_theme_support( 'service_worker', true );
/**
* Load service worker integrations.
*
Expand Down Expand Up @@ -310,6 +310,7 @@ function pwa_deprecate_service_worker_integrations() {
'wp-scripts' => 'WP_Service_Worker_Scripts_Integration',
'wp-styles' => 'WP_Service_Worker_Styles_Integration',
'wp-fonts' => 'WP_Service_Worker_Fonts_Integration',
'wp-admin-assets' => 'WP_Service_Worker_Admin_Assets_Integration',
);

// Filter active integrations if granular theme support array is provided.
Expand All @@ -330,7 +331,7 @@ function pwa_deprecate_service_worker_integrations() {
}

?>
<script>
<script type="text/javascript" defer>
<?php
foreach ( $message as $message ) {
printf(
Expand Down