From cc9c13d2664e374ac8a8748ec0c9e5cf85a3860d Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 18 Apr 2010 09:18:20 +0000 Subject: [PATCH] Use correct custom post_type token in get_sample_permalink() git-svn-id: http://svn.automattic.com/wordpress/trunk@14147 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index afbe5d3ff7..c384229356 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1030,8 +1030,8 @@ function get_sample_permalink($id, $title = null, $name = null) { $permalink = get_permalink($post, true); - if ( $ptype->query_var ) // Replace custom post_type Token with generic pagename token for ease of use. - $permalink = str_replace('%' . $ptype->query_var . '%', '%pagename%', $permalink); + // Replace custom post_type Token with generic pagename token for ease of use. + $permalink = str_replace("%$post->post_type%", '%pagename%', $permalink); // Handle page hierarchy if ( $ptype->hierarchical ) {