WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 767 | * |
| 768 | * Return a non-null value to bypass WordPress' default term queries. |
| 769 | * |
| 770 | * @since 5.3.0 |
| 771 | * |
| 772 | * @param array|null $terms Return an array of term data to short-circuit WP's term query, |
| 773 | * or null to allow WP queries to run normally. |
| 774 | * @param WP_Term_Query $query The WP_Term_Query instance, passed by reference. |
| 775 | */ |
| 776 | $this->terms = apply_filters_ref_array( 'terms_pre_query', array( $this->terms, &$this ) ); |
| 777 | |
| 778 | if ( null !== $this->terms ) { |
| 779 | return $this->terms; |
| 780 | } |
| 781 | |
| 782 | if ( $args['cache_results'] ) { |
| 783 | $cache_key = $this->generate_cache_key( $args, $this->request ); |
| 784 | $cache = wp_cache_get( $cache_key, 'term-queries' ); |
| 785 | |