diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php
index bdcc0296ce..53eaee7c1d 100644
--- a/wp-includes/link-template.php
+++ b/wp-includes/link-template.php
@@ -1206,8 +1206,9 @@ function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_cate
$title = apply_filters('the_title', $title, $post);
$date = mysql2date(get_option('date_format'), $post->post_date);
+ $rel = $previous ? 'prev' : 'next';
- $string = '';
+ $string = '';
$link = str_replace('%title', $title, $link);
$link = str_replace('%date', $date, $link);
$link = $string . $link . '';