Index: src/wp-includes/post-template.php
===================================================================
--- src/wp-includes/post-template.php (revision 31960)
+++ src/wp-includes/post-template.php (working copy)
@@ -1540,7 +1540,8 @@
* @param bool $icon Whether to include an icon. Default false.
* @param string|bool $text If string, will be link text. Default false.
*/
- return apply_filters( 'wp_get_attachment_link', "$link_text", $id, $size, $permalink, $icon, $text );
+ $link_html = "$link_text";
+ return apply_filters( 'wp_get_attachment_link', $link_html, $id, $size, $permalink, $icon, $text );
}
/**