1
0
mirror of https://github.com/e107inc/e107.git synced 2025-02-11 18:14:10 +01:00

Merge pull request #3580 from Jimmi08/patch-2

GDPR link - possibility to use e107 constants in url link
This commit is contained in:
Cameron 2018-12-19 12:01:12 -08:00 committed by GitHub
commit 6123f05da8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,8 @@ class contact_shortcodes extends e_shortcode
$parm = array_merge(array('required'=>1), $parm);
return e107::getForm()->checkbox('gdpr', 1,false, $parm);
}
/* {CONTACT_GDPR_LINK} */
function sc_contact_gdpr_link($parm='')
{
$pp = e107::getPref('gdpr_privacypolicy', '');
@ -182,6 +183,7 @@ class contact_shortcodes extends e_shortcode
{
return '';
}
$pp = e107::getParser()->replaceConstants($pp, 'full');
$class = (!empty($parm['class'])) ? $parm['class'] : '';
$link = sprintf('<span class="%s"><a href="%s" target="_blank">%s</a></span>', $class, $pp, LANCONTACT_22);
$text = e107::getParser()->lanVars(LANCONTACT_23, $link);