Create SP_Table class to handle league table data

This commit is contained in:
Brian Miyaji
2014-04-26 13:19:36 +10:00
parent 0406de7552
commit 08f13358b3
5 changed files with 403 additions and 17 deletions

View File

@@ -27,7 +27,9 @@ extract( $defaults, EXTR_SKIP );
$output = '<div class="sp-table-wrapper">' .
'<table class="sp-league-table sp-data-table' . ( $responsive ? ' sp-responsive-table' : '' ) . ( $sortable ? ' sp-sortable-table' : '' ) . ( $paginated ? ' sp-paginated-table' : '' ) . '" data-sp-rows="' . $rows . '">' . '<thead>' . '<tr>';
$data = sp_get_league_table_data( $id );
$table = new SP_Table( $id );
$data = $table->data();
// The first row should be column labels
$labels = $data[0];