[wp-trac] [WordPress Trac] #11394: Image shortcode
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 9 16:56:53 UTC 2010
#11394: Image shortcode
-----------------------------+----------------------------------------------
Reporter: caesarsgrunt | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 3.1
Component: Media | Version: 2.9
Severity: normal | Keywords: needs-patch dev-feedback
-----------------------------+----------------------------------------------
Changes (by mikeschinkel):
* cc: mikeschinkel@… (removed)
Comment:
Replying to [comment:36 caesarsgrunt]:
> In my mind the current system is very messy, and an {{{[image]}}} or
{{{[media]}}} shortcode would allow us to tidy it up immensely.
+1
Replying to [comment:37 Otto42]:
> Replying to [comment:36 caesarsgrunt]:
> Ugh, absolutely not. Caption is separate from the image for a reason,
and it should stay that way.
>
> Look, the image is just the image. But the caption is the box
surrounding the image. They are separate in style and display and
everything else. The caption shortcode surrounds the image because that's
the way it works on the page itself.
Shortcodes need not equate one-to-one to underlying implementation. A
user doesn't think of them as two things; they think of them as a picture
that has a caption. Using the same logic we would argue against a single
[calendar] shortcode preferring instead [calendar] surrounding [week]s
that surrounds [day]s. Requiring image and caption to be separate is
similarly favoring pedancy over usability and content mantainability.
I'm not saying that there shouldn't be an option to use a caption
separately but forcing them to be separate simply adds a burden on the
user while providing almost no value to anyone that I can see.
> If I was to simply delete all shortcodes, then I would still want my img
html to be in there. Remember, post content is not confined to being
displayed on the website. It's also in feeds, it can be seen in Google
Reader, it could be pulled into other things... Shortcodes violate this
principle of one-content-multiple-displays, but they tend to do so in a
minor and manageable way. If we expand shortcodes to actually *being*
content, then we change that dynamic.
Forcing separate shortcode for image and caption doesn't address your
stated concern. Any image shortcode triggers your concern; with caption as
an attribute or caption as a separate shortcode.
While I agree with the value of HTML being HTML and not HTML+Shortcodes
the reality is that the WordPress community is heading in the direction of
using more and more shortcodes (just look at how many plugins provide
them.) Rather that fight it I'd suggest improving the support for
shortcodes to make generation of raw HTML easier and to make it easier to
add TinyMCE support for shortcodes similar to how images are currently
handled in the editor.
> I'm -1 to this ticket now, if we're talking about making the media
handled by a shortcode. I want my content to be at least mostly free of
being generated by the WordPress core code. I'd rather not have to process
it through WordPress just to make it capable of being displayed elsewhere.
Rather than fight shortcodes, another option (and I mean "option" as in
the user of the site gets to turn this off) would be to have WordPress
store two copies of a post, one with shortcodes and one that has raw HTML.
It could even be designed where it only stores the copy ''if'' a
particular post used a shortcode.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11394#comment:38>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list