public function sanitize_settings() { parent::sanitize_settings(); if ($this->phoneFormat && !in_array($this->phoneFormat, array('standard', 'international'))) { $this->phoneFormat = 'standard'; } }
public function sanitize_settings() { parent::sanitize_settings(); if (is_multisite() || !current_user_can('manage_options')) { $allowed_tags = wp_kses_allowed_html('post'); $this->content = wp_kses($this->content, $allowed_tags); } }
public function sanitize_settings() { parent::sanitize_settings(); $this->enableEnhancedUI = (bool) $this->enableEnhancedUI; if ($this->type === 'post_category') { $this->displayAllCategories = (bool) $this->displayAllCategories; } }
public function sanitize_settings() { parent::sanitize_settings(); if ($this->nextButton) { $this->nextButton['imageUrl'] = wp_strip_all_tags($this->nextButton['imageUrl']); $allowed_tags = wp_kses_allowed_html('post'); $this->nextButton['text'] = wp_kses($this->nextButton['text'], $allowed_tags); $this->nextButton['type'] = wp_strip_all_tags($this->nextButton['type']); if (isset($this->nextButton['conditionalLogic']) && is_array($this->nextButton['conditionalLogic'])) { $this->nextButton['conditionalLogic'] = $this->sanitize_settings_conditional_logic($this->nextButton['conditionalLogic']); } } }
public function sanitize_settings() { parent::sanitize_settings(); $price_number = GFCommon::to_number($this->basePrice); $this->basePrice = GFCommon::to_money($price_number); }
public function sanitize_settings() { parent::sanitize_settings(); $this->enableCalculation = (bool) $this->enableCalculation; }
public function sanitize_settings() { parent::sanitize_settings(); if (!$this->timeFormat || !in_array($this->timeFormat, array(12, 24))) { $this->timeFormat = '12'; } }
public function sanitize_settings() { parent::sanitize_settings(); $this->calendarIconType = wp_strip_all_tags($this->calendarIconType); $this->calendarIconUrl = wp_strip_all_tags($this->calendarIconUrl); if ($this->dateFormat && !in_array($this->dateFormat, array('mdy', 'dmy', 'dmy_dash', 'dmy_dot', 'ymd_slash', 'ymd_dash', 'ymd_dot'))) { $this->dateFormat = 'mdy'; } }
public function sanitize_settings() { parent::sanitize_settings(); if (!$this->get_phone_format()) { $this->phoneFormat = 'standard'; } }
public function sanitize_settings() { parent::sanitize_settings(); if ($this->addressType) { $this->addressType = wp_strip_all_tags($this->addressType); } if ($this->defaultCountry) { $this->defaultCountry = wp_strip_all_tags($this->defaultCountry); } if ($this->defaultProvince) { $this->defaultProvince = wp_strip_all_tags($this->defaultProvince); } }
public function sanitize_settings() { parent::sanitize_settings(); $this->maxRows = absint($this->maxRows); }
public function sanitize_settings() { parent::sanitize_settings(); if (is_array($this->inputs)) { foreach ($this->inputs as &$input) { if (isset($input['choices']) && is_array($input['choices'])) { $input['choices'] = $this->sanitize_settings_choices($input['choices']); } } } }
public function sanitize_settings() { parent::sanitize_settings(); if ($this->type === 'option') { $this->productField = absint($this->productField); } if ($this->type === 'post_category') { $this->displayAllCategories = (bool) $this->displayAllCategories; } }
public function sanitize_settings() { parent::sanitize_settings(); $this->enableCalculation = (bool) $this->enableCalculation; if ($this->numberFormat == 'currency') { require_once GFCommon::get_base_path() . '/currency.php'; $currency = new RGCurrency(GFCommon::get_currency()); $this->rangeMin = $currency->to_number($this->rangeMin); $this->rangeMax = $currency->to_number($this->rangeMax); } elseif ($this->numberFormat == 'decimal_comma') { $this->rangeMin = GFCommon::clean_number($this->rangeMin, 'decimal_comma'); $this->rangeMax = GFCommon::clean_number($this->rangeMax, 'decimal_comma'); } elseif ($this->numberFormat == 'decimal_dot') { $this->rangeMin = GFCommon::clean_number($this->rangeMin, 'decimal_dot'); $this->rangeMin = GFCommon::clean_number($this->rangeMin, 'decimal_dot'); } }
public function sanitize_settings() { parent::sanitize_settings(); $allowed_tags = wp_kses_allowed_html('post'); $this->content = wp_kses($this->content, $allowed_tags); }
public function sanitize_settings() { parent::sanitize_settings(); if ($this->maxFileSize) { $this->maxFileSize = absint($this->maxFileSize); } if ($this->maxFiles) { $this->maxFiles = preg_replace('/[^0-9,.]/', '', $this->maxFiles); } $this->multipleFiles = (bool) $this->multipleFiles; $this->allowedExtensions = sanitize_text_field($this->allowedExtensions); }
public function sanitize_settings() { parent::sanitize_settings(); $this->gsurveyLikertEnableMultipleRows = (bool) $this->gsurveyLikertEnableMultipleRows; $this->gsurveyLikertEnableScoring = (bool) $this->gsurveyLikertEnableScoring; if ($this->gsurveyLikertEnableMultipleRows && is_array($this->gsurveyLikertRows)) { foreach ($this->gsurveyLikertRows as &$row) { if (isset($row['text'])) { $row['text'] = trim($this->maybe_wp_kses($row['text'])); } if (isset($row['value'])) { $row['value'] = wp_strip_all_tags($row['value']); } } } }