Add team option to countdown widget close #43
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
$defaults = array(
|
||||
'team' => null,
|
||||
'id' => null,
|
||||
'live' => get_option( 'sportspress_enable_live_countdowns', 'yes' ) == 'yes' ? true : false,
|
||||
);
|
||||
@@ -19,7 +20,7 @@ if ( isset( $id ) ):
|
||||
else:
|
||||
$args = array();
|
||||
if ( isset( $team ) )
|
||||
$args = array( 'key' => 'sp_team', 'value' => $team );
|
||||
$args = array( array( 'key' => 'sp_team', 'value' => $team ) );
|
||||
$post = sp_get_next_event( $args );
|
||||
endif;
|
||||
|
||||
@@ -66,4 +67,4 @@ if ( ! isset( $post ) ) return;
|
||||
<span><?php echo sprintf( '%02s', $i ); ?> <small><?php _e( 'mins', 'sportspress' ); ?></small></span>
|
||||
<span><?php echo sprintf( '%02s', $s ); ?> <small><?php _e( 'secs', 'sportspress' ); ?></small></span>
|
||||
</time></p>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user