[wp-hackers] Shortcode embedded within shortcode -- is it possible?

Mitch Canter mitch at mitchcanter.com
Tue Aug 9 19:27:40 UTC 2011


http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes

:)

~Mitch

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Claude Needham
Sent: Tuesday, August 09, 2011 2:12 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Shortcode embedded within shortcode -- is it
possible?

Brian,

I don't have access to the guts of the Flowplayer plugin. Unless I hack it,
then I would have to hack it every time they upgraded the plugin.

So I would need to wrap the flowplayer inside my shortcode.

Is there a safe way to do this that will allow me to execute the flowplayer
shortcode transparently?

Or should I be looking for a hook or filter that will allow me to process
the pre-content before it goes into the shortcode processor?

Is there a time line displaying where the hooks and filters happen on the
time line?

Thanks for the hints.
Claude


On Tue, Aug 9, 2011 at 11:25 AM, Brian Layman <wp-hackers at thecodecave.com>
wrote:
> This may be obvious, but it should be helpful for you to test the 
> short codes separately first, making sure each works as expected
individually.
>
> Additionally, if you need to bandaid the process, you could make the 
> inner short code brackets [] be braces {} and convert them to brackets 
> via the outer short code's processing.
>
> So you start with something like this:
> [FLOWPLAYER=http://domain.com/splash.jpg|{s3signedlink
> url=https://s3.amazonaws.com/mybucket/myvideo.mp4},600,450]
>
> causing one of the parameters to be
>
> {s3signedlink url=https://s3.amazonaws.com/mybucket/myvideo.mp4}
>
> which gets converted to
>
> [s3signedlink url=https://s3.amazonaws.com/mybucket/myvideo.mp4]
>
> and processed as a short code.
>
>
> I don't know if that will help or not, but it might give you a 
> direction to go...
>
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list