if ( !is_super_admin() ) {
add_action('admin_head', 'hideElement');
function hideElement() {
echo '<style>
#menu-media{
display:none !important;
}
</style>';
}
}
note that this method is not the best way to hide the tabs in our wordpress backend. It is not bulletproof and secure.
Labels
- bootstrap (1)
- css (4)
- jquery (16)
- Live Demo (14)
- Others (2)
- PHP (4)
- prestashop 1.6 (7)
- Topic - Advance (7)
- Topic - basic (27)
- Topic - Semi Advance (16)
- wordpress (6)
- wordpress plugins (1)
- YII (14)
Tuesday, December 16, 2014
Hide tabs in wordpress backend if user is not admin
This simple and easy script will hide the media tab in the backend of wordpress if the current user that is logged-in is not admin.
we use css to hide the tabs.
Labels:
Topic - basic,
wordpress
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment