mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 18:13:00 +01:00
Do not modify the post object in get_adjacent_post_rel_link(). Prior to 3.5 this could have poisioned the post's cache. props mdawaffe, fixes #22072.
git-svn-id: https://develop.svn.wordpress.org/trunk@22095 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7790af3154
commit
7f2ab732c4
@ -1214,11 +1214,13 @@ function get_adjacent_post_rel_link($title = '%title', $in_same_cat = false, $ex
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if ( empty($post->post_title) )
|
if ( empty($post->post_title) )
|
||||||
$post->post_title = $previous ? __('Previous Post') : __('Next Post');
|
$post_title = $previous ? __('Previous Post') : __('Next Post');
|
||||||
|
else
|
||||||
|
$post_title = $post->post_title;
|
||||||
|
|
||||||
$date = mysql2date(get_option('date_format'), $post->post_date);
|
$date = mysql2date(get_option('date_format'), $post->post_date);
|
||||||
|
|
||||||
$title = str_replace('%title', $post->post_title, $title);
|
$title = str_replace('%title', $post_title, $title);
|
||||||
$title = str_replace('%date', $date, $title);
|
$title = str_replace('%date', $date, $title);
|
||||||
$title = apply_filters('the_title', $title, $post->ID);
|
$title = apply_filters('the_title', $title, $post->ID);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user