mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-17 03:56:07 +00:00
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
This commit is contained in:
parent
18a81ac245
commit
cc9c13d266
@ -1030,8 +1030,8 @@ function get_sample_permalink($id, $title = null, $name = null) {
|
|||||||
|
|
||||||
$permalink = get_permalink($post, true);
|
$permalink = get_permalink($post, true);
|
||||||
|
|
||||||
if ( $ptype->query_var ) // Replace custom post_type Token with generic pagename token for ease of use.
|
// Replace custom post_type Token with generic pagename token for ease of use.
|
||||||
$permalink = str_replace('%' . $ptype->query_var . '%', '%pagename%', $permalink);
|
$permalink = str_replace("%$post->post_type%", '%pagename%', $permalink);
|
||||||
|
|
||||||
// Handle page hierarchy
|
// Handle page hierarchy
|
||||||
if ( $ptype->hierarchical ) {
|
if ( $ptype->hierarchical ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user