[wp-hackers] shortcode for images?

scribu scribu at gmail.com
Thu Jan 29 20:03:06 GMT 2009

On Thu, Jan 29, 2009 at 8:59 PM, Paul <paul at codehooligans.com> wrote:

> On Jan 29, 2009, at 12:47 PM, scribu wrote:
>> You could use the Search & Replace plugin instead of querying the database
>> directly.
> Rather not use a plugin when I can type the replace SQL command myself
> thanks.

I mentioned the plugin because you said you would like the average user to
be able to do it.

 As for the shortcode, several dissadvantages:
> - extra processing for each shortcode
And there is not already enough processing already for the caption
> shortcode??

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?

 - what happens with images that aren't hosted on the same host?

Well if the image shortcode is used you would have something like
>        [image id="attachment_2817"]
> The actually URL is URL reference can be stored into the post table as the
> attachment data. That way is you by chance use the same image in 5 posts you
> don't have to update the image URL is it ever changes. I'm sure WordPress
> can be made smart enough to tell the difference between locally stored image
> and remote image.

>  - both the rich editor and all the export scripts would have to be updated
> Oh darn wouldn't want to cause anyone more work. But again the parsing is
> mostly there for the caption processing.

It's not about doing work, it's about doing useful work and not bloating the
core. I think this would be a great ideea for a plugin. I even think there
are a few already out there. I have the same opinion about captions, but
there you go.


More information about the wp-hackers mailing list