get_terms_fields
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
apply_filters( 'get_terms_fields', string[] $selects, array $args, string[] $taxonomies )
Описание
Списки полей, изменённые с помощью этого фильтра, влияют на возвращаемые функцией поля терминов только тогда, когда параметр $fields установлен в 'count' или 'all'. Во всех остальных случаях поля терминов в массиве результатов определяются исключительно параметром $fields.
Использование этого фильтра может привести к непредсказуемому поведению и не рекомендуется.
Оригинал (английский)
Field lists modified using this filter will only modify the term fields returned by the function when the $fields parameter set to ‘count’ or ‘all’. In all other cases, the term fields in the results array will be determined by the $fields parameter alone.
Use of this filter can result in unpredictable behavior, and is not recommended.
Фильтруемое значение
Параметры
$selects
string[]
обязательный
$args
array
обязательный
$taxonomies
string[]
обязательный
Исходный код
wp-includes/class-wp-term-query.php:696
$fields = implode( ', ', apply_filters( 'get_terms_fields', $selects, $args, $taxonomies ) );
История изменений
| Версия | Описание |
|---|---|
| 2.8.0 | Introduced. |

