Enable selecting columns to use in league table

This commit is contained in:
Brian Miyaji
2014-03-06 12:59:00 +11:00
parent 0a9fdf2101
commit 60bc03e8dc
3 changed files with 19 additions and 7 deletions

View File

@@ -128,6 +128,9 @@ function sportspress_save_post( $post_id ) {
case ( 'sp_table' ):
// Update columns array
update_post_meta( $post_id, 'sp_columns', sportspress_array_value( $_POST, 'sp_columns', array() ) );
// Update teams array
update_post_meta( $post_id, 'sp_teams', sportspress_array_value( $_POST, 'sp_teams', array() ) );

View File

@@ -100,9 +100,9 @@ function sportspress_table_team_meta( $post, $test ) {
function sportspress_table_columns_meta( $post ) {
list( $columns, $data, $placeholders, $merged ) = sportspress_get_league_table_data( $post->ID, true );
list( $columns, $usecolumns, $data, $placeholders, $merged ) = sportspress_get_league_table_data( $post->ID, true );
sportspress_edit_league_table( $columns, $data, $placeholders );
sportspress_edit_league_table( $columns, $usecolumns, $data, $placeholders );
sportspress_nonce();
}