Add events template to players

This commit is contained in:
Brian Miyaji
2016-12-08 21:12:30 +11:00
parent 5c1e454208
commit c4e73d4977
5 changed files with 97 additions and 5 deletions

View File

@@ -0,0 +1,19 @@
<?php
/**
* Player Events
*
* @author ThemeBoy
* @package SportsPress/Templates
* @version 2.1.7
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( ! isset( $id ) )
$id = get_the_ID();
$format = get_option( 'sportspress_player_events_format', 'blocks' );
if ( 'calendar' === $format )
sp_get_template( 'event-calendar.php', array( 'player' => $id ) );
else
sp_get_template( 'event-fixtures-results.php', array( 'player' => $id ) );