diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 5d8ba5a1d4..3cf0c7c48f 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -1602,6 +1602,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals * Filters a retrieved attachment page link. * * @since 2.7.0 + * @since 5.1.0 Added the $attr parameter. * * @param string $link_html The page link HTML output. * @param int $id Post ID. @@ -1610,8 +1611,9 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals * @param bool $permalink Whether to add permalink to image. Default false. * @param bool $icon Whether to include an icon. Default false. * @param string|bool $text If string, will be link text. Default false. + * @param array|string $attr Array or string of attributes. Default empty. */ - return apply_filters( 'wp_get_attachment_link', "$link_text", $id, $size, $permalink, $icon, $text ); + return apply_filters( 'wp_get_attachment_link', "$link_text", $id, $size, $permalink, $icon, $text, $attr ); } /**