If I have a shortcode like this:
[shortcode att1="true" att2="true"]
Is there any way to determine which attribute (att1 or att2) comes first? So if the shortcode looked like this it would give a different output than the first example:
[shortcode att2="true" att1="true"]
I have not tested this, and I guess it depends on how the Shortcode API handles the parameters internally, but as long as the shortcodes are added to an array in the order they are encountered when the shortcode is parsed you could probably check the order of the arguments in the atteibutes array supplied to your shortcode handler callback. Something like this might work:
EDIT: I would try to really think things through before implementing such a function, as it is potentially a bit confusing for users unless it’s clearly communicated that parameter order does in fact matter.