Update modules

This commit is contained in:
Brian Miyaji
2018-05-01 19:47:05 +10:00
parent cc792220db
commit d680f279f5
8 changed files with 26 additions and 6 deletions

View File

@@ -29,6 +29,13 @@ class SP_Modules {
'icon' => 'sp-icon-calendar',
'desc' => __( 'Organize and publish calendars using different layouts.', 'sportspress' ),
),
'event_grids' => array(
'label' => __( 'Match Grids', 'sportspress' ),
'class' => 'SportsPress_Event_Grids',
'icon' => 'sp-icon-grid',
'link' => 'https://www.themeboy.com/sportspress-extensions/match-grids/',
'desc' => __( 'Display fixtures and results between teams in a grid layout.', 'sportspress' ),
),
'scoreboard' => array(
'label' => __( 'Scoreboard', 'sportspress' ),
'class' => 'SportsPress_Scoreboard',

View File

@@ -137,6 +137,15 @@ function sp_the_main_results_or_time( $post = 0, $delimiter = '-' ) {
echo implode( $delimiter, sp_get_main_results_or_time( $post ) );
}
function sp_get_main_results_or_date( $post = 0, $format = null ) {
$results = sp_get_main_results( $post );
if ( sizeof( $results ) ) {
return $results;
} else {
return array( sp_get_date( $post, $format ) );
}
}
function sp_get_outcome( $post = 0 ) {
$event = new SP_Event( $post );
return $event->outcome( true );