Initialize league table earlier

This commit is contained in:
Brian Miyaji
2015-02-03 12:11:02 +11:00
parent 0d84843ff1
commit 41aa6d0813

View File

@@ -27,14 +27,14 @@ extract( $defaults, EXTR_SKIP );
if ( ! isset( $highlight ) ) $highlight = get_post_meta( $id, 'sp_highlight', true );
$table = new SP_League_Table( $id );
$output = '<h4 class="sp-table-caption">' . get_the_title( $id ) . '</h4>';
$output .= '<div class="sp-table-wrapper">';
$output .= '<table class="sp-league-table sp-data-table' . ( $sortable ? ' sp-sortable-table' : '' ) . ( $scrollable ? ' sp-scrollable-table' : '' ) . ( $paginated ? ' sp-paginated-table' : '' ) . '" data-sp-rows="' . $rows . '">' . '<thead>' . '<tr>';
$table = new SP_League_Table( $id );
$data = $table->data();
// The first row should be column labels