[wp-hackers] shortcode for images?

Paul paul at codehooligans.com
Thu Jan 29 20:50:56 GMT 2009

On Jan 29, 2009, at 2:03 PM, scribu wrote:
> I never used the caption shortcode, so I wouldn't know. None the  
> less, your
> argument is not very good: If there is already a lot of processing  
> going on
> already, why add more?

When you upload an image through the default media upload and you  
enter a caption for the image then insert into post what is inserted  
is something like:

[caption id="attachment_2817" align="aligncenter" width="212"  
caption="Corporate America More GLBT-Friendly Than Ever."]<a href="http://www.hrc.org 
"><img src="http://blogstaging.hrcsupport.org/wp-content/uploads/2009/01/side.jpg 
" alt="Corporate America More GLBT-Friendly Than Ever." title="side"  
width="212" height="90" class="size-full wp-image-2817" /></a>[/caption]

When you view this in the WYSIWYG you will see the image and the  
caption text below it. Simple enough.

I guess my argument (or more like my opinion) is the final code for  
local URIs should not be post body until the time the post contents  
need to be rendered to the user. And yes I see the same argument when  
simply linking to another post/page on the same site. Why put in the  
URL? Put in a reference that can be filtered on at render time. I  
agree with you that already in the core is a ton of filter action  
taking place. I don't have the answer on how this will impact  
performance. But most all my clients run some form of Caching plugin  
so really once the page is rendered it will remained cached for some  
time period.

And to be honest I'm less comfortable with a plugin using shortcodes  
than core. I'm had issues early on with a media plugin adding  
shortcodes then sometime later I decided to use a different plugin.  
Creates a mess to clean up.


More information about the wp-hackers mailing list