If she didn't want the affair brought into court she probably shouldn't have had it, don't you think? Agreeing to not bring it up isn't going to get you anything.
Got to agree with VH here. The way to control what other people say about you, particularly in court, is to control your actions. She made her bed. She needs to lie in it. And, if she doesn't like it, she can reconcile with her husband.
She strikes me as a the kid who only wants to play a game if he can win all the time. Nobody wins all the time.