'default', 'date' => 'default', 'date_to' => 'default', 'date_from' => 'default', 'number' => -1, 'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false, 'paginated' => get_option( 'sportspress_event_blocks_paginated', 'yes' ) == 'yes' ? true : false, 'rows' => get_option( 'sportspress_event_blocks_rows', 10 ), 'order' => 'default', 'show_all_events_link' => false, 'show_league' => get_option( 'sportspress_event_blocks_show_league', 'no' ) == 'yes' ? true : false, 'show_season' => get_option( 'sportspress_event_blocks_show_season', 'no' ) == 'yes' ? true : false, ); extract( $defaults, EXTR_SKIP ); $calendar = new SP_Calendar( $id ); if ( $status != 'default' ) $calendar->status = $status; if ( $date != 'default' ) $calendar->date = $date; if ( $date_from != 'default' ) $calendar->from = $date_from; if ( $date_to != 'default' ) $calendar->to = $date_to; if ( $order != 'default' ) $calendar->order = $order; $data = $calendar->data(); $usecolumns = $calendar->columns; if ( isset( $columns ) ) $usecolumns = $columns; ?>
0 ) $limit = $number; foreach ( $data as $event ): if ( isset( $limit ) && $i >= $limit ) continue; $results = get_post_meta( $event->ID, 'sp_results', true ); $teams = array_unique( get_post_meta( $event->ID, 'sp_team' ) ); $logos = array(); $main_results = array(); $j = 0; foreach( $teams as $team ): $j++; if ( has_post_thumbnail ( $team ) ): if ( $link_teams ): $logo = ''; else: $logo = get_the_post_thumbnail( $team, 'sportspress-fit-icon', array( 'class' => 'team-logo logo-' . ( $j % 2 ? 'odd' : 'even' ) ) ); endif; $logos[] = $logo; endif; $team_results = sp_array_value( $results, $team, null ); if ( $primary_result ): $team_result = sp_array_value( $team_results, $primary_result, null ); else: if ( is_array( $team_results ) ): end( $team_results ); $team_result = prev( $team_results ); else: $team_result = null; endif; endif; if ( $team_result != null ) $main_results[] = $team_result; endforeach; ?>
name; ?>
name; ?>

post_title; ?>

' . __( 'View all events', 'sportspress' ) . ''; ?>