Updated

Michael Avenatti isn't ready to give up the green room for the courtroom just yet.

The lawyer for adult film star Stormy Daniels had been trying to join the criminal case in New York against Trump attorney Michael Cohen. But during a feisty hearing Wednesday, federal Judge Kimba Wood said the lawyer -- who has been a fixture on CNN and other outlets -- would have to first stop his “publicity tour.”

The show, it appears, will go on.

After the hearing, Avenatti withdrew his motion to intervene -- at least until the court rules whether Daniels is allowed to participate in the case.

Judge Wood had warned him about the "publicity tour," since he would be subject to New York laws and procedures if he were allowed on the case -- meaning he'd have to pull back on his attacks against Cohen.

Avenatti has made countless appearances on cable outlets blasting President Trump and Cohen while defending his client, whose real name is Stephanie Clifford.

Cohen and Avenatti -- as well as attorneys for Trump and federal prosecutors -- appeared in federal court on Wednesday for the hearing related to the April 9 FBI raid of Cohen’s personal properties.

Cohen's attorneys fought to keep Avenatti out of the case, citing a California State Bar investigation into him.

“I’ve never seen an attorney conduct himself in a manner that Avenatti has,” Cohen’s attorney Stephen Ryan said in court Wednesday, arguing that Avenatti’s promotion of Cohen’s bank records and other materials earlier this month was “reckless and improper.” Earlier this month, Avenatti tweeted bombshell allegations against Cohen, citing financial records to accuse him of receiving $500,000 from a Russian oligarch-tied company, as well as other dealings. The records suggest Cohen's firm was paid huge sums for insight into the Trump administration.

Earlier this month, Avenatti also filed the motion to participate in the Cohen case.

Judge Wood did not rule whether Avenatti could intervene in the case.

In court, meanwhile, Avenatti suggested he received a call from a member of the press last week for comment on audio recordings between Daniels’ former attorney Keith Davidson and Cohen. Avenatti argued that the two exchanged privileged information.

In response, Cohen’s attorney said he was unaware of the release of any audio file, noting that if it had been released, they would be “everywhere” and that “if” the audio files existed, they would be “under lock and key at my law firm.”

Following the hearing, Avenatti also said that Cohen's attorneys had "audio tapes" of Cohen and the president, with some of the recordings "relating to my client."

"Mr. Cohen and his attorney Mr. Ryan should release all of those audio recordings to the American people and to Congress," Avenatti said, suggesting if the recordings did relate to Daniels, it could be a violation of attorney-client privilege.

Cohen is under criminal investigation as part of a grand jury probe into his personal business dealings. One topic at issue is Cohen’s payment of $130,000 to Daniels weeks before the 2016 presidential election in exchange for her silence about an alleged sexual encounter with Trump in 2006.

The president filed a financial disclosure earlier this month which included confirmation that he reimbursed Cohen for unspecified “expenses” -- apparently the payment to Daniels.

Prior to the release of the disclosure, Trump attorney Rudy Giuliani told Fox News that Trump reimbursed Cohen the $130,000 he paid to Daniels.

The judge in the case last month appointed independent special master Barbara Jones to review the material seized in the FBI’s raid of Cohen’s properties. The judge ruled Wednesday that Cohen’s attorneys’ review of the materials must be concluded by June 15, or the remaining materials will be sent to a team of lawyers not connected to the case.

Fox News’ Jennifer Oliva and Tara Prindiville contributed to this report.