Use template function and load as needed
This commit is contained in:
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 );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user