Ticket #35084: 35084.4.diff
File 35084.4.diff, 977 bytes (added by , 7 years ago) |
---|
-
src/wp-includes/post.php
4300 4300 4301 4301 foreach ( $page->ancestors as $parent ) { 4302 4302 $parent = get_post( $parent ); 4303 if ( 'publish' === $parent->post_status) {4303 if (!empty( $parent ) ) { 4304 4304 $uri = $parent->post_name . '/' . $uri; 4305 4305 } 4306 4306 } -
tests/phpunit/tests/post.php
674 674 // try the child normally 675 675 $this->assertEquals( 'parent/child', get_page_uri( $child_id ) ); 676 676 677 // now delete the parent and check678 wp_delete_post( $parent_id );677 // now delete the parent from the database and check 678 wp_delete_post( $parent_id, true ); 679 679 $this->assertEquals( 'child', get_page_uri( $child_id ) ); 680 680 } 681 681