Last active
February 24, 2019 00:42
-
-
Save uxjw/ca45dbd9b311baa009e78270cc41bbff to your computer and use it in GitHub Desktop.
When regularly checking and updating plugins, we don't need persistent update nags bugging clients. Just drop this file in /wp-content/mu-plugins/
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 | |
/* | |
* Hide Wordpress, Plugin, & Theme Update Notifications | |
* | |
* When regularly checking for and applying updates, we don't | |
* need persistent update nags bugging clients. | |
* | |
* This plugin hides the update nags with CSS, but you can still access | |
* the updates page list under Dashboard. | |
*/ | |
function admin_update_nag_css() | |
{ | |
?> | |
<style> | |
/* Hide update arrows in admin bar */ | |
#wp-admin-bar-updates { display: none !important; } | |
/* Hide update notification nags at the top of all admin screens */ | |
#wpbody .notifications .update, #wpbody .update-nag { display: none !important; } | |
</style> | |
<?php | |
} | |
add_action('admin_head', 'admin_update_nag_css'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment