Changeset 38145
- Timestamp:
- 07/23/2016 10:04:20 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r38125 r38145 4334 4334 foreach ( $page->ancestors as $parent ) { 4335 4335 $parent = get_post( $parent ); 4336 if ( $parent ) {4336 if ( $parent && $parent->post_name ) { 4337 4337 $uri = $parent->post_name . '/' . $uri; 4338 4338 } -
trunk/tests/phpunit/tests/post/getPageUri.php
r38144 r38145 48 48 49 49 /** 50 * @ticket 36174 51 */ 52 function test_get_page_uri_with_a_draft_parent_with_empty_slug() { 53 $parent_id = self::factory()->post->create( array( 'post_name' => 'parent' ) ); 54 $child_id = self::factory()->post->create( array( 'post_name' => 'child', 'post_parent' => $parent_id ) ); 55 56 wp_update_post( array( 'ID' => $parent_id, 'post_name' => '', 'post_status' => 'draft' ) ); 57 58 $this->assertEquals( 'child', get_page_uri( $child_id ) ); 59 } 60 61 /** 50 62 * @ticket 26284 51 63 */
Note: See TracChangeset
for help on using the changeset viewer.