Don't cache filtered post objects. Set filter when getting sample permalink. Props brianwhite. fixes #8526 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@10213 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-12-16 23:50:39 +00:00
parent fcc53e993b
commit 97a6c04681
3 changed files with 14 additions and 2 deletions
+4
View File
@@ -909,6 +909,8 @@ function get_sample_permalink($id, $title=null, $name = null) {
$post->post_name = sanitize_title($name? $name : $title, $post->ID);
}
$post->filter = 'sample';
$permalink = get_permalink($post, true);
// Handle page hierarchy
@@ -926,6 +928,8 @@ function get_sample_permalink($id, $title=null, $name = null) {
$post->post_status = $original_status;
$post->post_date = $original_date;
$post->post_name = $original_name;
unset($post->filter);
return $permalink;
}