mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user