null, 'title' => false, 'status' => 'default', 'date' => 'default', 'date_from' => 'default', 'date_to' => 'default', 'league' => null, 'season' => null, 'team' => null, 'number' => -1, 'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false, 'link_events' => get_option( 'sportspress_link_events', 'yes' ) == 'yes' ? true : false, 'paginated' => get_option( 'sportspress_event_blocks_paginated', 'yes' ) == 'yes' ? true : false, 'rows' => get_option( 'sportspress_event_blocks_rows', 5 ), 'order' => 'default', 'show_all_events_link' => false, 'show_title' => get_option( 'sportspress_event_blocks_show_title', 'no' ) == 'yes' ? true : 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, 'show_venue' => get_option( 'sportspress_event_blocks_show_venue', 'no' ) == 'yes' ? true : false, 'hide_if_empty' => 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 ( $league ) $calendar->league = $league; if ( $season ) $calendar->season = $season; if ( $team ) $calendar->team = $team; if ( $order != 'default' ) $calendar->order = $order; $data = $calendar->data(); if ( $hide_if_empty && empty( $data ) ) return; if ( $show_title && false === $title && $id ): $caption = $calendar->caption; if ( $caption ) $title = $caption; else $title = get_the_title( $id ); endif; if ( $title ) echo '

' . $title . '

'; ?>
0 ) $limit = $number; foreach ( $data as $event ): if ( isset( $limit ) && $i >= $limit ) continue; $permalink = get_post_permalink( $event, false, true ); $results = get_post_meta( $event->ID, 'sp_results', true ); $teams = array_unique( get_post_meta( $event->ID, 'sp_team' ) ); $teams = array_filter( $teams, 'sp_filter_positive' ); $logos = array(); $j = 0; foreach( $teams as $team ): $j++; if ( has_post_thumbnail ( $team ) ): if ( $link_teams ): $logo = ''; else: $logo = ''; endif; $logos[] = $logo; endif; endforeach; ?>
' . implode( ' - ', apply_filters( 'sportspress_event_blocks_team_result_or_time', sp_get_main_results_or_time( $event ), $event->ID ) ), $permalink, $link_events . '' ); ?>
name; ?>
name; ?>
name; ?>

post_title, $permalink, $link_events ); ?>

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