Add single player shortcodes

This commit is contained in:
Brian Miyaji
2014-07-12 02:31:42 +10:00
parent da3bf43787
commit 563f646866
5 changed files with 109 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
/**
* Player Details Shortcode
*
* @author ThemeBoy
* @category Shortcodes
* @package SportsPress/Shortcodes/Player_Details
* @version 1.2
*/
class SP_Shortcode_Player_Details {
/**
* Output the player details shortcode.
*
* @param array $atts
*/
public static function output( $atts ) {
if ( ! isset( $atts['id'] ) && isset( $atts[0] ) && is_numeric( $atts[0] ) )
$atts['id'] = $atts[0];
sp_get_template( 'player-details.php', $atts );
}
}

View File

@@ -0,0 +1,24 @@
<?php
/**
* Player Statistics Shortcode
*
* @author ThemeBoy
* @category Shortcodes
* @package SportsPress/Shortcodes/Player_Statistics
* @version 1.2
*/
class SP_Shortcode_Player_Statistics {
/**
* Output the player statistics shortcode.
*
* @param array $atts
*/
public static function output( $atts ) {
if ( ! isset( $atts['id'] ) && isset( $atts[0] ) && is_numeric( $atts[0] ) )
$atts['id'] = $atts[0];
sp_get_template( 'player-statistics.php', $atts );
}
}