WordPress.org

Make WordPress Core

Changeset 14399


Ignore:
Timestamp:
05/03/2010 08:10:26 PM (11 years ago)
Author:
nacin
Message:

Handle page hierarchy when showing the sample permalink. props duck_, fixes #12327.

Location:
trunk
Files:
2 edited

Legend:

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

    r14315 r14399  
    10371037    // Handle page hierarchy
    10381038    if ( $ptype->hierarchical ) {
    1039         $uri = get_page_uri($post->ID);
     1039        $uri = get_page_uri($post);
    10401040        $uri = untrailingslashit($uri);
    10411041        $uri = strrev( stristr( strrev( $uri ), '/' ) );
  • trunk/wp-includes/post.php

    r14310 r14399  
    29092909 * @since 1.5.0
    29102910 *
    2911  * @param int $page_id Page ID.
     2911 * @param mixed $page Page object or page ID.
    29122912 * @return string Page URI.
    29132913 */
    2914 function get_page_uri($page_id) {
    2915     $page = get_page($page_id);
     2914function get_page_uri($page) {
     2915    if ( ! is_object($page) )
     2916        $page = get_page($page);
    29162917    $uri = $page->post_name;
    29172918
Note: See TracChangeset for help on using the changeset viewer.