[wp-hackers] Shortcode embedded within shortcode -- is it possible?
Doug Stewart
zamoose at gmail.com
Wed Aug 10 11:17:23 UTC 2011
I'm very proud of everyone for avoiding the obvious Inception jokes.
Just thought I'd say that. *grin*
On Tue, Aug 9, 2011 at 3:27 PM, Mitch Canter <mitch at mitchcanter.com> wrote:
> 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
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
-Doug
More information about the wp-hackers
mailing list