(4) an order issued in this or any other state as a condition of pretrial release, diversion, probation, suspended sentence, postrelease supervision or at any other time during the criminal case that orders the person to refrain from having any direct or indirect contact with another person;

(5) an order issued in this or any other state as a condition of release after conviction or as a condition of a supersedeas bond pending disposition of an appeal, that orders the person to refrain from having any direct or indirect contact with another person; or

(6) a protection from stalking or sexual assault order issued pursuant to K.S.A. 60-31a05 or 60-31a06, and amendments thereto.

(b) (1) Violation of a protective order is a class A person misdemeanor, except as provided in subsection (b)(2).

(2) Violation of an extended protective order as described in K.S.A. 60-3107(e)(2), and amendments thereto, and K.S.A. 60-31a06(d), and amendments thereto, is a severity level 6, person felony.

(c) No protective order, as set forth in this section, shall be construed to prohibit an attorney, or any person acting on such attorney's behalf, who is representing the defendant in any civil or criminal proceeding, from contacting the protected party for a legitimate purpose within the scope of the civil or criminal proceeding. The attorney, or person acting on such attorney's behalf, shall be identified in any such contact.

(d) As used in this section, "order" includes any order issued by a municipal or district court.