[wp-trac] [WordPress Trac] #18311: Support HTML in image captions.
WordPress Trac
wp-trac at lists.automattic.com
Thu Feb 16 20:59:03 UTC 2012
#18311: Support HTML in image captions.
--------------------------------------+-----------------------
Reporter: prettyboymp | Owner: sushkov
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 3.4
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: ux-feedback dev-feedback |
--------------------------------------+-----------------------
Comment (by nacin):
> In fact, looking back, we can solve this simply by regexp-ing img tag
and considering the rest caption text (problem here is that themes that
hook into img_caption_shortcode will have no support for the new version
of captions text).
We're screwed there either way, though. Once we nest the content into
caption_text, we're backwards incompatible for callbacks expecting an
attribute.
So, we need to figure out how to be compatible here. What we can do is
make img_caption_shortcode() reach into $content, remove the caption, and
add it into $attr['caption']. Then pass the modified $attr and $content
into the filter.
This would work best with a single [caption] shortcode, and no
[caption_text]. The regex would need to account for <a> tags around the
<img> tag as well.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18311#comment:38>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list