Skip to content

Commit

Permalink
Add an extra Status option at Event List widget (Published+Scheduled)
Browse files Browse the repository at this point in the history
  • Loading branch information
savvasha committed May 19, 2019
1 parent 8266ec4 commit c6cbd41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion includes/sp-core-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,8 @@ function sp_dropdown_statuses( $args = array() ) {
$statuses = apply_filters( 'sportspress_statuses', array(
'any' => __( 'All', 'sportspress' ),
'publish' => __( 'Published', 'sportspress' ),
'future' => __( 'Scheduled', 'sportspress' )
'future' => __( 'Scheduled', 'sportspress' ),
'publish,future' => __( 'Published + Scheduled', 'sportspress' )
));

foreach ( $statuses as $value => $label ):
Expand Down
3 changes: 2 additions & 1 deletion templates/event-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
extract( $defaults, EXTR_SKIP );

$calendar = new SP_Calendar( $id );
if ( $status != 'default' )
$status = explode ( ',', $status );
if ( $status[0] != 'default' )
$calendar->status = $status;
if ( $format != 'default' )
$calendar->event_format = $format;
Expand Down

0 comments on commit c6cbd41

Please sign in to comment.