From 44dba72251325356d0e081e458cd49e178049b5c Mon Sep 17 00:00:00 2001 From: Takumi Date: Mon, 29 Jul 2013 01:13:02 +1000 Subject: [PATCH] Add player statistics placeholder in event --- event.php | 20 +++++++++++-- helpers.php | 69 +++++++++++++++++++++++++++++++++++++++++++ sportspress-admin.css | 11 +++++++ 3 files changed, 98 insertions(+), 2 deletions(-) diff --git a/event.php b/event.php index b1a01835..a2449cb9 100644 --- a/event.php +++ b/event.php @@ -30,12 +30,12 @@ function sp_event_meta_init() { add_meta_box( 'submitdiv', __( 'Event', 'sportspress' ), 'post_submit_meta_box', 'sp_event', 'side', 'high' ); add_meta_box( 'sp_teamdiv', __( 'Teams', 'sportspress' ), 'sp_event_team_meta', 'sp_event', 'side', 'high' ); add_meta_box( 'sp_articlediv', __( 'Article', 'sportspress' ), 'sp_event_article_meta', 'sp_event', 'normal', 'high' ); + add_meta_box( 'sp_statsdiv', __( 'Statistics', 'sportspress' ), 'sp_event_stats_meta', 'sp_event', 'normal', 'high' ); } function sp_event_team_meta( $post ) { $limit = get_option( 'sp_event_team_count' ); $teams = array_pad( array_slice( (array)get_post_meta( $post->ID, 'sp_team', false ), 0, $limit ), $limit, 0); - $scores = array_pad( array_slice( (array)get_post_meta( $post->ID, 'sp_score', false ), 0, $limit ), $limit, 0); $players = (array)get_post_meta( $post->ID, 'sp_player', false ); for ( $i = 0; $i < $limit; $i++ ): ?> @@ -52,7 +52,6 @@ function sp_event_team_meta( $post ) { ); wp_dropdown_pages( $args ); ?> -