From 9950f91b0b00b1f146540fccad429c960bfd94dd Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sat, 8 Feb 2014 16:29:03 +1100 Subject: [PATCH] Clean up functions --- functions.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/functions.php b/functions.php index 213e561a..4515644c 100644 --- a/functions.php +++ b/functions.php @@ -22,11 +22,7 @@ if ( !function_exists( 'sportspress_array_between' ) ) { if ( !function_exists( 'sportspress_array_value' ) ) { function sportspress_array_value( $arr = array(), $key = 0, $default = null ) { - if ( is_array( $arr ) && array_key_exists( $key, $arr ) ) - $subset = $arr[ $key ]; - else - $subset = $default; - return $subset; + return ( isset( $arr[ $key ] ) ? $arr[ $key ] : $default ); } } @@ -2037,17 +2033,11 @@ if ( !function_exists( 'sportspress_get_player_statistics_data' ) ) { $position_ids[] = $position->term_id; endforeach; $args['tax_query'] = array( - 'relation' => 'OR', array( 'taxonomy' => 'sp_position', 'field' => 'id', 'terms' => $position_ids, ), - array( - 'taxonomy' => 'sp_position', - 'field' => 'id', - 'operator' => 'NOT SET', - ), ); endif;