Defense Secretary Jim Mattis said on Aug. 29 current policy regarding transgender personnel serving in the military would remain in place until he advises President Donald Trump on how to implement his directive on a transgender ban. (Reuters)

Defense Secretary Jim Mattis was trending on Twitter overnight, praised by the LGBT organization GLAAD and hailed by some as a “hero” for “openly defying” Trump by “disregarding” the president’s order. Some on Twitter confessed they never thought they would be cheering on generals or ex-generals for refusing to carry out the orders of the commander in chief.

But defying orders was not what Mattis was doing.

What Mattis did Tuesday with President Trump’s ban on transgender people in the military was to freeze its  impact for the moment, at least on those currently serving.

But such a delay was pretty much authorized by Trump in his formal memorandum (as opposed to his tweet) delivered to Mattis and the Department of Homeland Security on Aug. 25. It said:

As part of the implementation plan, the Secretary of Defense, in consultation with the Secretary of Homeland Security, shall determine how to address transgender individuals currently serving in the United States military. Until the Secretary has made that determination, no action may be taken against such individuals …

That sounds an awful lot like a freeze, or at least an invitation to one. Mattis gladly accepted it.

Mattis did not reverse Trump or defy him on the broader ban against new recruits who are transgender people.

The Obama administration lifted the long-standing ban effective June 2016. A year later, in June 2017, Mattis delayed the effective date to allow military leaders to review it. There was no change made by Mattis on that count on Tuesday.

Mattis declared in his statement that a panel of experts would be set up to “provide advice and recommendations on the implementation of the president’s direction.” Once the panel delivers some recommendations, Mattis continued, he’ll go back to the president. That could give Mattis an opening to quash the ban entirely. But he did not do that Tuesday.

Mattis could justifiably state, as he did, that far from defying the president, he was only carrying out “the president’s policy direction” and acting “as directed.”

None of this could have surprised Trump. On Aug. 14, Mattis said publicly that once he got directions from the White House, the Pentagon would “study it and come up with what the policy should be.”

Still, it’s understandable why some might see defiance in Mattis’s action.

The administration’s actions at this point are some distance from Trump’s bold tweets on July 26, when, declaring that he had consulted his generals, he proclaimed that the military “would not accept or allow” transgender people to “serve in any capacity.”

As it turned out, Trump had not consulted his generals. And their reception was cold.

Mattis, who was on vacation, was described as “appalled” by Trump’s action. Gen. Joseph F. Dunford Jr., chairman of the Joint Chiefs of Staff, in a letter to senior military leaders, said that there would be “no modifications” to the current policy on transgender troops until further direction was received from the president, as The Post’s Thomas Gibbons-Neff reported.

“In the meantime, we will continue to treat all of our personnel with respect,” Dunford said.

That further direction came on Aug. 25 in the form of the presidential memorandum that many interpreted as giving the military considerable flexibility on the entire transgender policy.

That too, compared to Trump’s tweet, sounded mild, though its potential impact was anything but.

More from Morning Mix

Evangelicals’ ‘Nashville Statement’ denouncing same-sex marriage is rebuked by city’s mayor

Trevor Noah defends Melania Trump’s stilettos: ‘Who cares?’

Trump and Harvey: ‘There was something missing’ from what the president said