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/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.
Note: See TracChangeset for help on using the changeset viewer.