Skip to content

Instantly share code, notes, and snippets.

@enqtran
Last active May 5, 2017 04:13
Show Gist options
  • Save enqtran/0214d7b867e8e52c707d6d0f0594580f to your computer and use it in GitHub Desktop.
Save enqtran/0214d7b867e8e52c707d6d0f0594580f to your computer and use it in GitHub Desktop.
/**
* 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