Modularize!
This commit is contained in:
@@ -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' && 'team' == get_option( 'sportspress_mode', 'team' ) ):
|
||||
elseif ( $key == '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 ) && 'team' == get_option( 'sportspress_mode', 'team' ) ) $labels['team'] = __( 'Team', 'sportspress' );
|
||||
if ( in_array( 'team', $this->columns ) ) $labels['team'] = __( 'Team', 'sportspress' );
|
||||
|
||||
$merged[0] = array_merge( $labels, $columns );
|
||||
return $merged;
|
||||
|
||||
Reference in New Issue
Block a user