?> " scope="col"><?php echo $col; ?> </th> <?php $n++; } ?> </tr> </thead> <tbody> <?php $style = ''; foreach ($wp_tickets_search->get_results() as $ticket) { $ticket_obj = new TC_Ticket($ticket->ID); $ticket_object = apply_filters('tc_ticket_object_details', $ticket_obj->details); $style = ' class="alternate"' == $style ? '' : ' class="alternate"'; ?> <tr id='user-<?php echo $ticket_object->ID; ?> ' <?php echo $style; ?> > <!--<th scope='row' class='check-column'> <input type='checkbox' name='events[]' id='user_<?php echo $ticket_object->{$key}; ?>
public function show_tickets_left_attributes() { ?> <table id="tickets-left-shortcode" class="shortcode-table" style="display:none"> <tr> <th scope="row"><?php _e('Ticket Type', 'tc'); ?> </th> <td> <select name="ticket_type_id"> <?php $wp_tickets_search = new TC_Tickets_Search('', '', -1); foreach ($wp_tickets_search->get_results() as $event) { $ticket = new TC_Ticket($event->ID); ?> <option value="<?php echo esc_attr($ticket->details->ID); ?> "><?php echo $ticket->details->post_title; ?> </option> <?php } ?> </select> </td> </tr> </table> <?php }
function tc_get_ticket_types($field_name = '', $post_id = '') { $wp_tickets_search = new TC_Tickets_Search('', '', -1); if ($post_id !== '') { $currently_selected = get_post_meta($post_id, $field_name, true); } else { $currently_selected = ''; } ?> <select name="<?php echo $field_name; ?> _post_meta"> <option value="" <?php selected($currently_selected, '', true); ?> ><?php _e('All', 'tc'); ?> </option> <?php foreach ($wp_tickets_search->get_results() as $ticket) { $ticket_obj = new TC_Ticket($ticket->ID); $ticket_object = $ticket_obj->details; $event_id = $ticket_object->event_name; $event_obj = new TC_Event($event_id); ?> <option value="<?php echo $ticket_object->ID; ?> " <?php selected($currently_selected, $ticket_object->ID, true); ?> ><?php echo $ticket_object->post_title . ' (' . $event_obj->details->post_title . ')'; ?> </option> <?php } ?> </select> <?php }