Wordpress disable admin bar for all users except for administrators

Categorías: 

Etiquetas: 

/**
 * Disable Admin Bar for All Users Except for Administrators
 */
function remove_admin_bar() {
    if (!current_user_can('administrator')) {
        show_admin_bar(false);
    }
}
add_action('after_setup_theme', 'remove_admin_bar');