Clean up functions

This commit is contained in:
Brian Miyaji
2014-02-08 16:29:03 +11:00
parent 3c89cce6c0
commit 9950f91b0b

View File

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