pre_get_terms WordPress Action Hook

The pre_get_terms hook is a hook that is called before WordPress retrieves terms from the database. It is used to modify the query that is used to get terms, and can be used to change the order in which terms are retrieved, or to limit the number of terms that are retrieved.

do_action_ref_array( 'pre_get_terms', WP_Term_Query $query ) #

Fires before terms are retrieved.


Parameters

$query

(WP_Term_Query)Current instance of WP_Term_Query (passed by reference).


Top ↑

Source

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

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.6.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.