Display player metrics as definition list instead of table

This commit is contained in:
Brian Miyaji
2014-03-08 15:52:24 +11:00
parent 5523b1b58d
commit 7b3a79f079

View File

@@ -39,20 +39,16 @@ if ( !function_exists( 'sportspress_player_metrics' ) ) {
$data[ __( 'Past Teams', 'sportspress' ) ] = implode( ', ', $teams ); $data[ __( 'Past Teams', 'sportspress' ) ] = implode( ', ', $teams );
endif; endif;
$output = '<div class="sp-table-wrapper">' . $output = '<div class="sp-list-wrapper">' .
'<table class="sp-player-metrics sp-data-table sp-responsive-table">' . '<tbody>'; '<dl class="sp-player-metrics">';
$i = 0;
foreach( $data as $label => $value ): foreach( $data as $label => $value ):
$output .= '<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . '"><th>' . $label . '</th><td>' . $value . '</td></tr>'; $output .= '<dt>' . $label . '<dd>' . $value . '</dd>';
$i++;
endforeach; endforeach;
$output .= '</tbody>' . '</table>' . '</div>'; $output .= '</dl></div>';
return apply_filters( 'sportspress_player_metrics', $output ); return apply_filters( 'sportspress_player_metrics', $output );