get_terms_fields WordPress Filter Hook

The get_terms_fields hook is used to retrieve the value of a field from the terms table in the WordPress database. The terms table is used to store information about the terms in a taxonomy.

apply_filters( 'get_terms_fields', string[] $selects, array $args, string[] $taxonomies ) #

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.


Top ↑

Parameters

$selects

(string[])An array of fields to select for the terms query.

$args

(array)An array of term query arguments.

$taxonomies

(string[])An array of taxonomy names.


Top ↑

Source

File: wp-includes/class-wp-term-query.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.