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 |
---|---|
692 | * |
693 | * Return a non-null value to bypass WordPress' default term queries. |
694 | * |
695 | * @since 5.3.0 |
696 | * |
697 | * @param array|null $terms Return an array of term data to short-circuit WP's term query, |
698 | * or null to allow WP queries to run normally. |
699 | * @param WP_Term_Query $this The WP_Term_Query instance, passed by reference. |
700 | */ |
701 | $this->terms = apply_filters_ref_array( 'terms_pre_query', array( $this->terms, &$this ) ); |
702 |
|
703 | if ( null !== $this->terms ) { |
704 | return $this->terms; |
705 | } |
706 |
|
707 | // $args can be anything. Only use the args defined in defaults to compute the key. |
708 | $key = md5( serialize( wp_array_slice_assoc( $args, array_keys( $this->query_var_defaults ) ) ) . serialize( $taxonomies ) . $this->request ); |
709 | $last_changed = wp_cache_get_last_changed( 'terms' ); |
710 | $cache_key = "get_terms:$key:$last_changed"; |