本文整理匯總了PHP中GF_Field::sanitize_settings方法的典型用法代碼示例。如果您正苦於以下問題:PHP GF_Field::sanitize_settings方法的具體用法?PHP GF_Field::sanitize_settings怎麽用?PHP GF_Field::sanitize_settings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GF_Field
的用法示例。
在下文中一共展示了GF_Field::sanitize_settings方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: sanitize_settings
public function sanitize_settings()
{
parent::sanitize_settings();
if ($this->phoneFormat && !in_array($this->phoneFormat, array('standard', 'international'))) {
$this->phoneFormat = 'standard';
}
}
示例2: sanitize_settings
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);
}
}
示例3: sanitize_settings
public function sanitize_settings()
{
parent::sanitize_settings();
$this->enableEnhancedUI = (bool) $this->enableEnhancedUI;
if ($this->type === 'post_category') {
$this->displayAllCategories = (bool) $this->displayAllCategories;
}
}
示例4: sanitize_settings
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']);
}
}
}
示例5: sanitize_settings
public function sanitize_settings()
{
parent::sanitize_settings();
$price_number = GFCommon::to_number($this->basePrice);
$this->basePrice = GFCommon::to_money($price_number);
}
示例6: sanitize_settings
public function sanitize_settings()
{
parent::sanitize_settings();
$this->enableCalculation = (bool) $this->enableCalculation;
}
示例7: sanitize_settings
public function sanitize_settings()
{
parent::sanitize_settings();
if (!$this->timeFormat || !in_array($this->timeFormat, array(12, 24))) {
$this->timeFormat = '12';
}
}
示例8: sanitize_settings
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';
}
}
示例9: sanitize_settings
public function sanitize_settings()
{
parent::sanitize_settings();
if (!$this->get_phone_format()) {
$this->phoneFormat = 'standard';
}
}
示例10: sanitize_settings
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);
}
}
示例11: sanitize_settings
public function sanitize_settings()
{
parent::sanitize_settings();
$this->maxRows = absint($this->maxRows);
}
示例12: sanitize_settings
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']);
}
}
}
}
示例13: sanitize_settings
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;
}
}
示例14: sanitize_settings
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');
}
}
示例15: sanitize_settings
public function sanitize_settings()
{
parent::sanitize_settings();
$allowed_tags = wp_kses_allowed_html('post');
$this->content = wp_kses($this->content, $allowed_tags);
}