/** * Echo a member-list. This function can be overwritten by other views * to customize the list. * * @since 1.0.0 * * @param array $members List of members to display. */ protected function members_panel_data($members, $membership_id) { $item = 0; $max_items = 10; $class = ''; $status_types = MS_Model_Relationship::get_status_types(); ?> <table class="ms-list-table widefat"> <thead> <th><?php _e('Member', 'membership2'); ?> </th> <th><?php _e('Since', 'membership2'); ?> </th> <th><?php _e('Status', 'membership2'); ?> </th> </thead> <tbody> <?php foreach ($this->data['members'] as $member) { $item += 1; if ($item > $max_items) { break; } $class = $class == 'alternate' ? '' : 'alternate'; $subscription = $member->get_subscription($membership_id); ?> <tr class="<?php echo esc_attr($class); ?> "> <td><?php echo esc_html($member->username); ?> </td> <td><?php echo esc_html(MS_Helper_Period::format_date($subscription->start_date)); ?> </td> <td><?php echo esc_html($status_types[$subscription->status]); ?> </td> </tr> <?php } ?> </tbody> </table> <?php }