Add abbreviation to config post types and calculate streak

This commit is contained in:
Brian Miyaji
2014-01-03 03:24:47 +11:00
parent c04aad9a75
commit b5263009c1
8 changed files with 142 additions and 26 deletions

View File

@@ -207,8 +207,8 @@ function sp_save_post( $post_id ) {
case ( 'sp_result' ):
// Update equation as string
update_post_meta( $post_id, 'sp_equation', implode( ' ', sp_array_value( $_POST, 'sp_equation', array() ) ) );
// Update abbreviation as string
update_post_meta( $post_id, 'sp_abbreviation', sp_array_value( $_POST, 'sp_abbreviation', '' ) );
break;
@@ -230,6 +230,9 @@ function sp_save_post( $post_id ) {
// Update sort order as string
update_post_meta( $post_id, 'sp_order', sp_array_value( $_POST, 'sp_order', 'DESC' ) );
// Update abbreviation as string
update_post_meta( $post_id, 'sp_abbreviation', sp_array_value( $_POST, 'sp_abbreviation', '' ) );
break;
case ( 'sp_statistic' ):
@@ -237,6 +240,9 @@ function sp_save_post( $post_id ) {
// Update equation as string
update_post_meta( $post_id, 'sp_equation', implode( ' ', sp_array_value( $_POST, 'sp_equation', array() ) ) );
// Update abbreviation as string
update_post_meta( $post_id, 'sp_abbreviation', sp_array_value( $_POST, 'sp_abbreviation', '' ) );
break;
case ( 'sp_player' ):