WordPress.org

Make WordPress Core

Changeset 49669


Ignore:
Timestamp:
11/19/2020 03:18:28 PM (8 days 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.

Location:
trunk/src/wp-includes
Files:
2 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 */
  • trunk/src/wp-includes/taxonomy.php

    r49612 r49669  
    45674567 * @since 2.7.0
    45684568 *
    4569  * @param int              $object_id ID of the object (post ID, link ID, ...).
    4570  * @param string           $taxonomy  Single taxonomy name.
    4571  * @param int|string|array $terms     Optional. Term term_id, name, slug or array of said. Default null.
     4569 * @param int                       $object_id ID of the object (post ID, link ID, ...).
     4570 * @param string                    $taxonomy  Single taxonomy name.
     4571 * @param int|string|int[]|string[] $terms     Optional. Term ID, name, slug, or array of such
     4572 *                                             to check against. Default null.
    45724573 * @return bool|WP_Error WP_Error on input error.
    45734574 */
Note: See TracChangeset for help on using the changeset viewer.