(a) A district judge or a county court at law judge may refer to a magistrate any criminal case for proceedings involving:
(1) a negotiated plea of guilty before the court;
(2) a bond forfeiture;
(3) a pretrial motion;
(4) a postconviction writ of habeas corpus;
(5) an examining trial; and
(6) any other matter the judge considers necessary and proper.
(b) A magistrate may accept a plea of guilty for a misdemeanor or felony.
(c) A magistrate may not preside over a trial on the merits, whether or not the trial is before a jury.
(d) A judge of a court designated a juvenile court may refer to a magistrate any proceeding over which a juvenile court has exclusive original jurisdiction under Title 3, Family Code, including any matter ancillary to the proceeding.