WordPress.org

Make WordPress Core

Changeset 7320


Ignore:
Timestamp:
03/15/08 21:27:10 (6 years ago)
Author:
westi
Message:

Only replace the last segment of the uri when generating the sample permalink. Fixes #6068.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r7165 r7320  
    610610    if ( 'page' == $post->post_type ) { 
    611611        $uri = get_page_uri($post->ID); 
    612         $uri = str_replace($post->post_name, '', $uri); 
     612        $uri = untrailingslashit($uri); 
     613        $uri = strrev( stristr( strrev( $uri ), '/' ) ); 
    613614        $uri = untrailingslashit($uri); 
    614615        if ( !empty($uri) ) 
Note: See TracChangeset for help on using the changeset viewer.