Display 3 different shortcodes for event sections

This commit is contained in:
Brian Miyaji
2014-04-18 22:33:30 +10:00
parent 0384fb7425
commit 16429008a9
6 changed files with 111 additions and 30 deletions

View File

@@ -1,16 +1,16 @@
<?php
/**
* Event Shortcode
* Event Details Shortcode
*
* @author ThemeBoy
* @category Shortcodes
* @package SportsPress/Shortcodes/Event
* @version 0.7
* @package SportsPress/Shortcodes/Event_Details
* @version 0.8
*/
class SP_Shortcode_Event {
class SP_Shortcode_Event_Details {
/**
* Output the event shortcode.
* Output the event details shortcode.
*
* @param array $atts
*/
@@ -19,6 +19,6 @@ class SP_Shortcode_Event {
if ( ! isset( $atts['id'] ) && isset( $atts[0] ) && is_numeric( $atts[0] ) )
$atts['id'] = $atts[0];
sp_get_template( 'event.php', $atts );
sp_get_template( 'event-details.php', $atts );
}
}

View File

@@ -0,0 +1,24 @@
<?php
/**
* Event Performance Shortcode
*
* @author ThemeBoy
* @category Shortcodes
* @package SportsPress/Shortcodes/Event_Performance
* @version 0.8
*/
class SP_Shortcode_Event_Performance {
/**
* Output the event performance 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( 'event-performance.php', $atts );
}
}

View File

@@ -0,0 +1,24 @@
<?php
/**
* Event Results Shortcode
*
* @author ThemeBoy
* @category Shortcodes
* @package SportsPress/Shortcodes/Event_Results
* @version 0.8
*/
class SP_Shortcode_Event_Results {
/**
* Output the event results 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( 'event-results.php', $atts );
}
}