Blac Chyna was granted a temporary restraining order against Rob Kardashian on Monday morning that, according to her attorney Lisa Bloom, prohibits him from coming near her or posting anything of a personal nature about her online.
The protective order will remain in place until Aug. 8, when there will be another hearing.
Bloom said in court that until then, the former couple have nannies in place who can transfer their 8-month-old daughter, Dream, between her parents.
At the time of the hearing, Dream was with her father, who did not appear in court.
"I would like to first and foremost thank the judge for granting me this restraining order to protect me," Chyna told reporters outside the courthouse. "I'm just gonna get back to co-parenting Dream."
Last week, Kardashian shared explicit images of Chyna to social media, and accused her of infidelity.
The reality star's attorney, Robert Shapiro, said in court today that they did not contest the restraining order, as Kardashian "regrets" his actions.
"Mr. Kardashian offers his apologies," he added.
In an interview with "Good Morning America" that aired on Monday, Chyna spoke out about the betrayal she felt when she saw Kardashian's posts.
"I was devastated, of course. I'm like, 'How could somebody, like, post these pictures of me?'" Chyna said. "And I'm like, 'Wow, OK, like, this is a person that I trusted.'"
Chyna, 29, and Kardashian, 30, were first linked in early 2016, and just a few months later, they announced their engagement. Chyna said on "GMA" that she and Kardashian split soon after the birth of their daughter last November and that there's no chance that they'll reconcile. However, she added, she hopes that they can maintain a joint custody arrangement for their child.
Bloom noted that by filing for the restraining order, Chyna was defending her rights as a woman. In California, where the reality stars live, it is a crime to distribute what is commonly referred to as "revenge porn." Bloom likens the practice to a form of domestic abuse.
"I'm not asking victims to change their behavior. I'm asking perpetrators not to commit crimes. It is a crime to post pictures like this," Bloom said on "GMA." "And if you do it, I hope that the full impact of the law rains down on you."