Add team option to countdown widget close #43

This commit is contained in:
Brian Miyaji
2014-08-23 19:52:51 +10:00
parent aa98f74fbc
commit 091c2a33ff
5 changed files with 64 additions and 6 deletions

View File

@@ -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>