From e6ae8c05e82ab9d7c50c605a9934f45965e86755 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 15 May 2010 05:26:25 +0000 Subject: [PATCH] Always pass post ID, not post object, to the_title filter. Original the_title filter in get_the_title() uses ID only. props filosofo, fixes #12631. git-svn-id: https://develop.svn.wordpress.org/trunk@14653 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/link-template.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index ba961a1cf9..bed891f553 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -1072,7 +1072,7 @@ function get_adjacent_post_rel_link($title = '%title', $in_same_cat = false, $ex $title = str_replace('%title', $post->post_title, $title); $title = str_replace('%date', $date, $title); - $title = apply_filters('the_title', $title, $post); + $title = apply_filters('the_title', $title, $post->ID); $link = $previous ? "post_title, $title); $title = str_replace('%date', $date, $title); - $title = apply_filters('the_title', $title, $post); + $title = apply_filters('the_title', $title, $post->ID); $link = $start ? "post_title, $title); $title = str_replace('%date', $date, $title); - $title = apply_filters('the_title', $title, $post); + $title = apply_filters('the_title', $title, $post->ID); $link = "ID); $date = mysql2date(get_option('date_format'), $post->post_date); $rel = $previous ? 'prev' : 'next';