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

@@ -19,8 +19,9 @@ class SP_Meta_Box_Table_Data {
* Output the metabox
*/
public static function output( $post ) {
list( $columns, $usecolumns, $data, $placeholders, $merged ) = sp_get_league_table_data( $post->ID, true );
$adjustments = get_post_meta( $post->ID, 'sp_adjustments', true );
$table = new SP_Table( $post );
list( $columns, $usecolumns, $data, $placeholders, $merged ) = $table->data( true );
$adjustments = $table->adjustments;
self::table( $columns, $usecolumns, $data, $placeholders, $adjustments );
}