Make WordPress Core

Changeset 51731


Ignore:
Timestamp:
09/05/2021 11:05:58 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Сlarify that term_id is a valid value for the $field parameter of get_term_by().

As term_id is the actual property name of the WP_Term, it should appear first and we should make it more clear that id and ID are aliases.

Follow-up to [6254], [25334], [38677], [47865], [47870].

Props gazchap, audrasjb.
Fixes #54065.

File:
1 edited

Legend:

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

    r51327 r51731  
    10071007 * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param.
    10081008 *
    1009  * @param string     $field    Either 'slug', 'name', 'id' or 'ID' (term_id), or 'term_taxonomy_id'.
     1009 * @param string     $field    Either 'slug', 'name', 'term_id' (or 'id', 'ID'), or 'term_taxonomy_id'.
    10101010 * @param string|int $value    Search for this term value.
    10111011 * @param string     $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'.
Note: See TracChangeset for help on using the changeset viewer.