wp_get_object_terms_args
Filters arguments for retrieving object terms.
Использование
add_filter( 'wp_get_object_terms_args', 'wp_kama_get_object_terms_args_filter', 10, 3 ); /** * Function for `wp_get_object_terms_args` filter-hook. * * @param array $args An array of arguments for retrieving terms for the given object(s). See {@see wp_get_object_terms()} for details. * @param int[] $object_ids Array of object IDs. * @param string[] $taxonomies Array of taxonomy names to retrieve terms from. * * @return array */ function wp_kama_get_object_terms_args_filter( $args, $object_ids, $taxonomies ){ // filter... return $args; }
- $args(массив)
- An array of arguments for retrieving terms for the given object(s). See {@see wp_get_object_terms()} for details.
- $object_ids(int[])
- Array of object IDs.
- $taxonomies(string[])
- Array of taxonomy names to retrieve terms from.
Список изменений
С версии 4.9.0 | Введена. |
Где вызывается хук
wp-includes/taxonomy.php 2290
$args = apply_filters( 'wp_get_object_terms_args', $args, $object_ids, $taxonomies );