Remove Admin Bar based on User Role

<?php
// disable admin bar for non admins & editors
add_action('after_setup_theme', 'wd_remove_admin_bar');
function wd_remove_admin_bar() {
     if (! current_user_can( 'administrator' ) && ! current_user_can( 'editor' ) && ! is_admin() ) {
          show_admin_bar( false );
     }
}