Tribe__Tickets_Plus__Attendees_List::render( int|WP_Post $event = null, int $limit = 20 )
Includes the Attendees List HTML
Contents
Parameters
- $event
-
(int|WP_Post) (Optional) The event or event ID.
Default value: null
- $limit
-
(int) (Optional) Limit to how many to show.
Default value: 20
Return
(void)
Source
File: src/Tribe/Attendees_List.php
public function render( $event = null, $limit = 20 ) {
$event = get_post( $event );
if ( ! $event instanceof WP_Post ) {
$event = get_post();
}
if (
'tribe_tickets_before_front_end_ticket_form' === current_filter() &&
self::is_hidden_on( $event )
) {
return;
}
$attendees_list = $this->get_attendees( $event->ID, $limit );
if ( ! $attendees_list ) {
return;
}
$attendees_total = count( $attendees_list );
if ( empty( $attendees_total ) ) {
return;
}
include_once Tribe__Tickets_Plus__Main::instance()->get_template_hierarchy( 'attendees-list' );
}
Changelog
| Version | Description |
|---|---|
| 5.10.1 | Introduced. |