Make WordPress Core

Changeset 52131


Ignore:
Timestamp:
11/10/2021 09:09:30 PM (3 years ago)
Author:
davidbaumwald
Message:

Taxonomy: Document that the get_terms filter can have null for $taxonomies.

The get_terms filter currently documents that the filter passes an array as both the first and second parameters, which is normally true, except that the second can be null when not specified. This change updates the filter's docblock to indicate that the second parameter can also be of a null type.

Props dd32, audrasjb, mukesh27.
Fixes #54222.

File:
1 edited

Legend:

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

    r52094 r52131  
    13311331     *
    13321332     * @param array         $terms      Array of found terms.
    1333      * @param array         $taxonomies An array of taxonomies.
     1333     * @param array|null    $taxonomies An array of taxonomies if known.
    13341334     * @param array         $args       An array of get_terms() arguments.
    13351335     * @param WP_Term_Query $term_query The WP_Term_Query object.
Note: See TracChangeset for help on using the changeset viewer.