Last active
May 5, 2017 04:13
-
-
Save enqtran/0214d7b867e8e52c707d6d0f0594580f to your computer and use it in GitHub Desktop.
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
/** | |
* Hide update for user | |
*/ | |
if ( ! function_exists( 'hide_update_notice_to_all_users' ) ) { | |
function hide_update_notice_to_all_users() { | |
if (!current_user_can('update_core')) { | |
remove_action( 'admin_notices', 'update_nag', 3 ); | |
} | |
} | |
add_action( 'admin_head', 'hide_update_notice_to_all_users' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment