WordPress.org

Make WordPress Core

Changeset 47402


Ignore:
Timestamp:
03/01/2020 05:27:03 PM (9 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.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r47401 r47402  
    39793979     * @since 3.1.0
    39803980     *
    3981      * @param int|string|array $page Optional. Page ID, title, slug, path, or array of such
    3982      *                               to check against. Default empty.
     3981     * @param int|string|int[]|string[] $page Optional. Page ID, title, slug, path, or array of such
     3982     *                                        to check against. Default empty.
    39833983     * @return bool Whether the query is for an existing single page.
    39843984     */
     
    40864086     * @since 3.1.0
    40874087     *
    4088      * @param int|string|array $post Optional. Post ID, title, slug, path, or array of such
    4089      *                               to check against. Default empty.
     4088     * @param int|string|int[]|string[] $post Optional. Post ID, title, slug, path, or array of such
     4089     *                                        to check against. Default empty.
    40904090     * @return bool Whether the query is for an existing single post.
    40914091     */
     
    41364136     * @since 3.1.0
    41374137     *
    4138      * @param string|array $post_types Optional. Post type or array of post types
    4139      *                                 to check against. Default empty.
     4138     * @param string|string[] $post_types Optional. Post type or array of post types
     4139     *                                    to check against. Default empty.
    41404140     * @return bool Whether the query is for an existing single post
    41414141     *              or any of the given post types.
  • 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.