Skip to content

Commit

Permalink
#1404 Rewrite rule added to make service worker workable from our plu…
Browse files Browse the repository at this point in the history
…gins directory
  • Loading branch information
MARQAS committed Nov 16, 2017
1 parent 761959b commit d357771
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions templates/features.php
Expand Up @@ -4914,6 +4914,13 @@ function ampforwp_onesignal_notifications_styling(){
<?php }
}
}
// Rewrite Rule for Onesignal Service worker to make it work properly
add_action( 'init', 'ampforwp_custom_rewrite_rule_onesignal' );
if( ! function_exists('ampforwp_custom_rewrite_rule_onesignal')){
function ampforwp_custom_rewrite_rule_onesignal(){
add_rewrite_rule('OneSignalSDKWorker.js','wp-content/plugins/accelerated-mobile-pages/includes/onesignal-integration/OneSignalSDKWorker.js','top');
}
}
// 95. Modify menu link attributes for SiteNavigationElement Schema Markup #1229 #1345
add_filter( 'nav_menu_link_attributes', 'ampforwp_nav_menu_link_attributes', 10, 3 );
if( ! function_exists( 'ampforwp_nav_menu_link_attributes' ) ) {
Expand Down

0 comments on commit d357771

Please sign in to comment.