hm-core.functions.php
/**
 * Disable the admin bar by role.
 *
 * add them support for hm_disable_admin_bar passing an array of roles as the second param.
 *
 * @return [type]
 */
Disable the admin bar by role.
add them support for hm_disable_admin_bar passing an array of roles as the second param.

@return [type]
Disable the admin bar by role . add them support for hm_disable_admin_bar passing an array of roles as the second param . @return [ type ]
function hm_disable_admin_bar() {
	if( is_admin() || ! is_user_logged_in() )
		return;
	global $_wp_theme_features;
	$maybe_remove = array_intersect( (array) wp_get_current_user()->roles, isset( $_wp_theme_features['hm_disable_admin_bar'][0] ) ? (array) $_wp_theme_features['hm_disable_admin_bar'][0] : array() );
	if ( is_user_logged_in() && current_theme_supports( 'hm_disable_admin_bar' ) && ! empty( $maybe_remove ) ) :
		show_admin_bar( false );
		remove_action( 'wp_head', '_admin_bar_bump_cb' );
		wp_dequeue_script( 'admin-bar' );
		wp_dequeue_style( 'admin-bar' );
	endif;
}
function hm_disable_admin_bar ( ) { if ( is_admin ( ) || ! is_user_logged_in ( ) ) return ; global $ _wp_theme_features ; $ maybe_remove = array_intersect ( ( array ) wp_get_current_user ( ) -> roles , isset ( $ _wp_theme_features [ 'hm_disable_admin_bar' ] [ 0 ] ) ? ( array ) $ _wp_theme_features [ 'hm_disable_admin_bar' ] [ 0 ] : array ( ) ) ; if ( is_user_logged_in ( ) && current_theme_supports ( 'hm_disable_admin_bar' ) && ! empty ( $ maybe_remove ) ) : show_admin_bar ( false ) ; remove_action ( 'wp_head' , '_admin_bar_bump_cb' ) ; wp_dequeue_script ( 'admin-bar' ) ; wp_dequeue_style ( 'admin-bar' ) ; endif ; }
Disable the admin bar by role.
Disable the admin bar by role .