WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/01/2020 05:27:03 PM (16 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r47401 r47402  
    570570 * @global WP_Query $wp_query WordPress Query object.
    571571 *
    572  * @param int|string|array $page Optional. Page ID, title, slug, or array of such
    573  *                               to check against. Default empty.
     572 * @param int|string|int[]|string[] $page Optional. Page ID, title, slug, or array of such
     573 *                                        to check against. Default empty.
    574574 * @return bool Whether the query is for an existing single page.
    575575 */
     
    716716 * @global WP_Query $wp_query WordPress Query object.
    717717 *
    718  * @param int|string|array $post Optional. Post ID, title, slug, or array of such
    719  *                               to check against. Default empty.
     718 * @param int|string|int[]|string[] $post Optional. Post ID, title, slug, or array of such
     719 *                                        to check against. Default empty.
    720720 * @return bool Whether the query is for an existing single post.
    721721 */
     
    749749 * @global WP_Query $wp_query WordPress Query object.
    750750 *
    751  * @param string|array $post_types Optional. Post type or array of post types
    752  *                                 to check against. Default empty.
     751 * @param string|string[] $post_types Optional. Post type or array of post types
     752 *                                    to check against. Default empty.
    753753 * @return bool Whether the query is for an existing single post
    754754 *              or any of the given post types.
Note: See TracChangeset for help on using the changeset viewer.