The Events Calendar Improvement #72

Open
opened 2024-10-29 13:24:11 +01:00 by linos · 0 comments
Owner

Make use of:

https://docs.theeventscalendar.com/reference/classes/tribe__events__api/get_event_terms/

for getting all tags/terms for an event!

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;
}
Make use of: https://docs.theeventscalendar.com/reference/classes/tribe__events__api/get_event_terms/ for getting all tags/terms for an event! ```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; } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Event-Federation/wordpress-event-bridge-for-activitypub#72
No description provided.