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).
Source
Changelog
Version | Description |
---|---|
4.6.0 | Introduced. |