Make WordPress Core

Ticket #15963: 15963.4.diff

File 15963.4.diff, 491 bytes (added by MikeHansenMe, 9 years ago)
  • src/wp-includes/post-functions.php

     
    41864186        $uri = $page->post_name;
    41874187
    41884188        foreach ( $page->ancestors as $parent ) {
    4189                 $uri = get_post( $parent )->post_name . '/' . $uri;
     4189                if ( 'publish' = get_post_status( $parent ) ) {
     4190                        $uri = $parent->post_name . '/' . $uri;
     4191                }
    41904192        }
    41914193
    41924194        return $uri;