/**
  * Manages settings actions.
  *
  * Verifies GET and POST requests to manage settings.
  *
  * @since  1.0.0
  */
 public function admin_settings_manager()
 {
     MS_Helper_Settings::print_admin_message();
     $this->get_active_tab();
     $msg = 0;
     $redirect = false;
     if ($this->is_admin_user()) {
         if ($this->verify_nonce() || $this->verify_nonce(null, 'GET')) {
             /**
              * After verifying permissions those filters can be used by Add-ons
              * to process their own settings form.
              *
              * @since  1.0.1.0
              */
             do_action('ms_admin_settings_manager-' . $this->active_tab);
             do_action('ms_admin_settings_manager', $this->active_tab);
             switch ($this->active_tab) {
                 case self::TAB_GENERAL:
                     lib3()->array->equip_request('action', 'network_site');
                     $action = $_REQUEST['action'];
                     $redirect = esc_url_raw(remove_query_arg(array('msg' => $msg)));
                     // See if we change settings for the network-wide mode.
                     if (MS_Plugin::is_network_wide()) {
                         $new_site_id = intval($_REQUEST['network_site']);
                         if ('network_site' == $action && !empty($new_site_id)) {
                             $old_site_id = MS_Model_Pages::get_setting('site_id');
                             if ($old_site_id != $new_site_id) {
                                 MS_Model_Pages::set_setting('site_id', $new_site_id);
                                 $msg = MS_Helper_Settings::SETTINGS_MSG_SITE_UPDATED;
                                 $redirect = esc_url_raw(add_query_arg(array('msg' => $msg)));
                             }
                         }
                     }
                     break;
                 case self::TAB_IMPORT:
                     $tool = MS_Factory::create('MS_Controller_Import');
                     // Output is passed to the view via self::_message()
                     $tool->process();
                     break;
                 case self::TAB_PAYMENT:
                 case self::TAB_MESSAGES:
                     break;
                 default:
                     break;
             }
         }
     }
     if ($redirect) {
         wp_safe_redirect($redirect);
         exit;
     }
 }