Add single player metrics EOS table functionality

This commit is contained in:
ThemeBoy
2013-12-02 02:25:21 +11:00
parent f46d3f0a49
commit 9354103af0
7 changed files with 147 additions and 86 deletions

View File

@@ -125,7 +125,7 @@ function sp_save_post( $post_id ) {
// Update stats
update_post_meta( $post_id, 'sp_stats', sp_array_value( $_POST, 'sp_stats', array() ) );
break;
case ( 'sp_event' ):
@@ -136,8 +136,8 @@ function sp_save_post( $post_id ) {
// Update results
update_post_meta( $post_id, 'sp_results', $results );
// Update stats
update_post_meta( $post_id, 'sp_stats', sp_array_value( $_POST, 'sp_stats', array() ) );
// Update player metrics
update_post_meta( $post_id, 'sp_players', sp_array_value( $_POST, 'sp_players', array() ) );
// Update team array
sp_update_post_meta_recursive( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
@@ -176,9 +176,15 @@ function sp_save_post( $post_id ) {
break;
case ( 'sp_player' ):
update_post_meta( $post_id, 'sp_stats', sp_array_value( $_POST, 'sp_stats', array() ) );
// Update player metrics
update_post_meta( $post_id, 'sp_metrics', sp_array_value( $_POST, 'sp_metrics', array() ) );
// Update team array
sp_update_post_meta_recursive( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
break;
case ( 'sp_staff' ):
sp_update_post_meta_recursive( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
break;