/** * Hide WordPress update nag to all but admins */ function hide_update_notice_to_all_but_admin() { if ( !current_user_can( 'update_core' ) ) { remove_action( 'admin_notices', 'update_nag', 3 ); } } add_action( 'admin_head', 'hide_update_notice_to_all_but_admin', 1 );
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter