Created
February 19, 2018 04:02
-
-
Save luizbills/9fd064c46ebcd7583b1639fcbabef549 to your computer and use it in GitHub Desktop.
Remover admin bar para todos exceto os administradores
This file contains hidden or 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
| add_action( 'after_setup_theme', 'lpb_remove_admin_bar' ); | |
| function lpb_remove_admin_bar () { | |
| if ( !current_user_can( 'administrator' ) && ! is_admin () ) { | |
| show_admin_bar(false); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment