I used a plugin that hides wp-admin, but it hid wp-admin for admin too – how to revert back?

I usually dont use plugins for this due to the fact its unstable.

I use this in my theme functions.php so you can always remove it if need be and it saves nothing to the DB.

This also leave open the admin ajax files if you need them for any theme functions like thickbox and a few others.

function erichamby_restrict_admin() {
if ( ! current_user_can('administrator')  && $_SERVER['PHP_SELF'] != '/wp-admin/admin-ajax.php' ) {
    wp_redirect( home_url() );
}
}
  add_action( 'admin_init', 'erichamby_restrict_admin', 1 );