Give an option to show or not the event status in countdown widget
This commit is contained in:
@@ -110,13 +110,18 @@ if ( $title )
|
||||
|
||||
$title = $post->post_title;
|
||||
if ( $link_events ) $title = '<a href="' . get_post_permalink( $post->ID, false, true ) . '">' . $title . '</a>';
|
||||
$sp_status = get_post_meta($post->ID, 'sp_status', true);
|
||||
$statuses = apply_filters( 'sportspress_event_statuses', array(
|
||||
'ok' => __( 'On time', 'sportspress' ),
|
||||
'tbd' => __( 'TBD', 'sportspress' ),
|
||||
'postponed' => __( 'Postponed', 'sportspress' ),
|
||||
'cancelled' => __( 'Canceled', 'sportspress' ),
|
||||
) );
|
||||
|
||||
if ( $show_status ) {
|
||||
$sp_status = get_post_meta($post->ID, 'sp_status', true);
|
||||
$statuses = apply_filters( 'sportspress_event_statuses', array(
|
||||
'ok' => __( 'On time', 'sportspress' ),
|
||||
'tbd' => __( 'TBD', 'sportspress' ),
|
||||
'postponed' => __( 'Postponed', 'sportspress' ),
|
||||
'cancelled' => __( 'Canceled', 'sportspress' ),
|
||||
) );
|
||||
$title = $title.' ('.$statuses[ $sp_status ].')';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="sp-template sp-template-countdown">
|
||||
<div class="sp-countdown-wrapper">
|
||||
@@ -147,7 +152,7 @@ $statuses = apply_filters( 'sportspress_event_statuses', array(
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php echo $title.' ('.$statuses[ $sp_status ].')'; ?>
|
||||
<?php echo $title; ?>
|
||||
</h3>
|
||||
<?php
|
||||
if ( isset( $show_date ) && $show_date ):
|
||||
|
||||
Reference in New Issue
Block a user