diff --git a/includes/admin/class-sp-admin-sports.php b/includes/admin/class-sp-admin-sports.php index 51ef5871..5c57eb6d 100644 --- a/includes/admin/class-sp-admin-sports.php +++ b/includes/admin/class-sp-admin-sports.php @@ -82,12 +82,12 @@ class SP_Admin_Sports { $post_type = 'sp_result'; $results = sp_array_value( $preset, 'results', array() ); self::delete_preset_posts( $post_type ); - $main_result = 0; + $primary_result = 0; foreach ( $results as $index => $result ) { $post = self::get_post_array( $result, $post_type ); if ( empty( $post ) ) continue; $id = self::insert_preset_post( $post, $index ); - if ( array_key_exists( 'main', $result ) ) $main_result = $post['post_name']; + if ( array_key_exists( 'primary', $result ) ) $primary_result = $post['post_name']; } // Performance @@ -135,7 +135,7 @@ class SP_Admin_Sports { update_post_meta( $id, 'sp_equation', sp_array_value( $statistic, 'equation', null ) ); update_post_meta( $id, 'sp_precision', sp_array_value( $statistic, 'precision', 0 ) ); } - update_option( 'sportspress_primary_result', $main_result ); + update_option( 'sportspress_primary_result', $primary_result ); } public static function delete_preset_posts( $post_type = null ) { diff --git a/presets/footy.json b/presets/footy.json index ef88d39a..89a757e0 100644 --- a/presets/footy.json +++ b/presets/footy.json @@ -17,7 +17,7 @@ { "name" : "Q4", "description" : "Fourth quarter points" }, "Goals", "Behinds", - { "name" : "Total", "description" : "Total points", "main" : 1 } + { "name" : "Total", "description" : "Total points", "primary" : 1 } ], "performance": [ "Kicks", diff --git a/presets/soccer.json b/presets/soccer.json index f413c614..5c5c2d72 100644 --- a/presets/soccer.json +++ b/presets/soccer.json @@ -15,7 +15,7 @@ { "name" : "1st Half", "description" : "1st half goals" }, { "name" : "2nd Half", "description" : "2nd half goals" }, { "name" : "PK", "description" : "Penalty kicks" }, - { "name" : "Goals", "description" : "Total goals", "main" : 1 } + { "name" : "Goals", "description" : "Total goals", "primary" : 1 } ], "performance": [ "Goals",