Apply default sport and fix empty positions in wizard

This commit is contained in:
Brian Miyaji
2017-03-21 16:06:24 +11:00
parent 9fb4b6616a
commit 6d7f88d722
2 changed files with 7 additions and 5 deletions

View File

@@ -442,8 +442,9 @@ class SP_Admin_Settings {
// Select sport
case 'sport' :
$default = apply_filters( 'sportspress_default_sport', 'soccer' );
$option_value = self::get_option( $value['id'], $value['default'] );
if ( 'none' === $option_value ) $option_value = 'soccer';
if ( 'none' === $option_value ) $option_value = $default;
$categories = SP_Admin_Sports::sport_category_names();