Created
May 19, 2017 13:42
-
-
Save screamingjungle/0f8108fab6b62288419dc5777b12921b to your computer and use it in GitHub Desktop.
Disable Wordpress Zopim/Zendesk Chat footer injection when Monitoring
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Disable zopim when monitoring | |
Plugin URI: http://riotsupport.co.uk | |
Description: Removes zopim footer from pages with '--monitoring__tool__testing--' in the URL | |
Author: Matt Harvey | |
Version: 1.0 | |
Author URI: http://riotsupport.co.uk | |
*/ | |
add_action( 'wp_footer', 'lg_disable_zopim_plugin', 1 ); | |
function lg_disable_zopim_plugin(){ | |
if(strpos($_SERVER['REQUEST_URI'], '--monitoring__tool__testing--') > 0) { | |
remove_action( 'wp_footer', array( 'Zopim_Widget', 'zopimme' )); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment