Tribe__Events__API::get_event_terms( int $event_id, array $args = array() )

See also


Top ↑

Parameters

$event_id

(int) (Required) The event post ID

$args

(array) (Optional) An array of arguments supported by the wp_get_object_terms function.

Default value: array()


Top ↑

Return

(array) An associative array of terms in the [ <taxonomy> => [ <term_1>, <term_2>, ...], ...] format.


Top ↑

Source

File: src/Tribe/API.php

		public static function get_event_terms( $event_id, array $args = array() ) {
			$terms = array();
			foreach ( get_post_taxonomies( $event_id ) as $taxonomy ) {
				$tax_terms = wp_get_object_terms( $event_id, $taxonomy, $args );
				$terms[ $taxonomy ] = $tax_terms;
			}

			return $terms;
		}

Top ↑

Changelog

Changelog
Version Description
4.5 Introduced.