null, 'calendar' => null, 'league' => null, 'season' => null, 'id' => null, 'title' => null, 'live' => get_option( 'sportspress_enable_live_countdowns', 'yes' ) == 'yes' ? true : false, 'link_events' => get_option( 'sportspress_link_events', 'yes' ) == 'yes' ? true : false, 'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false, 'link_venues' => get_option( 'sportspress_link_venues', 'no' ) == 'yes' ? true : false, 'show_logos' => get_option( 'sportspress_countdown_show_logos', 'no' ) == 'yes' ? true : false, 'show_thumbnail' => get_option( 'sportspress_countdown_show_thumbnail', 'no' ) == 'yes' ? true : false, ); if ( isset( $id ) ): $post = get_post( $id ); elseif ( $calendar ): $calendar = new SP_Calendar( $calendar ); if ( $team ) $calendar->team = $team; $calendar->status = 'future'; $calendar->number = 1; $calendar->order = 'ASC'; $data = $calendar->data(); $post = array_shift( $data ); else: $args = array(); if ( isset( $team ) ) { $args['meta_query'] = array( array( 'key' => 'sp_team', 'value' => $team, ) ); } if ( isset( $league ) || isset( $season ) ) { $args['tax_query'] = array( 'relation' => 'AND' ); if ( isset( $league ) ) { $args['tax_query'][] = array( 'taxonomy' => 'sp_league', 'terms' => $league, ); } if ( isset( $season ) ) { $args['tax_query'][] = array( 'taxonomy' => 'sp_season', 'terms' => $season, ); } } $post = sp_get_next_event( $args ); endif; extract( $defaults, EXTR_SKIP ); if ( ! isset( $post ) || ! $post ) return; if ( $title ) echo '

' . $title . '

'; $title = $post->post_title; if ( $link_events ) $title = '' . $title . ''; ?>

ID, 'sp_team' ) ); $i = 0; if ( is_array( $teams ) ) { foreach ( $teams as $team ) { $i++; if ( has_post_thumbnail ( $team ) ) { if ( $link_teams ) { echo ''; } else { echo get_the_post_thumbnail( $team, 'sportspress-fit-icon', array( 'class' => 'team-logo logo-' . ( $i % 2 ? 'odd' : 'even' ) ) ); } } } } } ?>

ID, 'sp_venue' ); if ( $venues ): ?>
ID, 'sp_venue' ); } else { $venue_names = array(); foreach ( $venues as $venue ) { $venue_names[] = $venue->name; } echo implode( '/', $venue_names ); } ?>
ID, 'sp_league' ); if ( $leagues ): foreach( $leagues as $league ): $term = get_term( $league->term_id, 'sp_league' ); ?>
name; ?>
post_date ); $interval = date_diff( $now, $date ); $days = $interval->invert ? 0 : $interval->days; $h = $interval->invert ? 0 : $interval->h; $i = $interval->invert ? 0 : $interval->i; $s = $interval->invert ? 0 : $interval->s; ?>