Replaces is_admin() with custom check