I've created a recursive shortcode that looks like this.
[tabs]
[tab state="active"]Home[/tab]
[tab]About[/tab]
[tab]Contact[/tab]
[/tabs]
[tabcontent]
[tabpane]Content 1[/tabpane]
[tabpane]Content 2[/tabpane]
[tabpane]Content 3[/tabpane]
[/tabcontent]
It is working, but I would like to remove the state="active" and automatically add that to the first tab, but I'm not sure how to tell which iteration my do_shortcode is on?
Update: What would be even better is if I could keep a count while iterating through the do_shortcode so I could add attributes like id="tab1", id="tab2".