Call Shortcode inside another Shortcodes callback

tl;dr

  1. Find where the shortcode is registered.
  2. Find the shortcode output function.
  3. Pray for a filter.
  4. Report as a bug.

Remember: All of the functions below are made up. The point of the first two steps is finding the right values to plug into the snippets.


Find where the shortcode is registered

Use a program like Notepad++ or Sublime Text 2 (my personal favorite) that can search multiple files at once. Then search for some variation of the following, where “member” is the shortcode you’re using:

  • add_shortcode( 'member'
  • add_shortcode('member'
  • add_shortcode( "member"
  • add_shortcode("member"

Find the shortcode output function

One of those will likely lead you to a line of code that looks like this:

add_shortcode( 'member', 'member_shortcode' );

Then you’ll need to find the "member_shortcode" function. Look near the add_shortcode function to see if you see it. If not, do a search for:

function member_shorcode(

Pray for a filter

And then this is the moment of truth. You’re praying this whole time that the shortcode provides a filter for the shortcode output. That would let you do something like this:

function recursive_member_shortcode( $content ) {
    return do_shortcode( $content );
}
add_filter( 'member_shortcode_filter', 'recursive_member_shortcode', 9999 );

If there is no filter, your only option is to hack the plugin file itself which is bad news.

Report as a bug

To be honest, having said all of the above, this seems to be a bug to me, and I’d report it to WPMU. But given my experience with their support and code-quality, I wouldn’t get my hopes up.