wp_get_object_terms_args filter-hookWP 4.9.0

Filters arguments for retrieving object terms.

Usage

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(array)
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.

Changelog

Since 4.9.0 Introduced.

Where the hook is called

wp_get_object_terms()
wp_get_object_terms_args
wp-includes/taxonomy.php 2282
$args = apply_filters( 'wp_get_object_terms_args', $args, $object_ids, $taxonomies );

Where the hook is used in WordPress

Usage not found.