Guest User

Untitled

a guest
Aug 28th, 2020
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. remove_action('wp_footer', array($pwaServiceWorker, 'pwaforwp_custom_add_to_home_screen'));
  2. remove_action('wp_footer', 'overwrite_custom_add_to_home_screen');
  3.  
  4. function overwrite_custom_add_to_home_screen(){
  5.  
  6. $settings = pwaforwp_defaultSettings();
  7. $button_text = esc_html__( 'Add', 'pwa-for-wp' );
  8. $banner_title = esc_html__( 'Add', 'pwa-for-wp' ).' '.get_bloginfo().' '.esc_html__( 'to your Homescreen!', 'pwa-for-wp' );
  9.  
  10. if(isset($settings['custom_banner_title']) && $settings['custom_banner_title'] != ''){
  11. $banner_title = $settings['custom_banner_title'];
  12. $banner_title = preg_replace('/\\\\/', '', $banner_title);
  13. }
  14.  
  15. if(isset($settings['custom_banner_button_text']) && $settings['custom_banner_button_text'] !=''){
  16. $button_text = $settings['custom_banner_button_text'];
  17. }
  18.  
  19. if ((function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint()) || function_exists( 'is_amp_endpoint' ) && is_amp_endpoint()) {
  20. }else{
  21. echo '<div id="pwaforwp-add-to-home-click" style="background-color:'.sanitize_hex_color($settings['custom_banner_background_color']).'" class="pwaforwp-footer-prompt pwaforwp-bounceInUp pwaforwp-animated"> <span id="pwaforwp-prompt-close" class="pwaforwp-prompt-close"></span>'
  22. . '<h3 style="color:'.sanitize_hex_color($settings['custom_banner_title_color']).'">'. esc_html__($banner_title, 'pwa-for-wp').'</h3>'
  23. . '<div style="background-color:'.sanitize_hex_color($settings['custom_banner_btn_color']).'; color:'.sanitize_hex_color($settings['custom_banner_btn_text_color']).'" class="pwaforwp-btn pwaforwp-btn-add-to-home">'.esc_html__($button_text, 'pwa-for-wp').'</div>'
  24. . '</div>';
  25. }
  26.  
  27. }
Add Comment
Please, Sign In to add comment