Skip to content

Instantly share code, notes, and snippets.

@jakejackson1
Last active December 22, 2017 00:56
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jakejackson1/23dd5f3585475ce8de7c to your computer and use it in GitHub Desktop.
Save jakejackson1/23dd5f3585475ce8de7c to your computer and use it in GitHub Desktop.
Remove Support Nag W3 Total Cache
<?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') );
}
}
}
@jakejackson1
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment