Support %date in next post link template. Props noel. fixes #7726

git-svn-id: http://svn.automattic.com/wordpress/trunk@8896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-09-15 23:48:24 +00:00
parent 168652f6c4
commit 1d9facfbe7
1 changed files with 3 additions and 0 deletions

View File

@ -650,8 +650,11 @@ function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_cate
$title = $previous ? __('Previous Post') : __('Next Post'); $title = $previous ? __('Previous Post') : __('Next Post');
$title = apply_filters('the_title', $title, $post); $title = apply_filters('the_title', $title, $post);
$date = mysql2date(get_option('date_format'), $post->post_date);
$string = '<a href="'.get_permalink($post).'">'; $string = '<a href="'.get_permalink($post).'">';
$link = str_replace('%title', $title, $link); $link = str_replace('%title', $title, $link);
$link = str_replace('%date', $date, $link);
$link = $string . $link . '</a>'; $link = $string . $link . '</a>';
$format = str_replace('%link', $link, $format); $format = str_replace('%link', $link, $format);