web/wp-content/plugins/gigs-calendar/templates/basic/upcoming-widget.php
branchwordpress
changeset 112 fb7cd02b9848
parent 111 6b96085291d7
child 123 561aa6d282f6
equal deleted inserted replaced
111:6b96085291d7 112:fb7cd02b9848
     1 <?php if ( count($gigs) ) : ?>
       
     2 	<ul class="gigs">
       
     3 		<?php foreach ( $gigs as $g ) : 
       
     4 			$link = array();
       
     5 			foreach ( $args['link'] as $f ) {
       
     6 				switch ( $f ) {
       
     7 					case 'city': 
       
     8 						$link[] = $g->cityState;
       
     9 						break;
       
    10 					case 'venue':
       
    11 						$link[] = $g->name;
       
    12 						break;
       
    13 					case 'eventName':
       
    14 						$link[] = $g->eventName;
       
    15 						break;
       
    16 				}
       
    17 			}
       
    18 			$link = array_unique($link);
       
    19 			foreach ( $link  as $key => $value ) {
       
    20 				if ( empty($value) ) unset($link[$key]);
       
    21 			}
       
    22 			?>
       
    23 			<li class="<?php echo dtcGigs::get_gig_css_classes($g) ?>"><?php echo dtcGigs::dateFormat($g->mysqlDate . ' ' . $p->time, (date('Y') == date('Y', strtotime($g->mysqlDate))) ? $args['dateFormat'] : $args['dateFormatYear']) ?>: <a href="<?php echo $g->permalink; ?>">
       
    24 				<?php echo implode(' - ', $link) ?>
       
    25 			</a></li>
       
    26 		<?php endforeach; ?>
       
    27 	</ul>
       
    28 <?php else : ?>
       
    29 	<div class="no-gigs"><?php echo $options['no-upcoming']; ?></div>
       
    30 <?php endif; ?>