mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Only replace the last segment of the uri when generating the sample permalink. Fixes #6068.
git-svn-id: https://develop.svn.wordpress.org/trunk@7320 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ea02c0e417
commit
a951a2019b
@ -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
Block a user