Changeset 62041
- Timestamp:
- 03/17/2026 09:08:46 PM (2 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
src/wp-includes/post.php (modified) (1 diff)
-
tests/phpunit/tests/post/getPosts.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r61833 r62041 2600 2600 * @see WP_Query::parse_query() 2601 2601 * 2602 * @param array $args { 2603 * Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all available arguments. 2602 * @param array|string $args { 2603 * Optional. Array or query string of arguments to retrieve posts. 2604 * See WP_Query::parse_query() for all available arguments. 2604 2605 * 2605 2606 * @type int $numberposts Total number of posts to retrieve. Is an alias of `$posts_per_page` -
trunk/tests/phpunit/tests/post/getPosts.php
r46586 r62041 164 164 $this->assertSame( array( $p3 ), $found ); 165 165 } 166 167 /** 168 * Verifies that get_posts() accepts a query string for the `$args` parameter. 169 * 170 * @ticket 64813 171 */ 172 public function test_should_accept_query_string_args(): void { 173 self::factory()->post->create(); 174 $second_post_id = self::factory()->post->create(); 175 $found_post_ids = get_posts( 'numberposts=1&fields=ids' ); 176 177 $this->assertSame( array( $second_post_id ), $found_post_ids ); 178 } 166 179 }
Note: See TracChangeset
for help on using the changeset viewer.