I'm curious how to process shortcodes in arguments (not nested shortcodes, which are already contemplated)::
function do_foo_shortcode($atts, $content = null) {
extract(shortcode_atts(array(
'bar' => '',
), $atts, 'foo'));
$bar = do_shortcode($bar);
$content = do_shortcode($content);
return "$bar - $content";
}
add_shortcode('foo', 'do_foo_shortcode');
For example in:
[foo bar=[video src="video-source.mp4"]]Hello world![/foo]
generates:
[video - ]Hello world!
How can I consider such cases and how to correctly use them?
src
argument on your own shortcode and then just pass that to the underlying function of the video shortcode, rather than trying to mash them together like this.extract(
calls like the plague