Add event_id as an option to the template
This commit is contained in:
@@ -11,6 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
$defaults = array(
|
||||
'id' => null,
|
||||
'event_id' => null,
|
||||
'title' => false,
|
||||
'status' => 'default',
|
||||
'date' => 'default',
|
||||
@@ -58,6 +59,8 @@ if ( $date_future != 'default' )
|
||||
$calendar->future = $date_future;
|
||||
if ( $date_relative != 'default' )
|
||||
$calendar->relative = $date_relative;
|
||||
if ( $event_id )
|
||||
$calendar->event_id = $event_id;
|
||||
if ( $league )
|
||||
$calendar->league = $league;
|
||||
if ( $season )
|
||||
@@ -175,4 +178,4 @@ if ( $title )
|
||||
if ( $id && $show_all_events_link )
|
||||
echo '<div class="sp-calendar-link sp-view-all-link"><a href="' . get_permalink( $id ) . '">' . __( 'View all events', 'sportspress' ) . '</a></div>';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user