(taxonomy)_(field) хук-фильтрWP 2.3.0

Filters the taxonomy field sanitized for display.

The dynamic portions of the filter name, $taxonomy, and $field, refer to the taxonomy slug and taxonomy field, respectively.

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

add_filter( '(taxonomy)_(field)', 'wp_kama_taxonomy_field_filter', 10, 3 );

/**
 * Function for `(taxonomy)_(field)` filter-hook.
 * 
 * @param mixed  $value   Value of the taxonomy field.
 * @param int    $term_id Term ID.
 * @param string $context Context to retrieve the taxonomy field value.
 *
 * @return mixed
 */
function wp_kama_taxonomy_field_filter( $value, $term_id, $context ){

	// filter...
	return $value;
}
$value(разное)
Value of the taxonomy field.
$term_id(int)
Term ID.
$context(строка)
Context to retrieve the taxonomy field value.

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

С версии 2.3.0 Введена.

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

sanitize_term_field()
(taxonomy)_(field)
wp-includes/taxonomy.php 1889
$value = apply_filters( "{$taxonomy}_{$field}", $value, $term_id, $context );

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

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