Changeset 25160
- Timestamp:
- 08/29/2013 03:07:59 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r25130 r25160 312 312 $children = get_posts( $r ); 313 313 314 if ( ! $children )314 if ( ! $children ) 315 315 return $kids; 316 317 if ( ! empty( $r['fields'] ) ) 318 return $children; 316 319 317 320 update_post_cache($children); -
trunk/tests/tests/post/getPages.php
r25002 r25160 118 118 $this->assertEquals( 5, count( $matches[0] ) ); 119 119 } 120 121 /** 122 * @ticket 22208 123 */ 124 function test_get_chidren_fields_ids() { 125 $post_id = $this->factory->post->create(); 126 $child_ids = $this->factory->post->create_many( 5, array( 'post_parent' => $post_id ) ); 127 128 $post_ids = get_children( array( 'fields' => 'ids', 'post_parent' => $post_id ) ); 129 $this->assertEqualSets( $child_ids, $post_ids ); 130 } 120 131 }
Note: See TracChangeset
for help on using the changeset viewer.