Add single event shortcode
This commit is contained in:
@@ -16,12 +16,16 @@ class SP_Shortcodes {
|
||||
public static function init() {
|
||||
// Define shortcodes
|
||||
$shortcodes = array(
|
||||
'countdown' => __CLASS__ . '::countdown',
|
||||
'event_list' => __CLASS__ . '::event_list',
|
||||
'event_calendar' => __CLASS__ . '::event_calendar',
|
||||
'league_table' => __CLASS__ . '::league_table',
|
||||
'player_list' => __CLASS__ . '::player_list',
|
||||
'player_gallery' => __CLASS__ . '::player_gallery',
|
||||
'event' => __CLASS__ . '::event',
|
||||
'countdown' => __CLASS__ . '::countdown',
|
||||
'event_list' => __CLASS__ . '::event_list',
|
||||
'event_calendar' => __CLASS__ . '::event_calendar',
|
||||
// 'team' => __CLASS__ . '::team',
|
||||
'league_table' => __CLASS__ . '::league_table',
|
||||
// 'player' => __CLASS__ . '::player',
|
||||
'player_list' => __CLASS__ . '::player_list',
|
||||
'player_gallery' => __CLASS__ . '::player_gallery',
|
||||
// 'staff' => __CLASS__ . '::staff',
|
||||
);
|
||||
|
||||
foreach ( $shortcodes as $shortcode => $function ) {
|
||||
@@ -57,6 +61,17 @@ class SP_Shortcodes {
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
/**
|
||||
* Event shortcode.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $atts
|
||||
* @return string
|
||||
*/
|
||||
public static function event( $atts ) {
|
||||
return self::shortcode_wrapper( array( 'SP_Shortcode_Event', 'output' ), $atts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Countdown shortcode.
|
||||
*
|
||||
@@ -90,6 +105,17 @@ class SP_Shortcodes {
|
||||
return self::shortcode_wrapper( array( 'SP_Shortcode_Event_List', 'output' ), $atts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Team shortcode.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $atts
|
||||
* @return string
|
||||
*/
|
||||
public static function team( $atts ) {
|
||||
return self::shortcode_wrapper( array( 'SP_Shortcode_Team', 'output' ), $atts );
|
||||
}
|
||||
|
||||
/**
|
||||
* League table shortcode.
|
||||
*
|
||||
@@ -101,6 +127,17 @@ class SP_Shortcodes {
|
||||
return self::shortcode_wrapper( array( 'SP_Shortcode_League_Table', 'output' ), $atts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Player shortcode.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $atts
|
||||
* @return string
|
||||
*/
|
||||
public static function player( $atts ) {
|
||||
return self::shortcode_wrapper( array( 'SP_Shortcode_Player', 'output' ), $atts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Player list shortcode.
|
||||
*
|
||||
@@ -122,4 +159,15 @@ class SP_Shortcodes {
|
||||
public static function player_gallery( $atts ) {
|
||||
return self::shortcode_wrapper( array( 'SP_Shortcode_Player_Gallery', 'output' ), $atts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Staff shortcode.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $atts
|
||||
* @return string
|
||||
*/
|
||||
public static function staff( $atts ) {
|
||||
return self::shortcode_wrapper( array( 'SP_Shortcode_Staff', 'output' ), $atts );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user