Save team played per season per league from player profile edit screen
This commit is contained in:
@@ -87,6 +87,9 @@ function sportspress_save_post( $post_id ) {
|
||||
|
||||
case ( 'sp_player' ):
|
||||
|
||||
// Update seasons teams to show
|
||||
update_post_meta( $post_id, 'sp_seasons_teams', sportspress_array_value( $_POST, 'sp_seasons_teams', array() ) );
|
||||
|
||||
// Update team array
|
||||
sportspress_update_post_meta_recursive( $post_id, 'sp_team', sportspress_array_value( $_POST, 'sp_team', array() ) );
|
||||
|
||||
|
||||
@@ -109,9 +109,9 @@ function sportspress_player_stats_meta( $post ) {
|
||||
<?php
|
||||
endif;
|
||||
|
||||
list( $columns, $data, $placeholders, $merged ) = sportspress_get_player_statistics_data( $post->ID, $league->term_id, true );
|
||||
list( $columns, $data, $seasons_teams ) = sportspress_get_player_statistics_data( $post->ID, $league->term_id, true );
|
||||
|
||||
sportspress_edit_player_statistics_table( $league->term_id, $columns, $data, $placeholders );
|
||||
sportspress_edit_player_statistics_table( $league->term_id, $columns, $data, $seasons_teams );
|
||||
|
||||
endforeach;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ function sportspress_team_columns_meta( $post ) {
|
||||
<?php
|
||||
endif;
|
||||
|
||||
list( $columns, $data, $data, $leagues_seasons ) = sportspress_get_team_columns_data( $post->ID, $league_id, true );
|
||||
list( $columns, $data, $leagues_seasons ) = sportspress_get_team_columns_data( $post->ID, $league_id, true );
|
||||
|
||||
sportspress_edit_team_columns_table( $league_id, $columns, $data, $leagues_seasons );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user