Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Content Template for the [ESPRESSO_EVENT_ATTENDEES] shortcode
- *
- * @package Event Espresso
- * @subpackage templates
- * @since 4.6.29
- * @author Darren Ethier
- *
- * Template Args that are available in this template
- * @type EE_Attendee $contact
- * @type bool $show_gravatar whether to show gravatar or not.
- */
- $custom_question_output = '';
- if( $contact instanceof EE_Attendee ) {
- $prev_answer_value = EEM_Answer::instance()->get_var(
- array(
- array(
- 'Registration.ATT_ID' => $contact->ID(),
- 'Registration.EVT_ID' => $event->ID(),
- 'QST_ID' => 11 // replace with custom question's ID
- ),
- 'order_by' => array(
- 'ANS_ID' => 'DESC'
- ),
- 'limit' => 1
- ),
- 'ANS_value' );
- if( $prev_answer_value ) {
- $custom_question_output = $prev_answer_value . ' - ';
- }
- }
- ?>
- <?php do_action( 'AHEE__content-espresso_event_attendees__before', $contact, $show_gravatar ); ?>
- <li><?php echo $custom_question_output . $contact->lname() . ' ' . $contact->fname(); ?></li>
- <?php do_action( 'AHEE__content-espresso_event_attendees__after', $contact, $show_gravatar ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement