Fix styles and functions to align with theme

This commit is contained in:
Brian Miyaji
2014-01-21 02:51:16 +11:00
parent f9a367ae6e
commit 08ce1eea27
11 changed files with 189 additions and 56 deletions

View File

@@ -82,6 +82,25 @@ function sportspress_save_post( $post_id ) {
break;
case ( 'sp_metric' ):
// Update format as string
update_post_meta( $post_id, 'sp_format', sportspress_array_value( $_POST, 'sp_format', 'integer' ) );
// Update precision as integer
update_post_meta( $post_id, 'sp_precision', (int) sportspress_array_value( $_POST, 'sp_precision', 1 ) );
// Update equation as string
update_post_meta( $post_id, 'sp_equation', implode( ' ', sportspress_array_value( $_POST, 'sp_equation', array() ) ) );
// Update sort order as string
update_post_meta( $post_id, 'sp_priority', sportspress_array_value( $_POST, 'sp_priority', '0' ) );
// Update sort order as string
update_post_meta( $post_id, 'sp_order', sportspress_array_value( $_POST, 'sp_order', 'DESC' ) );
break;
case ( 'sp_result' ):
// Update format as string
@@ -100,6 +119,9 @@ function sportspress_save_post( $post_id ) {
// Update player number
update_post_meta( $post_id, 'sp_number', sportspress_array_value( $_POST, 'sp_number', '' ) );
// Update current team
update_post_meta( $post_id, 'sp_current_team', sportspress_array_value( $_POST, 'sp_current_team', '' ) );
// Update nationality
update_post_meta( $post_id, 'sp_nationality', sportspress_array_value( $_POST, 'sp_nationality', '' ) );