Apply players (individual sport) mode throughout

This commit is contained in:
Brian Miyaji
2015-01-25 16:45:21 +11:00
parent 352c6632da
commit 5d5368d1bf
19 changed files with 656 additions and 559 deletions

View File

@@ -450,7 +450,7 @@ class SP_Player_List extends SP_Custom_Post {
foreach( $this->columns as $key ):
if ( $key == 'number' ):
$labels[ $key ] = '#';
elseif ( $key == 'team' ):
elseif ( $key == 'team' && 'team' == get_option( 'sportspress_mode', 'team' ) ):
$labels[ $key ] = __( 'Team', 'sportspress' );
elseif ( array_key_exists( $key, $columns ) ):
$labels[ $key ] = $columns[ $key ];
@@ -469,7 +469,7 @@ class SP_Player_List extends SP_Custom_Post {
$labels = array();
if ( in_array( 'number', $this->columns ) ) $labels['number'] = '#';
$labels['name'] = __( 'Player', 'sportspress' );
if ( in_array( 'team', $this->columns ) ) $labels['team'] = __( 'Team', 'sportspress' );
if ( in_array( 'team', $this->columns ) && 'team' == get_option( 'sportspress_mode', 'team' ) ) $labels['team'] = __( 'Team', 'sportspress' );
$merged[0] = array_merge( $labels, $columns );
return $merged;