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(
|
$defaults = array(
|
||||||
'id' => null,
|
'id' => null,
|
||||||
|
'event_id' => null,
|
||||||
'title' => false,
|
'title' => false,
|
||||||
'status' => 'default',
|
'status' => 'default',
|
||||||
'date' => 'default',
|
'date' => 'default',
|
||||||
@@ -58,6 +59,8 @@ if ( $date_future != 'default' )
|
|||||||
$calendar->future = $date_future;
|
$calendar->future = $date_future;
|
||||||
if ( $date_relative != 'default' )
|
if ( $date_relative != 'default' )
|
||||||
$calendar->relative = $date_relative;
|
$calendar->relative = $date_relative;
|
||||||
|
if ( $event_id )
|
||||||
|
$calendar->event_id = $event_id;
|
||||||
if ( $league )
|
if ( $league )
|
||||||
$calendar->league = $league;
|
$calendar->league = $league;
|
||||||
if ( $season )
|
if ( $season )
|
||||||
@@ -175,4 +178,4 @@ if ( $title )
|
|||||||
if ( $id && $show_all_events_link )
|
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>';
|
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