/**
  * Save settings
  */
 public function save()
 {
     global $current_section;
     $settings = $this->get_settings();
     PH_Admin_Settings::save_fields($settings);
     if ($current_section) {
         do_action('propertyhive_update_options_' . $this->id . '_' . $current_section);
     }
 }
 /**
  * Save settings.
  */
 public function save()
 {
     PH_Admin_Settings::save_fields($this->get_settings());
     if (isset($_POST['propertyhive_auto_property_match']) && $_POST['propertyhive_auto_property_match'] == '1') {
         update_option('propertyhive_auto_property_match_enabled_date', date("Y-m-d H:i:s"), FALSE);
         wp_schedule_event(time(), 'hourly', 'propertyhive_auto_email_match');
         //  Skew it by 30 minutes to reduce conflict with email log processing
     } else {
         wp_clear_scheduled_hook('propertyhive_auto_email_match');
     }
 }
/**
 * Update all settings which are passed.
 *
 * @access public
 * @param array $options
 * @return void
 */
function propertyhive_update_options($options)
{
    if (!class_exists('PH_Admin_Settings')) {
        include 'class-ph-admin-settings.php';
    }
    PH_Admin_Settings::save_fields($options);
}
 /**
  * Save settings.
  */
 public function save()
 {
     PH_Admin_Settings::save_fields($this->get_settings());
     PH()->license->ph_check_licenses(true);
 }
 /**
  * Save settings
  */
 public function save()
 {
     global $current_section;
     if ($current_section != '') {
         switch ($current_section) {
             case 'international':
                 if (!isset($_POST['propertyhive_countries']) || isset($_POST['propertyhive_countries']) && empty($_POST['propertyhive_countries'])) {
                     // If we haven't selected which countries we operate in
                     update_option('propertyhive_countries', array($_POST['propertyhive_default_country']));
                 } else {
                     // We have default country and countries set
                     // Make sure default country is in list of countries selected
                     if (!in_array($_POST['propertyhive_default_country'], $_POST['propertyhive_countries'])) {
                         $_POST['propertyhive_default_country'] = $_POST['propertyhive_countries'][0];
                     }
                     update_option('propertyhive_default_country', $_POST['propertyhive_default_country']);
                     update_option('propertyhive_countries', $_POST['propertyhive_countries']);
                 }
                 do_action('propertyhive_update_currency_exchange_rates');
                 break;
             case 'map':
                 $settings = $this->get_general_map_setting();
                 PH_Admin_Settings::save_fields($settings);
                 break;
             default:
                 die("Unknown setting section");
         }
     } else {
         $settings = $this->get_settings();
         PH_Admin_Settings::save_fields($settings);
         flush_rewrite_rules();
     }
 }