Tag version 2.6

This commit is contained in:
Brian Miyaji
2018-05-07 17:29:36 +10:00
parent 61c468fa8b
commit 87074fa217
65 changed files with 116 additions and 145 deletions

View File

@@ -5,7 +5,7 @@
* The SportsPress player class handles individual player data.
*
* @class SP_Player
* @version 2.5
* @version 2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
@@ -256,8 +256,11 @@ class SP_Player extends SP_Custom_Post {
$data = array();
$league_stats = sp_array_value( $stats, $league_id, array() );
$div_ids = apply_filters( 'sportspress_player_data_season_ids', $div_ids, $league_stats );
// Get all seasons populated with data where available
$data = sp_array_combine( $div_ids, sp_array_value( $stats, $league_id, array() ), true );
$data = sp_array_combine( $div_ids, $league_stats, true );
// Get equations from statistic variables
$equations = sp_get_var_equations( 'sp_statistic' );
@@ -340,7 +343,7 @@ class SP_Player extends SP_Custom_Post {
);
endif;
$args = apply_filters( 'sportspress_player_data_event_args', $args );
$args = apply_filters( 'sportspress_player_data_event_args', $args, $data, $div_id );
$events = get_posts( $args );
@@ -597,7 +600,7 @@ class SP_Player extends SP_Custom_Post {
if ( -1 == $team_id )
continue;
$season_name = sp_array_value( $season_names, $season_id, ' ' );
$season_name = sp_array_value( $season_names, (int) $season_id, ' ' );
if ( $team_id ):
$team_name = sp_team_short_name( $team_id );