BENNINGTON — A former Mount Anthony Union High School teacher who attracted national attention after he posted what some called disturbing comments and had a semi-automatic weapon confiscated by police, resolved all of his outstanding criminal charges on Wednesday with no jail time.

Steven P. Davis, 35, of Troy, N.Y., was not charged in relation to the posts about educators at the high school and administrators at the Southwest Vermont Supervisory Union nor in relation to the Bushmaster semi-automatic assault rifle that police confiscated.

Instead he was charged on Jan. 28 with felony charge of unlawful trespass into an occupied home and a misdemeanor charge of violating an abuse prevention order obtained by his wife. On Feb. 6, he was charged with a misdemeanor count of violating the conditions set when he was released on Feb. 6.

Davis pleaded guilt on Wednesday to the unlawful trespass under an agreement through which he will not be sentenced for 18 months. If he has no further legal troubles during that time, the charge will be dropped and he will not have a criminal record.

The state dismissed the two misdemeanor charges.

During the hearing, Davis admitted that on Jan. 27 he broke into the home he once shared with his wife which was a violation of an abuse prevention order issued on Jan. 15.