Changeset 47865 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 05/29/2020 10:41:25 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r47611 r47865 914 914 * @since 4.4.0 `$taxonomy` is optional if `$field` is 'term_taxonomy_id'. Converted to return 915 915 * a WP_Term object if `$output` is `OBJECT`. 916 * @since 5.5.0 ID is an alias of id. 916 917 * 917 918 * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param. 918 919 * 919 * @param string $field Either 'slug', 'name', 'id' (term_id ), or 'term_taxonomy_id'920 * @param string $field Either 'slug', 'name', 'id' (term_id or ID), or 'term_taxonomy_id' 920 921 * @param string|int $value Search for this term value 921 922 * @param string $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'. … … 942 943 } 943 944 944 if ( 'id' === $field || 'term_id' === $field ) {945 if ( 'id' === $field || 'term_id' === $field || 'ID' === $field ) { 945 946 $term = get_term( (int) $value, $taxonomy, $output, $filter ); 946 947 if ( is_wp_error( $term ) || null === $term ) {
Note: See TracChangeset
for help on using the changeset viewer.