Make WordPress Core


Ignore:
Timestamp:
12/04/2014 12:23:47 AM (10 years ago)
Author:
wonderboymusic
Message:

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

Props boonebgorges.
See #14477.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/getPages.php

    r30337 r30735  
    271271        $this->assertCount( 2, $exclude6 );
    272272    }
    273 
    274     /**
    275      * @ticket 14477
    276      */
    277     function test_get_pages_interrupted_hierarchy() {
    278         $page1 = $this->factory->post->create( array( 'post_type' => 'page' ) );
    279         $page2 = $this->factory->post->create( array( 'post_type' => 'page', 'post_parent' => $page1 ) );
    280         add_post_meta( $page2, 'color', 'red' );
    281         $page3 = $this->factory->post->create( array( 'post_type' => 'page', 'post_parent' => $page2 ) );
    282         add_post_meta( $page3, 'color', 'blue' );
    283 
    284         $pages = get_pages( array( 'child_of' => $page1, 'meta_key' => 'color', 'meta_value' => 'blue' ) );
    285         $this->assertEqualSets( array( $page3 ), wp_list_pluck( $pages, 'ID' ) );
    286     }
    287273}
Note: See TracChangeset for help on using the changeset viewer.