mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 18:13:00 +01:00
Use correct custom post_type token in get_sample_permalink()
git-svn-id: https://develop.svn.wordpress.org/trunk@14147 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f72a1d860a
commit
5383a45de3
@ -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 ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user