Created
September 19, 2015 09:48
-
-
Save sjaved87/f4369f2608a7c4786827 to your computer and use it in GitHub Desktop.
remove notices for all users except admins
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
function hide_update_noticee_to_all_but_admin_users() | |
{ | |
if (!current_user_can('update_core')) { | |
remove_all_actions( 'admin_notices' ); | |
} | |
} | |
add_action( 'admin_head', 'hide_update_noticee_to_all_but_admin_users', 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment