diff --git a/modules/sportspress-player-lists.php b/modules/sportspress-player-lists.php index 72ae4614..c8cac1d1 100644 --- a/modules/sportspress-player-lists.php +++ b/modules/sportspress-player-lists.php @@ -275,6 +275,17 @@ class SportsPress_Player_Lists { 'type' => 'checkbox', ), + array( + 'title' => __( 'Teams', 'sportspress' ), + 'id' => 'sportspress_list_team_format', + 'default' => 'name', + 'type' => 'radio', + 'options' => array( + 'name' => __( 'Name', 'sportspress' ), + 'logo' => __( 'Logo', 'sportspress' ), + ), + ), + array( 'title' => __( 'Pagination', 'sportspress' ), 'desc' => __( 'Paginate', 'sportspress' ), diff --git a/templates/player-list.php b/templates/player-list.php index fa405394..0c16d2b6 100644 --- a/templates/player-list.php +++ b/templates/player-list.php @@ -22,7 +22,7 @@ $defaults = array( 'show_title' => get_option( 'sportspress_list_show_title', 'yes' ) == 'yes' ? true : false, 'show_player_photo' => get_option( 'sportspress_list_show_photos', 'no' ) == 'yes' ? true : false, 'show_player_flag' => get_option( 'sportspress_list_show_flags', 'no' ) == 'yes' ? true : false, - 'show_teams_logo' => get_option( 'sportspress_list_show_logos', 'no' ) == 'yes' ? true : false, + 'team_format' => get_option( 'sportspress_list_team_format', 'name' ), 'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false, 'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false, 'responsive' => get_option( 'sportspress_enable_responsive_tables', 'no' ) == 'yes' ? true : false, @@ -194,7 +194,7 @@ foreach ( $groups as $group ): if ( array_key_exists( 'team', $labels ) ): $team = sp_array_value( $row, 'team', get_post_meta( $id, 'sp_current_team', true ) ); $team_name = $team ? sp_team_short_name( $team ) : '-'; - if ( $show_teams_logo && has_post_thumbnail( $team ) ){ + if ( $team_format == 'logo' && has_post_thumbnail( $team ) ){ $logo = get_the_post_thumbnail( $team, 'sportspress-fit-icon', array( 'title' => ''.$team_name.'' ) ); $team_name = ''; }