get_object_terms хук-фильтр . WP 4.2.0
Filters the terms for a given object or objects.
Использование
add_filter( 'get_object_terms', 'filter_function_name_9067', 10, 4 ); function filter_function_name_9067( $terms, $object_ids, $taxonomies, $args ){ // filter... return $terms; }
- $terms(WP_Term[])
- Array of terms for the given object or objects.
- $object_ids(число[])
- Array of object IDs for which terms were retrieved.
- $taxonomies(строка[])
- Array of taxonomy names from which terms were retrieved.
- $args(массив)
- Array of arguments for retrieving terms for the given object(s). See wp_get_object_terms() for details.
Список изменений
С версии 4.2.0 | Введена. |
Где вызывается хук
wp-includes/taxonomy.php 2134
$terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomies, $args );