1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

GDPR link - possibility to use e107 constants in url link

This commit is contained in:
Jimako
2018-12-19 09:26:47 +01:00
committed by GitHub
parent 519001a690
commit cf471a8ccb

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);