Fix empty seasons displaying in player profiles
This commit is contained in:
@@ -411,16 +411,13 @@ class SP_Player extends SP_Custom_Post {
|
|||||||
|
|
||||||
foreach( $placeholders as $season_id => $season_data ):
|
foreach( $placeholders as $season_id => $season_data ):
|
||||||
|
|
||||||
if ( -1 == sp_array_value( $leagues, $season_id, 0 ) )
|
$team_id = sp_array_value( $leagues, $season_id, -1 );
|
||||||
continue;
|
|
||||||
|
|
||||||
$season_name = sp_array_value( $season_names, $season_id, ' ' );
|
|
||||||
|
|
||||||
$team_id = sp_array_value( $leagues, $season_id, array() );
|
|
||||||
|
|
||||||
if ( -1 == $team_id )
|
if ( -1 == $team_id )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
$season_name = sp_array_value( $season_names, $season_id, ' ' );
|
||||||
|
|
||||||
if ( $team_id ):
|
if ( $team_id ):
|
||||||
$team_name = get_the_title( $team_id );
|
$team_name = get_the_title( $team_id );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user