apply_filters( ‘get_terms_fields’, string[] $selects, array $args, string[] $taxonomies )

In this article

Filters the fields to select in the terms query.

Description

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.

Parameters

$selectsstring[]
An array of fields to select for the terms query.
$argsarray
An array of term query arguments.
$taxonomiesstring[]
An array of taxonomy names.

Source

$fields = implode( ', ', apply_filters( 'get_terms_fields', $selects, $args, $taxonomies ) );

Changelog

VersionDescription
2.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.