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.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 1336 | * |
| 1337 | * The dynamic portion of the filter name, `$taxonomy`, refers |
| 1338 | * to the taxonomy slug. |
| 1339 | * |
| 1340 | * @since 2.3.0 |
| 1341 | * |
| 1342 | * @param int|object $_term Term object or ID. |
| 1343 | * @param string $taxonomy The taxonomy slug. |
| 1344 | */ |
| 1345 | $_term = apply_filters( "get_$taxonomy", $_term, $taxonomy ); |
| 1346 | $_term = sanitize_term($_term, $taxonomy, $filter); |
| 1347 | |
| 1348 | if ( $output == OBJECT ) { |
| 1349 | return $_term; |
| 1350 | } elseif ( $output == ARRAY_A ) { |
| 1351 | $__term = get_object_vars($_term); |
| 1352 | return $__term; |
| 1353 | } elseif ( $output == ARRAY_N ) { |
| 1354 | $__term = array_values(get_object_vars($_term)); |
| Line | Code |
| 1411 | if ( ! $term ) |
| 1412 | return false; |
| 1413 | |
| 1414 | wp_cache_add( $term->term_id, $term, $taxonomy ); |
| 1415 | |
| 1416 | /** This filter is documented in wp-includes/taxonomy.php */ |
| 1417 | $term = apply_filters( 'get_term', $term, $taxonomy ); |
| 1418 | |
| 1419 | /** This filter is documented in wp-includes/taxonomy.php */ |
| 1420 | $term = apply_filters( "get_$taxonomy", $term, $taxonomy ); |
| 1421 | |
| 1422 | $term = sanitize_term($term, $taxonomy, $filter); |
| 1423 | |
| 1424 | if ( $output == OBJECT ) { |
| 1425 | return $term; |
| 1426 | } elseif ( $output == ARRAY_A ) { |
| 1427 | return get_object_vars($term); |
| 1428 | } elseif ( $output == ARRAY_N ) { |
| 1429 | return array_values(get_object_vars($term)); |