mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 12:44:31 +00:00
Move checks for post_type being an array inline. See [25291], [25292], #18614.
git-svn-id: https://develop.svn.wordpress.org/trunk@25312 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -699,16 +699,12 @@ class Tests_Query_Conditionals extends WP_UnitTestCase {
|
||||
$this->go_to( "/$cpt_name/" );
|
||||
$this->assertQueryTrue( 'is_post_type_archive', 'is_archive' );
|
||||
$this->assertEquals( get_queried_object(), get_post_type_object( $cpt_name ) );
|
||||
$this->assertEquals( get_queried_object(), get_post_type_object( array( $cpt_name ) ) );
|
||||
$this->assertEquals( get_queried_object(), get_post_type_object( array( $cpt_name, 'post' ) ) );
|
||||
|
||||
add_action( 'pre_get_posts', array( $this, 'pre_get_posts_with_type_array' ) );
|
||||
|
||||
$this->go_to( "/$cpt_name/" );
|
||||
$this->assertQueryTrue( 'is_post_type_archive', 'is_archive' );
|
||||
$this->assertEquals( get_queried_object(), get_post_type_object( 'post' ) );
|
||||
$this->assertEquals( get_queried_object(), get_post_type_object( array( 'post' ) ) );
|
||||
$this->assertEquals( get_queried_object(), get_post_type_object( array( 'post', $cpt_name ) ) );
|
||||
|
||||
remove_action( 'pre_get_posts', array( $this, 'pre_get_posts_with_type_array' ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user