It is unlawful for any person, either as litigant or attorney, to file, cause to be filed, threaten to file, or threaten to cause to be filed in any court of this state any pleading or paper naming or describing in such manner as to identify any person as corespondent or participant in misconduct of the adverse party in any action for dissolution of marriage, legal separation, declaration of invalidity of marriage, or the allocation of parental responsibilities or support of children, or in any citation or proceeding ancillary or subsequent to such action. In all such cases it is sufficient for such pleader to designate any such corespondent or third party in general language that is not sufficient for identification, and such general language shall operate with the same legal effect as complete naming and identification of the person would do; except that the adverse party may file a motion for a bill of particulars to secure such name, identity, or other facts. The granting of such motion, in whole or in part, rests in the sound discretion of the court; and, if ordered granted, the bill of particulars shall set forth the information specifically required by said order, but no further, and when filed the same shall be sealed, not to be opened without an order of the court. If the motion for a bill of particulars is granted, the party named in said bill of particulars shall be given five days' notice in writing prior to the filing of the same, said notice to be given either by personal service or by registered mail addressed to his last-known address.