From a52bc208ba436a6f30c336d867eb9112ce9705b2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 5 Sep 2021 11:05:58 +0000 Subject: [PATCH] =?UTF-8?q?Docs:=20=D0=A1larify=20that=20`term=5Fid`=20is?= =?UTF-8?q?=20a=20valid=20value=20for=20the=20`$field`=20parameter=20of=20?= =?UTF-8?q?`get=5Fterm=5Fby()`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. git-svn-id: https://develop.svn.wordpress.org/trunk@51731 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 5d9cf1ad2c..4014a62655 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -1006,7 +1006,7 @@ function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) { * * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param. * - * @param string $field Either 'slug', 'name', 'id' or 'ID' (term_id), or 'term_taxonomy_id'. + * @param string $field Either 'slug', 'name', 'term_id' (or 'id', 'ID'), or 'term_taxonomy_id'. * @param string|int $value Search for this term value. * @param string $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'. * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which