Only replace the last segment of the uri when generating the sample permalink. Fixes #6068.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b871aff737
commit
91011917f7
|
@ -609,7 +609,8 @@ function get_sample_permalink($id, $title=null, $name = null) {
|
|||
// Handle page hierarchy
|
||||
if ( 'page' == $post->post_type ) {
|
||||
$uri = get_page_uri($post->ID);
|
||||
$uri = str_replace($post->post_name, '', $uri);
|
||||
$uri = untrailingslashit($uri);
|
||||
$uri = strrev( stristr( strrev( $uri ), '/' ) );
|
||||
$uri = untrailingslashit($uri);
|
||||
if ( !empty($uri) )
|
||||
$uri .='/';
|
||||
|
|
Loading…
Reference in New Issue