Make WordPress Core


Ignore:
Timestamp:
11/19/2020 03:18:28 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Use more specific type in parameter descriptions for in_category() and is_object_in_term().

This better aligns with is_category() and other conditional tags and their WP_Query counterpart methods.

Follow-up to [47402].

Props princeahmed.
Fixes #51825.

File:
1 edited

Legend:

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

    r49597 r49669  
    249249 * @since 2.7.0 The `$post` parameter was added.
    250250 *
    251  * @param int|string|array $category Category ID, name or slug, or array of said.
    252  * @param int|object       $post     Optional. Post to check instead of the current post.
     251 * @param int|string|int[]|string[] $category Category ID, name, slug, or array of such
     252 *                                            to check against.
     253 * @param int|object                $post     Optional. Post to check instead of the current post.
    253254 * @return bool True if the current post is in any of the given categories.
    254255 */
Note: See TracChangeset for help on using the changeset viewer.