Block Theme: Is there a way to know which global style is active for a page?

admin2025-01-07  3

I'm building a block theme with multiple global style templates (multiple theme/styles/styleName.json files).

From what I can tell, WordPress does not appear to inject the name of the selected global style into the page HTML. I was hoping to find something like:

<body class="has-global-style-styleName">

But that does not appear to be the case. Is there a way to know this information? If not, is there a strategy that might work to gather that info?

For context, the reason I need to know this is because there's a custom style that uses a border image. I need to use a different border image for Global Style X versus Global Style Y.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736258450a512.html

最新回复(0)