Maybe I’ve missed the feature but I could not find anything like this in the documentation. Is there a way to have different shortcodes according to the output format? I’m currently trying to implement AMP pages and the standard is very strict as regards what html tag is allowed and what isn’t. Because of that, I have several shortcodes that break because they contain javascript for example.
Is there a way to either:
Implement two versions of the shortcode, ex myshortcode.html and myshortcode.amp.html
Programmatically know in the shortcode if it will be outputing in a HTML or AMP file.