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 |
---|---|
1375 |
|
1376 | /** |
1377 | * Filter a term. |
1378 | * |
1379 | * @since 2.3.0 |
1380 | * |
1381 | * @param int|object $_term Term object or ID. |
1382 | * @param string $taxonomy The taxonomy slug. |
1383 | */ |
1384 | $_term = apply_filters( 'get_term', $_term, $taxonomy ); |
1385 |
|
1386 | /** |
1387 | * Filter a taxonomy. |
1388 | * |
1389 | * The dynamic portion of the filter name, `$taxonomy`, refers |
1390 | * to the taxonomy slug. |
1391 | * |
1392 | * @since 2.3.0 |
1393 | * |
Line | Code |
1463 | } |
1464 |
|
1465 | $term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = %s AND $field = %s LIMIT 1", $taxonomy, $value ) ); |
1466 | if ( ! $term ) |
1467 | return false; |
1468 |
|
1469 | wp_cache_add( $term->term_id, $term, $taxonomy ); |
1470 |
|
1471 | /** This filter is documented in wp-includes/taxonomy.php */ |
1472 | $term = apply_filters( 'get_term', $term, $taxonomy ); |
1473 |
|
1474 | /** This filter is documented in wp-includes/taxonomy.php */ |
1475 | $term = apply_filters( "get_$taxonomy", $term, $taxonomy ); |
1476 |
|
1477 | $term = sanitize_term($term, $taxonomy, $filter); |
1478 |
|
1479 | if ( $output == OBJECT ) { |
1480 | return $term; |
1481 | } elseif ( $output == ARRAY_A ) { |