/** * sanitizeSettingsMenu * * Sanitization callback for settings functions * Used to run imports for shows and profiles as well. * * @param mixed $options * @access public * @return void */ function sanitizeSettingsMenu($options) { if ($options['import'] == 1 || $options['update'] == 1) { $import = new ImportHelper(); try { if ($options['update'] == 1) { $import->update(); } else { $import->import(); } } catch (\Exception $e) { $_SESSION['wpspin-exception'] = $e->getMessage(); } } return $options; }