1.  All releases for and consents to adoption executed in this state by the parent who gave birth to a child before the birth of the child or within 72 hours after the birth of the child are invalid.

2.  A release for or consent to adoption may be executed by a parent before the birth of a child if the parent is not married to the parent who gave birth to the child. A release executed under this subsection becomes invalid if:

(a) The parents of the child marry each other before the child is born;

(b) The parent who gave birth to the child does not execute a release for or consent to adoption of the child within 6 months after the birth of the child; or

(c) No petition for adoption of the child has been filed within 2 years after the birth of the child.