Last active
October 30, 2018 15:03
-
-
Save nfsarmento/f38c18d37ea5795c6a67671879d8f60b to your computer and use it in GitHub Desktop.
Disabled admin notices wordpress
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
/** | |
* Disabled admin notices | |
* | |
* https://www.nuno-sarmento.com | |
*/ | |
add_action('admin_enqueue_scripts', 'ds_admin_theme_style'); | |
add_action('login_enqueue_scripts', 'ds_admin_theme_style'); | |
function ds_admin_theme_style() { | |
if (!current_user_can( 'manage_options' )) { | |
echo '<style>.update-nag, .updated, .error, .is-dismissible { display: none; }</style>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment