WordPress.org

Ready to get started?Download WordPress

Forums

caption shortcode lost caption-attribute? (3 posts)

  1. mark-up
    Member
    Posted 1 year ago #

    hi!

    In the past (< WP 3.51) the shorttag output of the media library was:
    [caption id="attachment_12345" align="alignnone" width="100" caption="My Caption Text"]<img src="myimage.jpg" />[/caption]

    Now, this changed with the WP 3.51 update to
    [caption id="attachment_12345" align="alignnone" width="100"]<img src="myimage.jpg" />My Caption Text[/caption]

    Because of this my img-captions are broken now:-/

    I hooked up into the caption shortcode:

    add_shortcode('wp_caption', 'myImgCaption');
    add_shortcode('caption', 'myImgCaption');

    extracted the caption-text for further processing with

    function myImgCaption(){
    	...
    	extract(shortcode_atts(array(
    		'id' => '',
    		'caption' => '',
    	), $attr));
    	...
    }

    .
    This worked pretty fine, till now :-(

    What can I do, do force WP into the old structure?

    Thanks
    mark

  2. anntorrence
    Member
    Posted 1 year ago #

    any resolution to this?

  3. anntorrence
    Member
    Posted 1 year ago #

    Found it, sort of, here, in case search engines bring anyone else to this thread

    http://wordpress.org/support/topic/caption-broken-in-new-34-posts?replies=43

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.