本文整理汇总了PHP中Cart66Common::deepTagClean方法的典型用法代码示例。如果您正苦于以下问题:PHP Cart66Common::deepTagClean方法的具体用法?PHP Cart66Common::deepTagClean怎么用?PHP Cart66Common::deepTagClean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cart66Common
的用法示例。
在下文中一共展示了Cart66Common::deepTagClean方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveSettings
public static function saveSettings()
{
$error = '';
foreach ($_REQUEST as $key => $value) {
if ($key[0] != '_' && $key != 'action' && $key != 'submit' && $key) {
if (is_array($value) && $key != 'admin_page_roles') {
$value = array_filter($value, 'strlen');
if (empty($value)) {
$value = '';
} else {
$value = implode('~', $value);
}
}
if ($key == 'status_options') {
$value = str_replace('&', '', Cart66Common::deepTagClean($value));
}
if ($key == 'home_country') {
$hc = Cart66Setting::getValue('home_country');
if ($hc != $value) {
$method = new Cart66ShippingMethod();
$method->clearAllLiveRates();
}
} elseif ($key == 'countries') {
if (strpos($value, '~') === false) {
Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] country list value: {$value}");
$value = '';
}
if (empty($value) && !empty($_REQUEST['international_sales'])) {
$error = "Please select at least one country to ship to.";
}
} elseif ($key == 'enable_logging' && $value == '1') {
try {
Cart66Log::createLogFile();
} catch (Cart66Exception $e) {
$error = '<span>' . $e->getMessage() . '</span>';
Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Caught Cart66 exception: " . $e->getMessage());
}
} elseif ($key == 'constantcontact_list_ids') {
} elseif ($key == 'admin_page_roles') {
$value = serialize($value);
Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Saving Admin Page Roles: " . print_r($value, true));
} elseif ($key == 'currency_decimals' && $value == 0) {
$value = 'no_decimal';
}
Cart66Setting::setValue($key, trim(stripslashes($value)));
if (CART66_PRO && $key == 'order_number') {
$versionInfo = get_transient('_cart66_version_request');
if (!$versionInfo) {
$versionInfo = Cart66ProCommon::getVersionInfo();
set_transient('_cart66_version_request', $versionInfo, 43200);
}
if (!$versionInfo) {
Cart66Setting::setValue('order_number', '');
$error = '<span>' . __('Invalid Order Number', 'cart66') . '</span>';
}
}
}
}
if ($error) {
$result[0] = 'Cart66Modal alert-message alert-error';
$result[1] = "<strong>" . __("Warning", "cart66") . "</strong><br/>{$error}";
} else {
$result[0] = 'Cart66Modal alert-message success';
$result[1] = '<strong>Success</strong><br/>' . $_REQUEST['_success'] . '<br>';
}
$out = json_encode($result);
echo $out;
die;
}