[wp-hackers] Image caption shortcode format change
jeff.tchang at gmail.com
Mon Dec 16 22:09:48 UTC 2013
I was recently implementing a python shortcode parser and adding support
for [caption] shortcodes.
I ran into a snafu in trying to determine if the caption shortcode format
had an attribute called "caption" as one of the parameters.
It turns out before this commit on May 2012 it did:
This changeset removed the caption attribute. Around line 155 is what I am
$shcode = '[caption id="' . $id . '" align="align' . $align
. '" width="' . $width . '" caption="' . $caption . '"]' . $html .
$shcode = '[caption id="' . $id . '" align="align' . $align . '"
width="' . $width . '"]' . $html . ' ' . $caption . '[/caption]';
Was there a reason to remove the caption attribute? The shortcode becomes a
lot harder to parse dynamically.
More information about the wp-hackers