Ticket #12327: 12327.diff
| File 12327.diff, 1.0 KB (added by , 16 years ago) |
|---|
-
wp-admin/includes/post.php
1043 1043 1044 1044 // Handle page hierarchy 1045 1045 if ( $ptype->hierarchical ) { 1046 $uri = get_page_uri($post ->ID);1046 $uri = get_page_uri($post); 1047 1047 $uri = untrailingslashit($uri); 1048 1048 $uri = strrev( stristr( strrev( $uri ), '/' ) ); 1049 1049 $uri = untrailingslashit($uri); -
wp-includes/post.php
2904 2904 * 2905 2905 * @since 1.5.0 2906 2906 * 2907 * @param int $page_id Page ID.2907 * @param mixed $page Page object or page ID. 2908 2908 * @return string Page URI. 2909 2909 */ 2910 function get_page_uri($page_id) { 2911 $page = get_page($page_id); 2910 function get_page_uri($page) { 2911 if ( ! is_object($page) ) 2912 $page = get_page($page); 2912 2913 $uri = $page->post_name; 2913 2914 2914 2915 // A page cannot be it's own parent.