diff --git a/admin/hooks/save-post.php b/admin/hooks/save-post.php index 046798fb..74011077 100644 --- a/admin/hooks/save-post.php +++ b/admin/hooks/save-post.php @@ -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() ) ); diff --git a/admin/post-types/table.php b/admin/post-types/table.php index 8e3b0308..32f41419 100644 --- a/admin/post-types/table.php +++ b/admin/post-types/table.php @@ -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(); } diff --git a/functions.php b/functions.php index acee158d..6564ca99 100644 --- a/functions.php +++ b/functions.php @@ -190,7 +190,7 @@ if ( !function_exists( 'sportspress_get_post_datetime' ) ) { if ( $post->post_status == 'future' ): $status = __( 'Scheduled', 'sportspress' ); elseif( $post->post_status == 'publish' ): - $status = __( 'Played', 'sportspress' ); + $status = __( 'Published', 'sportspress' ); elseif( $post->post_status == 'draft' ): $status = __( 'Draft', 'sportspress' ); else: @@ -772,15 +772,18 @@ if ( !function_exists( 'sportspress_get_var_calculates' ) ) { } if ( !function_exists( 'sportspress_edit_league_table' ) ) { - function sportspress_edit_league_table( $columns = array(), $data = array(), $placeholders = array() ) { + function sportspress_edit_league_table( $columns = array(), $usecolumns = array(), $data = array(), $placeholders = array() ) { ?>
| - - | + $label ): ?> + |
|---|