wphooks.info - wp_get_object_terms_args

wp_get_object_terms_args

*** New in v4.9 ***

The hook occurs in the following file:

wp-includes/taxonomy.php:
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
	/**
	 * Filter arguments for retrieving object terms.
	 *
	 * @since 4.9.0
	 *
	 * @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|array    $object_ids Object ID or array of IDs.
	 * @param string|array $taxonomies The taxonomies to retrieve terms from.
	 */
	$args = apply_filters( 'wp_get_object_terms_args', $args, $object_ids, $taxonomies );

	/*
	 * When one or more queried taxonomies is registered with an 'args' array,
	 * those params override the `$args` passed to this function.
	 */
	$terms = array();
	if ( count( $taxonomies ) > 1 ) {
		foreach ( $taxonomies as $index => $taxonomy ) {
			$t = get_taxonomy( $taxonomy );