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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47402 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-03-01 17:27:03 +00:00
parent 6c33566c05
commit 3feb885ec3
2 changed files with 12 additions and 12 deletions

View File

@ -3978,8 +3978,8 @@ class WP_Query {
* *
* @since 3.1.0 * @since 3.1.0
* *
* @param int|string|array $page Optional. Page ID, title, slug, path, or array of such * @param int|string|int[]|string[] $page Optional. Page ID, title, slug, path, or array of such
* to check against. Default empty. * to check against. Default empty.
* @return bool Whether the query is for an existing single page. * @return bool Whether the query is for an existing single page.
*/ */
public function is_page( $page = '' ) { public function is_page( $page = '' ) {
@ -4085,8 +4085,8 @@ class WP_Query {
* *
* @since 3.1.0 * @since 3.1.0
* *
* @param int|string|array $post Optional. Post ID, title, slug, path, or array of such * @param int|string|int[]|string[] $post Optional. Post ID, title, slug, path, or array of such
* to check against. Default empty. * to check against. Default empty.
* @return bool Whether the query is for an existing single post. * @return bool Whether the query is for an existing single post.
*/ */
public function is_single( $post = '' ) { public function is_single( $post = '' ) {
@ -4135,8 +4135,8 @@ class WP_Query {
* *
* @since 3.1.0 * @since 3.1.0
* *
* @param string|array $post_types Optional. Post type or array of post types * @param string|string[] $post_types Optional. Post type or array of post types
* to check against. Default empty. * to check against. Default empty.
* @return bool Whether the query is for an existing single post * @return bool Whether the query is for an existing single post
* or any of the given post types. * or any of the given post types.
*/ */

View File

@ -569,8 +569,8 @@ function is_month() {
* *
* @global WP_Query $wp_query WordPress Query object. * @global WP_Query $wp_query WordPress Query object.
* *
* @param int|string|array $page Optional. Page ID, title, slug, or array of such * @param int|string|int[]|string[] $page Optional. Page ID, title, slug, or array of such
* to check against. Default empty. * to check against. Default empty.
* @return bool Whether the query is for an existing single page. * @return bool Whether the query is for an existing single page.
*/ */
function is_page( $page = '' ) { function is_page( $page = '' ) {
@ -715,8 +715,8 @@ function is_search() {
* *
* @global WP_Query $wp_query WordPress Query object. * @global WP_Query $wp_query WordPress Query object.
* *
* @param int|string|array $post Optional. Post ID, title, slug, or array of such * @param int|string|int[]|string[] $post Optional. Post ID, title, slug, or array of such
* to check against. Default empty. * to check against. Default empty.
* @return bool Whether the query is for an existing single post. * @return bool Whether the query is for an existing single post.
*/ */
function is_single( $post = '' ) { function is_single( $post = '' ) {
@ -748,8 +748,8 @@ function is_single( $post = '' ) {
* *
* @global WP_Query $wp_query WordPress Query object. * @global WP_Query $wp_query WordPress Query object.
* *
* @param string|array $post_types Optional. Post type or array of post types * @param string|string[] $post_types Optional. Post type or array of post types
* to check against. Default empty. * to check against. Default empty.
* @return bool Whether the query is for an existing single post * @return bool Whether the query is for an existing single post
* or any of the given post types. * or any of the given post types.
*/ */