WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/23/2016 10:04:20 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Permalinks: In get_page_uri(), don't prepend a parent page slug if it's empty.

Props inderpreet99, SergeyBiryukov.
Fixes #36174.

File:
1 edited

Legend:

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

    r38125 r38145  
    43344334    foreach ( $page->ancestors as $parent ) {
    43354335        $parent = get_post( $parent );
    4336         if ( $parent ) {
     4336        if ( $parent && $parent->post_name ) {
    43374337            $uri = $parent->post_name . '/' . $uri;
    43384338        }
Note: See TracChangeset for help on using the changeset viewer.