Give up on making uninterrupted hierarchies work in get_page_children() for now, reverts [30159], [30246], [30636].

Props boonebgorges.
See #14477.


git-svn-id: https://develop.svn.wordpress.org/trunk@30735 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-12-04 00:23:47 +00:00
parent 86c494d1b5
commit e37fb988b1
2 changed files with 6 additions and 30 deletions

View File

@@ -270,18 +270,4 @@ class Tests_Post_getPages extends WP_UnitTestCase {
$exclude6 = get_pages( array( 'exclude_tree' => array( $post_id1, $post_id3 ) ) );
$this->assertCount( 2, $exclude6 );
}
/**
* @ticket 14477
*/
function test_get_pages_interrupted_hierarchy() {
$page1 = $this->factory->post->create( array( 'post_type' => 'page' ) );
$page2 = $this->factory->post->create( array( 'post_type' => 'page', 'post_parent' => $page1 ) );
add_post_meta( $page2, 'color', 'red' );
$page3 = $this->factory->post->create( array( 'post_type' => 'page', 'post_parent' => $page2 ) );
add_post_meta( $page3, 'color', 'blue' );
$pages = get_pages( array( 'child_of' => $page1, 'meta_key' => 'color', 'meta_value' => 'blue' ) );
$this->assertEqualSets( array( $page3 ), wp_list_pluck( $pages, 'ID' ) );
}
}