Created
July 30, 2015 14:57
-
-
Save jesseeproductions/475718b9155644e6070e to your computer and use it in GitHub Desktop.
The Events Calendar - Remove Events from Admin Bar for all roles, but the admin
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
<?php | |
/* | |
* The Events Calendar - Remove Events from Admin Bar for all roles, but the admin | |
* @3.11 | |
* | |
*/ | |
add_action( 'wp_before_admin_bar_render', 'removeToolbarItems' , 10 ); | |
function removeToolbarItems(){ | |
global $wp_admin_bar; | |
if(!current_user_can('manage_options')){ | |
$wp_admin_bar->remove_menu( 'tribe-events' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment