Last active
August 29, 2015 13:55
-
-
Save DavidWells/8789882 to your computer and use it in GitHub Desktop.
Remove inbound now marketing admin bar for all but admin users. Add this snipper to your functions.php file
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
<?php | |
function remove_inbound_admin_bar() { | |
global $wp_admin_bar; | |
if ( is_user_logged_in() && !current_user_can( 'manage_options' )) { | |
$wp_admin_bar->remove_menu('inbound-admin-bar'); | |
} | |
} | |
add_action( 'wp_before_admin_bar_render', 'remove_inbound_admin_bar' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment