Add more parameters to next event function
This commit is contained in:
@@ -1276,8 +1276,8 @@ if ( !function_exists( 'sp_get_next_event' ) ) {
|
||||
'posts_per_page' => 1,
|
||||
'order' => 'ASC',
|
||||
'post_status' => 'future',
|
||||
'meta_query' => $args,
|
||||
);
|
||||
$options = array_merge( $options, $args );
|
||||
$posts = get_posts( $options );
|
||||
if ( $posts && is_array( $posts ) ) return array_pop( $posts );
|
||||
else return false;
|
||||
|
||||
@@ -25,7 +25,7 @@ if ( isset( $id ) ):
|
||||
else:
|
||||
$args = array();
|
||||
if ( isset( $team ) )
|
||||
$args = array( array( 'key' => 'sp_team', 'value' => $team ) );
|
||||
$args = array( 'meta_query' => array( array( 'key' => 'sp_team', 'value' => $team ) ) );
|
||||
$post = sp_get_next_event( $args );
|
||||
endif;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user