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
This commit is contained in:
Sergey Biryukov 2020-03-01 17:29:06 +00:00
parent abce2d8d6c
commit e041a3a8f3
3 changed files with 13 additions and 13 deletions

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.