Add single player shortcodes
This commit is contained in:
24
includes/shortcodes/class-sp-shortcode-player-details.php
Normal file
24
includes/shortcodes/class-sp-shortcode-player-details.php
Normal 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 );
|
||||
}
|
||||
}
|
||||
24
includes/shortcodes/class-sp-shortcode-player-statistics.php
Normal file
24
includes/shortcodes/class-sp-shortcode-player-statistics.php
Normal 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 );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user