Last active
December 22, 2017 00:56
-
-
Save jakejackson1/23dd5f3585475ce8de7c to your computer and use it in GitHub Desktop.
Remove Support Nag W3 Total Cache
This file contains hidden or 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 W3 Total Cache Nags | |
Version: 1.0 | |
Author: Blue Liquid Designs | |
*/ | |
add_action( 'wp_loaded', 'bld_disable_w3_total_cache_nags' ); | |
function bld_disable_w3_total_cache_nags() | |
{ | |
if(function_exists('is_w3tc_admin_page')) | |
{ | |
if (is_w3tc_admin_page()) { | |
$notifications = w3_instance('W3_Plugin_NotificationsAdmin'); | |
remove_action('w3tc-dashboard-head', array($notifications, 'support_us_nag') ); | |
remove_action('w3tc-dashboard-head', array($notifications, 'edge_nag') ); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I quite enjoy all the options WordPress plugin W3 Total Cache give you, but I was sick of the support nag loading on every admin page (it was unbearable).
This little code snippet will disable that functionality without modifying the core plugin. Either install it as a plugin or drop it in your theme's functions.php file.