You are here

function theme_gdpr_consent_accept_label in GDPR Consent 7

Theme the accept consent label.

Parameters

array $variables: An associative array of variables for themeing.

2 theme calls to theme_gdpr_consent_accept_label()
gdpr_consent_accept_form in ./gdpr_consent.module
Consent acceptance form.
gdpr_consent_display_fields in ./gdpr_consent.module
Displaying fields for consent.

File

./gdpr_consent.module, line 499
Module file for GDPR Consent.

Code

function theme_gdpr_consent_accept_label(array $variables) {
  if ($variables['link']) {

    // Display a link to the consent.
    switch ($variables['target_link']) {
      case 'new_window':
        return t('<a href="@terms" target="_blank">I give consent to gather and process my data</a>.', array(
          '@terms' => url('gdpr_consent'),
        ));
      case 'lightbox2':
        return t('<a href="@terms" rel="lightmodal">I give consent to gather and process my data</a>.', array(
          '@terms' => url('gdpr_consent'),
        ));
      default:
        return t('<strong>Accept</strong> <a href="@terms">consent of use</a>.', array(
          '@terms' => url('gdpr_consent'),
        ));
    }
  }
  else {
    return t('I give consent to gather and process my data.');
  }
}