From 56dc52876e2d631602846bee4afbf415f810c61f Mon Sep 17 00:00:00 2001 From: Igor Rozum Date: Mon, 7 Sep 2026 19:18:19 -0400 Subject: [PATCH 1/2] Docs: Correct wp_list_pages() include param type and description --- src/wp-includes/post-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 86ea3eca58271..c6c8cbe7e9703 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -1288,7 +1288,7 @@ function wp_dropdown_pages( $args = '' ) { * the given n depth). Default 0. * @type bool $echo Whether or not to echo the list of pages. Default true. * @type string $exclude Comma-separated list of page IDs to exclude. Default empty. - * @type array $include Comma-separated list of page IDs to include. Default empty. + * @type int[]|string $include Array or comma-separated list of page IDs to include. Default empty array. * @type string $link_after Text or HTML to follow the page link label. Default null. * @type string $link_before Text or HTML to precede the page link label. Default null. * @type string $post_type Post type to query for. Default 'page'. From 6ad47e07e4e9887f4fcbfe4838a1075df3e93ba7 Mon Sep 17 00:00:00 2001 From: Igor Rozum Date: Mon, 7 Sep 2026 19:18:23 -0400 Subject: [PATCH 2/2] Tests: Cover wp_list_pages() include accepting an array of page IDs --- tests/phpunit/tests/post/wpListPages.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/phpunit/tests/post/wpListPages.php b/tests/phpunit/tests/post/wpListPages.php index f059591219b1a..123356de7b7e8 100644 --- a/tests/phpunit/tests/post/wpListPages.php +++ b/tests/phpunit/tests/post/wpListPages.php @@ -437,6 +437,22 @@ public function test_wp_list_pages_include() { $this->assertSameIgnoreEOL( $expected, wp_list_pages( $args ) ); } + /** + * @ticket 66052 + */ + public function test_wp_list_pages_include_accepts_array_of_ids() { + $args = array( + 'echo' => false, + 'include' => array( self::$parent_1, self::$parent_3 ), + ); + + $expected = ''; + + $this->assertSameIgnoreEOL( $expected, wp_list_pages( $args ) ); + } + public function test_wp_list_pages_exclude_tree() { $args = array( 'echo' => false,