WordPress.org

Make WordPress Core

Ticket #31842: 31842-2.diff

File 31842-2.diff, 686 bytes (added by ShinichiN, 5 years ago)

First patch was an mistake..

  • src/wp-includes/post-template.php

     
    15401540         * @param bool        $icon      Whether to include an icon. Default false.
    15411541         * @param string|bool $text      If string, will be link text. Default false.
    15421542         */
    1543         return apply_filters( 'wp_get_attachment_link', "<a href='$url'>$link_text</a>", $id, $size, $permalink, $icon, $text );
     1543        $link_html = "<a href='$url'>$link_text</a>";
     1544        return apply_filters( 'wp_get_attachment_link', $link_html, $id, $size, $permalink, $icon, $text );
    15441545}
    15451546
    15461547/**