I'm going to have to take a look at this more closely to figure out all the implications, but the AB said the following in today's China - Publications decision:
215. ... We note that the question of whether the introductory clause of paragraph 5.1 allows China to assert a defence under Article XX(a) is an issue of legal interpretation falling within the scope of Article 17.6 of the DSU. For these reasons, we have decided to examine this issue ourselves.
...
233. For all these reasons, we consider that the provisions that China seeks to justify have a clearly discernable, objective link to China's regulation of trade in the relevant products. In the light of this relationship between provisions of China's measures that are inconsistent with China's trading rights commitments, and China's regulation of trade in the relevant products, we find that China may rely upon the introductory clause of paragraph 5.1 of its Accession Protocol and seek to justify these provisions as necessary to protect public morals in China, within the meaning of Article XX(a) of the GATT 1994.
What does this mean for GATT Article XX as a defense to claims under other WTO agreements? Perhaps nothing, as the finding may be limited to the context of para. 5.1 of the Accesion Protocol. More later.
ADDED: On the question of when and whether Article XX can be a defense to claims under agreements other than GATT, paras. 229 and 230 seem to offer the most insights. However, I can't find anything definitive on how the AB would deal with this issue outside the context of para. 5.1 of the Accession Protocol. If the AB does have views on this, it has hidden them well.
Another interesting issue in the decision is the use of arguendo assumptions as part of the reasoning. In paras. 209-215, the AB criticized the Panel's decision to (1) assume that Article XX applied and then (2) consider whether the measure fell under Article XX(a). After rejecting the XX(a) defense, the Panel never addressed the applicability issue. By contrast, instead of avoiding the issue in this way, the AB (as noted above) addressed the applicability of Article XX right at the outset. This approach to arguendo assumptions appears to be in contrast to what the AB itself did in the Shrimp (Thailand) / Customs Bond case (see paras. 310 and 319).