Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- remove_action('wp_footer', array($pwaServiceWorker, 'pwaforwp_custom_add_to_home_screen'));
- remove_action('wp_footer', 'overwrite_custom_add_to_home_screen');
- function overwrite_custom_add_to_home_screen(){
- $settings = pwaforwp_defaultSettings();
- $button_text = esc_html__( 'Add', 'pwa-for-wp' );
- $banner_title = esc_html__( 'Add', 'pwa-for-wp' ).' '.get_bloginfo().' '.esc_html__( 'to your Homescreen!', 'pwa-for-wp' );
- if(isset($settings['custom_banner_title']) && $settings['custom_banner_title'] != ''){
- $banner_title = $settings['custom_banner_title'];
- $banner_title = preg_replace('/\\\\/', '', $banner_title);
- }
- if(isset($settings['custom_banner_button_text']) && $settings['custom_banner_button_text'] !=''){
- $button_text = $settings['custom_banner_button_text'];
- }
- if ((function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint()) || function_exists( 'is_amp_endpoint' ) && is_amp_endpoint()) {
- }else{
- 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>'
- . '<h3 style="color:'.sanitize_hex_color($settings['custom_banner_title_color']).'">'. esc_html__($banner_title, 'pwa-for-wp').'</h3>'
- . '<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>'
- . '</div>';
- }
- }
Add Comment
Please, Sign In to add comment