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

git-svn-id: https://develop.svn.wordpress.org/trunk@8896 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-09-15 23:48:24 +00:00
parent f4366bf242
commit b3d45e868e
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);