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:
parent
168652f6c4
commit
1d9facfbe7
|
@ -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