diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index f02f5f8d6b..349bcbae1d 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -3441,7 +3441,8 @@ function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) if ( isset( $attachments[ $k ] ) ) { $attachment_id = $attachments[ $k ]->ID; - $output = wp_get_attachment_link( $attachment_id, $size, true, false, $text ); + $attr = array( 'alt' => get_the_title( $attachment_id ) ); + $output = wp_get_attachment_link( $attachment_id, $size, true, false, $text, $attr ); } }