Avoid nullifying the stats array if Player Statistic template not enabled
This commit is contained in:
@@ -802,12 +802,8 @@ class SP_Player extends SP_Custom_Post {
|
||||
|
||||
$labels = array();
|
||||
|
||||
if ( 'no' === get_option( 'sportspress_player_show_statistics', 'yes' ) ) {
|
||||
$merged = array();
|
||||
} else {
|
||||
$labels['name'] = __( 'Season', 'sportspress' );
|
||||
$labels['team'] = __( 'Team', 'sportspress' );
|
||||
}
|
||||
|
||||
if ( 'no' === get_option( 'sportspress_player_show_total', 'no' ) ) {
|
||||
unset( $merged[-1] );
|
||||
|
||||
Reference in New Issue
Block a user