Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Is there a picture caption fix for 4.9 yet?

Discussion in 'Misc WordPress Requests' started by bahead, Nov 25, 2017.

  1. bahead

    Guest

    Reply To: Is there a picture caption fix for 4.9 yet?, by bahead

    I had the same problem. Until there’s a patch, you can edit media.php in /wp-includes and change line 1566 from:

    . do_shortcode( $content ) . '<figcaption class="wp-caption-text" >' . $atts['caption'] . '</figcaption></figure>';

    to

    . do_shortcode( $content ) . '<figcaption class="wp-caption-text" ' . $style . '>' . $atts['caption'] . '</figcaption></figure>';

    By inserting $style in the caption, you are inserting the same max-width variable into figcaption that is used in figure. Previously, figcaption inherited the “width” attribute from figure, but it does not inherit the new “max-width” attribute from figure.

    IMO, this was very poor testing on the part of WP developers, who always seem to be in a rush to issue an update without conducting enough QC.

    Reply To: Is there a picture caption fix for 4.9 yet?
     
    #1

Share This Page

Web Hosting