get_term хук-фильтрWP 2.3.0

Filters a taxonomy term object.

The get_(taxonomy) hook is also available for targeting a specific taxonomy.

Использование

add_filter( 'get_term', 'wp_kama_get_term_filter', 10, 2 );

/**
 * Function for `get_term` filter-hook.
 * 
 * @param WP_Term $_term    Term object.
 * @param string  $taxonomy The taxonomy slug.
 *
 * @return WP_Term
 */
function wp_kama_get_term_filter( $_term, $taxonomy ){

	// filter...
	return $_term;
}
$_term(WP_Term)
Term object.
$taxonomy(строка)
The taxonomy slug.

Список изменений

С версии 2.3.0 Введена.
С версии 4.4.0 $_term is now a WP_Term object.

Где вызывается хук

get_term()
get_term
wp-includes/taxonomy.php 1014
$_term = apply_filters( 'get_term', $_term, $taxonomy );

Где используется хук в WordPress

Использование не найдено.