As far as I know, you need to leave a single space between multiple shortcodes.
I believe you can do this without too much trouble
[myshortcode attr="test1" content="test1" ...etc]
[myshortcode attr="test2" content="test2" ...etc]
[myshortcode attr="test3" content="test3" ...etc]
This SHOULD also work:
[myshortcode]Enclosed content[/myshortcode] [myshortcode]Enclosed content[/myshortcode] [myshortcode]Enclosed content[/myshortcode] [myshortcode]Enclosed content[/myshortcode] [myshortcode]Enclosed content[/myshortcode]
Also:
http://codex.wordpress.org/Shortcode_API
The parser does not handle mixing of enclosing and non-enclosing forms of the same shortcode as you would want it to. For example, if you have:
[myshortcode example='non-enclosing' /] non-enclosed content [myshortcode] enclosed content [/myshortcode]
Instead of being treated as two shortcodes separated by the text " non-enclosed content ", the parser treats this as a single shortcode enclosing " non-enclosed content [myshortcode] enclosed content".
So, this appears to not be a bug. This appears to be documented behavior.
Self closing shortcodes do work well together.
Also I may not be understanding the problem, but I tried this:
[svg src="test" width="300" height="300" style="display:block; margin:auto;" type="embed"]1111[/svg] [svg src="test" width="300" height="300" style="display:block; margin:auto;" type="embed"]1111[/svg] [svg src="test" width="300" height="300" style="display:block; margin:auto;" type="embed"]1111[/svg] [svg src="test" width="300" height="300" style="display:block; margin:auto;" type="embed"]1111[/svg]
That worked perfectly.
The code ended up looking like this:
function process_shortcode( $atts , $input ) {
$valid_attributes = array( 'src' , 'style' , 'type' , 'width' , 'height' );
$content = NULL;
foreach( $atts as $attribute => $value ) {
if( ! in_array( $attribute , $valid_attributes ) ) {
$content .= "\n" . '<!-- Invalid attribute ignored: ' . $attribute . ' -->' . "\n";
}
}
switch( $atts[ 'type' ] ) {
case 'iframe':
$content .= '<iframe src="' . $atts[ 'src' ] . '" width="' . $atts[ 'width' ] . '" height="' . $atts[ 'height' ] . '" style="' . $atts[ 'style' ] . '">';
$content .= '</iframe>';
break;
case 'embed':
default:
$content .= '<div>';
$content .= $input;
$content .= '<embed src="' . $atts[ 'src' ] . '" width="' . $atts[ 'width' ] . '" height="' . $atts[ 'height' ] . '" ';
$content .= 'type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/" style="' . $atts[ 'style' ] . '" /> ';
$content .= '</div>';
break;
}
return $content;
}