Split shortcodes to array of shortcodes

WordPress already has built in support for Nested Shortcodesprovided their handler functions support it by recursively calling.

So if you have for example:

[tag-a]
   [tag-b]
      [tag-c]
   [/tag-b]
[/tag-a]

As long as you recursively call do_shortcode in your shortcode function, all the shortcodes would be parsed.

So you would define the functions for your shortcodes as such:

For tag-a:

function tag_a( $atts ){
    $output = "";
    return do_shortcode($output);
}
add_shortcode( 'tag-a', 'tag_a' );

For tag-b:

function tag_b( $atts ){
    $output = "";
    return do_shortcode($output);
}
add_shortcode( 'tag-b', 'tag_b' );

For tag-c:

function tag_c( $atts ){
    $output = "";
    return do_shortcode($output);
}
add_shortcode( 'tag-c', 'tag_c' );