WordPress.org

Make WordPress Core

Ticket #35084: 35084.diff

File 35084.diff, 425 bytes (added by tharsheblows, 4 years ago)

change post status to check that it's not in the trash

  • wp-includes/post.php

     
    43004300
    43014301        foreach ( $page->ancestors as $parent ) {
    43024302                $parent = get_post( $parent );
    4303                 if ( 'publish' === $parent->post_status ) {
     4303                if ( 'trash' !== $parent->post_status ) {
    43044304                        $uri = $parent->post_name . '/' . $uri;
    43054305                }
    43064306        }