Add blocks layout to calendar close #22

This commit is contained in:
Brian Miyaji
2014-04-28 01:38:03 +10:00
parent bb8169f139
commit 24f95d75b6
20 changed files with 292 additions and 46 deletions

View File

@@ -151,14 +151,10 @@ if ( ! function_exists( 'sportspress_output_calendar' ) ) {
function sportspress_output_calendar() {
$id = get_the_ID();
$format = get_post_meta( $id, 'sp_format', true );
switch ( $format ):
case 'list':
sp_get_template( 'event-list.php', array( 'id' => $id ) );
break;
default:
sp_get_template( 'event-calendar.php', array( 'id' => $id ) );
break;
endswitch;
if ( array_key_exists( $format, SP()->formats->calendar ) )
sp_get_template( 'event-' . $format . '.php', array( 'id' => $id ) );
else
sp_get_template( 'event-calendar.php', array( 'id' => $id ) );
}
}
@@ -237,14 +233,10 @@ if ( ! function_exists( 'sportspress_output_player_list' ) ) {
function sportspress_output_player_list() {
$id = get_the_ID();
$format = get_post_meta( $id, 'sp_format', true );
switch ( $format ):
case 'gallery':
sp_get_template( 'player-gallery.php', array( 'id' => $id ) );
break;
default:
sp_get_template( 'player-list.php', array( 'id' => $id ) );
break;
endswitch;
if ( array_key_exists( $format, SP()->formats->list ) )
sp_get_template( 'player-' . $format . '.php', array( 'id' => $id ) );
else
sp_get_template( 'player-list.php', array( 'id' => $id ) );
}
}