Created
September 30, 2019 21:36
-
-
Save CarlosLongarela/14778869ebd07bf1a7ef71d31eaebcee to your computer and use it in GitHub Desktop.
Hide Pods Admin Menu if logged user is different that "username"
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 Pods Admin Menu if logged user is different that "username". | |
*/ | |
function css_hide_pods_noncl() { | |
global $current_user; | |
if ( 'username' !== $current_user->user_login ) { | |
echo '<style type="text/css">#toplevel_page_pods{display:none!important;}</style>'; | |
} | |
} | |
add_action( 'admin_enqueue_scripts', 'css_hide_pods_noncl' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment