本文整理匯總了PHP中GVCommon::js_encrypt方法的典型用法代碼示例。如果您正苦於以下問題:PHP GVCommon::js_encrypt方法的具體用法?PHP GVCommon::js_encrypt怎麽用?PHP GVCommon::js_encrypt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GVCommon
的用法示例。
在下文中一共展示了GVCommon::js_encrypt方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$params = array();
// The default link is a mailto link
$link = 'mailto:' . $value;
// Is the subject set?
if (!empty($field_settings['emailsubject'])) {
$subject = GravityView_API::replace_variables($field_settings['emailsubject'], $form, $entry);
$params[] = 'subject=' . str_replace('+', '%20', urlencode($subject));
}
// Is the body set?
if (!empty($field_settings['emailbody'])) {
$body = GravityView_API::replace_variables($field_settings['emailbody'], $form, $entry);
$params[] = 'body=' . str_replace('+', '%20', urlencode($body));
}
// If the subject and body have been set, use them
if (!empty($params)) {
$link .= '?' . implode('&', $params);
}
// Generate the link HTML
$output = gravityview_get_link($link, $value);
}
/**
* Prevent encrypting emails no matter what - this is handy for DataTables exports, for example
* @since 1.1.6
* @var boolean
*/
$prevent_encrypt = apply_filters('gravityview_email_prevent_encrypt', false);
// If encrypting the link
if (!empty($field_settings['emailencrypt']) && !$prevent_encrypt) {
$output = GVCommon::js_encrypt($output);
}
echo $output;