"> <?php foreach ($posts as $post) { setup_postdata($post); $av_content = get_post_meta(get_the_ID(), '_av_content'); if ($av_content) { $av_content = $av_content[0]; } $session = new ONA_Session(get_the_ID()); ?> <a href="<?php the_permalink(); ?> "> <?php if ($session->get_session_type_name() == '') { $session_type = "Other"; } else { $session_type = $session->get_session_type_name(); } ?> <li class="single-session <?php echo $session_type; ?> "> <?php if ($av_content) { ?> <div class="av_content"> <?php if ($av_content['audio']) {
if ($now < $session->get_start_time() - 300) { $time = 'before'; } else { if ($now > $session->get_end_time() + 300) { $time = 'past'; } else { $time = 'during'; } } ?> <article class="post session"> <ul class="session-meta"> <li class="track"> <div class="<?php echo $session->get_session_type_name(); ?> "><?php echo $session->get_session_type_name() ? str_replace('-', ' ', $session->get_session_type_name()) : 'Other'; ?> </div> </li> <?php if ($session->get_session_format_name() != "") { ?> <li> <?php echo $session->get_session_format_name(); ?> </li> <?php