wphooks.info - get_object_terms

get_object_terms

The hook occurs in the following file:

wp-includes/taxonomy.php:
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
	 * Filters the terms for a given object or objects.
	 *
	 * @since 4.2.0
	 *
	 * @param array $terms      An array of terms for the given object or objects.
	 * @param array $object_ids Array of object IDs for which `$terms` were retrieved.
	 * @param array $taxonomies Array of taxonomies from which `$terms` were retrieved.
	 * @param array $args       An array of arguments for retrieving terms for the given
	 *                          object(s). See wp_get_object_terms() for details.
	 */
	$terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomies, $args );

	$object_ids = implode( ',', $object_ids );
	$taxonomies = "'" . implode( "', '", array_map( 'esc_sql', $taxonomies ) ) . "'";

	/**
	 * Filters the terms for a given object or objects.
	 *
	 * The `$taxonomies` parameter passed to this filter is formatted as a SQL fragment. The
	 * {@see 'get_object_terms'} filter is recommended as an alternative.