From e041a3a8f3b7d8bb9c095946700741fc19e6cf26 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 1 Mar 2020 17:29:06 +0000 Subject: [PATCH] Docs: Use more specific type in parameter descriptions for `is_page()`, `is_single()`, `is_singular()`, and their `WP_Query` counterpart methods. Props marekdedic, shaharia.azam, shaampk1. Fixes #48354. See #48303. Built from https://develop.svn.wordpress.org/trunk@47402 git-svn-id: http://core.svn.wordpress.org/trunk@47189 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-query.php | 12 ++++++------ wp-includes/query.php | 12 ++++++------ wp-includes/version.php | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php index c2c38a0695..540201552c 100644 --- a/wp-includes/class-wp-query.php +++ b/wp-includes/class-wp-query.php @@ -3978,8 +3978,8 @@ class WP_Query { * * @since 3.1.0 * - * @param int|string|array $page Optional. Page ID, title, slug, path, or array of such - * to check against. Default empty. + * @param int|string|int[]|string[] $page Optional. Page ID, title, slug, path, or array of such + * to check against. Default empty. * @return bool Whether the query is for an existing single page. */ public function is_page( $page = '' ) { @@ -4085,8 +4085,8 @@ class WP_Query { * * @since 3.1.0 * - * @param int|string|array $post Optional. Post ID, title, slug, path, or array of such - * to check against. Default empty. + * @param int|string|int[]|string[] $post Optional. Post ID, title, slug, path, or array of such + * to check against. Default empty. * @return bool Whether the query is for an existing single post. */ public function is_single( $post = '' ) { @@ -4135,8 +4135,8 @@ class WP_Query { * * @since 3.1.0 * - * @param string|array $post_types Optional. Post type or array of post types - * to check against. Default empty. + * @param string|string[] $post_types Optional. Post type or array of post types + * to check against. Default empty. * @return bool Whether the query is for an existing single post * or any of the given post types. */ diff --git a/wp-includes/query.php b/wp-includes/query.php index 705bbb22c6..69055b3930 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -569,8 +569,8 @@ function is_month() { * * @global WP_Query $wp_query WordPress Query object. * - * @param int|string|array $page Optional. Page ID, title, slug, or array of such - * to check against. Default empty. + * @param int|string|int[]|string[] $page Optional. Page ID, title, slug, or array of such + * to check against. Default empty. * @return bool Whether the query is for an existing single page. */ function is_page( $page = '' ) { @@ -715,8 +715,8 @@ function is_search() { * * @global WP_Query $wp_query WordPress Query object. * - * @param int|string|array $post Optional. Post ID, title, slug, or array of such - * to check against. Default empty. + * @param int|string|int[]|string[] $post Optional. Post ID, title, slug, or array of such + * to check against. Default empty. * @return bool Whether the query is for an existing single post. */ function is_single( $post = '' ) { @@ -748,8 +748,8 @@ function is_single( $post = '' ) { * * @global WP_Query $wp_query WordPress Query object. * - * @param string|array $post_types Optional. Post type or array of post types - * to check against. Default empty. + * @param string|string[] $post_types Optional. Post type or array of post types + * to check against. Default empty. * @return bool Whether the query is for an existing single post * or any of the given post types. */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 8a311c631d..dea3639b17 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-beta3-47401'; +$wp_version = '5.4-beta3-47402'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.