Use template function and load as needed
This commit is contained in:
24
includes/shortcodes/class-sp-shortcode-countdown.php
Normal file
24
includes/shortcodes/class-sp-shortcode-countdown.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Countdown Shortcode
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @category Shortcodes
|
||||
* @package SportsPress/Shortcodes/Countdown
|
||||
* @version 0.7
|
||||
*/
|
||||
class SP_Shortcode_Countdown {
|
||||
|
||||
/**
|
||||
* Output the countdown 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( 'countdown.php', $atts );
|
||||
}
|
||||
}
|
||||
24
includes/shortcodes/class-sp-shortcode-event-calendar.php
Normal file
24
includes/shortcodes/class-sp-shortcode-event-calendar.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Event Calendar Shortcode
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @category Shortcodes
|
||||
* @package SportsPress/Shortcodes/Event_Calendar
|
||||
* @version 0.7
|
||||
*/
|
||||
class SP_Shortcode_Event_Calendar {
|
||||
|
||||
/**
|
||||
* Output the event calendar 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-calendar.php', $atts );
|
||||
}
|
||||
}
|
||||
24
includes/shortcodes/class-sp-shortcode-event-list.php
Normal file
24
includes/shortcodes/class-sp-shortcode-event-list.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Event List Shortcode
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @category Shortcodes
|
||||
* @package SportsPress/Shortcodes/Event_List
|
||||
* @version 0.7
|
||||
*/
|
||||
class SP_Shortcode_Event_List {
|
||||
|
||||
/**
|
||||
* Output the event list 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-list.php', $atts );
|
||||
}
|
||||
}
|
||||
24
includes/shortcodes/class-sp-shortcode-league-table.php
Normal file
24
includes/shortcodes/class-sp-shortcode-league-table.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* League Table Shortcode
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @category Shortcodes
|
||||
* @package SportsPress/Shortcodes/League_Table
|
||||
* @version 0.7
|
||||
*/
|
||||
class SP_Shortcode_League_Table {
|
||||
|
||||
/**
|
||||
* Output the league table 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( 'league-table.php', $atts );
|
||||
}
|
||||
}
|
||||
24
includes/shortcodes/class-sp-shortcode-player-gallery.php
Normal file
24
includes/shortcodes/class-sp-shortcode-player-gallery.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Player Gallery Shortcode
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @category Shortcodes
|
||||
* @package SportsPress/Shortcodes/Player_Gallery
|
||||
* @version 0.7
|
||||
*/
|
||||
class SP_Shortcode_Player_Gallery {
|
||||
|
||||
/**
|
||||
* Output the player gallery 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-gallery.php', $atts );
|
||||
}
|
||||
}
|
||||
24
includes/shortcodes/class-sp-shortcode-player-list.php
Normal file
24
includes/shortcodes/class-sp-shortcode-player-list.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Player List Shortcode
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @category Shortcodes
|
||||
* @package SportsPress/Shortcodes/Player_List
|
||||
* @version 0.7
|
||||
*/
|
||||
class SP_Shortcode_Player_List {
|
||||
|
||||
/**
|
||||
* Output the player list 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-list.php', $atts );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user