Add activation welcome and notices close #21

This commit is contained in:
Brian Miyaji
2014-03-31 01:42:56 +11:00
parent 87e0c574f4
commit dcec47abcf
17 changed files with 540 additions and 154 deletions

View File

@@ -112,6 +112,13 @@ class SP_Settings_General extends SP_Settings_Page {
* Save settings
*/
public function save() {
if ( isset( $_POST['sportspress_sport'] ) && ! empty( $_POST['sportspress_sport'] ) && get_option( 'sportspress_sport', null ) != $_POST['sportspress_sport'] ):
$sport = SP()->sports->$_POST['sportspress_sport'];
SP_Admin_Settings::configure_sport( $sport );
update_option( 'sportspress_sport', $_POST['sportspress_sport'] );
update_option( '_sp_needs_welcome', 0 );
endif;
$settings = $this->get_settings();
SP_Admin_Settings::save_fields( $settings );