Skip to content

Instantly share code, notes, and snippets.

@uxjw
Last active February 24, 2019 00:42
Show Gist options
  • Save uxjw/ca45dbd9b311baa009e78270cc41bbff to your computer and use it in GitHub Desktop.
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/
<?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