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 |
|---|---|
| 1597 | * @since 6.0.0 |
| 1598 | * |
| 1599 | * @param array $defaults An array of arguments passed to get_terms(). |
| 1600 | * @param int|string $term The term to check. Accepts term ID, slug, or name. |
| 1601 | * @param string $taxonomy The taxonomy name to use. An empty string indicates |
| 1602 | * the search is against all taxonomies. |
| 1603 | * @param int|null $parent_term ID of parent term under which to confine the exists search. |
| 1604 | * Null indicates the search is unconfined. |
| 1605 | */ |
| 1606 | $defaults = apply_filters( 'term_exists_default_query_args', $defaults, $term, $taxonomy, $parent_term ); |
| 1607 | |
| 1608 | if ( is_int( $term ) ) { |
| 1609 | if ( 0 === $term ) { |
| 1610 | return 0; |
| 1611 | } |
| 1612 | $args = wp_parse_args( array( 'include' => array( $term ) ), $defaults ); |
| 1613 | $terms = get_terms( $args ); |
| 1614 | } else { |
| 1615 | $term = trim( wp_unslash( $term ) ); |