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:
parent
f4366bf242
commit
b3d45e868e
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue