function theme_gdpr_consent_display in GDPR Consent 7
Theme function for consent display.
Parameters
array $variables: Array of form elements.
Return value
array Array of form elements.
4 theme calls to theme_gdpr_consent_display()
- gdpr_consent_accept_form in ./
gdpr_consent.module - Consent acceptance form.
- gdpr_consent_form_user_profile_form_alter in ./
gdpr_consent.module - Implements hook_form_FORM_ID_alter().
- gdpr_consent_form_user_register_form_alter in ./
gdpr_consent.module - Implements hook_form_FORM_ID_alter().
- theme_gdpr_consent_administration in ./
gdpr_consent.admin.inc - Theme function for administration.
File
- ./
gdpr_consent.module, line 475 - Module file for GDPR Consent.
Code
function theme_gdpr_consent_display(array $variables) {
$form = $variables['form'];
if (!empty($form['gdpr_consent']['conditions']['#markup'])) {
// Scroll box (CSS).
$mode = variable_get('gdpr_consent_display', '1');
if ($mode == 0) {
$form['gdpr_consent']['#attached']['css'][] = drupal_get_path('module', 'gdpr_consent') . '/gdpr_consent.css';
$form['gdpr_consent']['conditions']['#prefix'] = '<div class="gdpr_consent-terms">';
$form['gdpr_consent']['conditions']['#suffix'] = '</div>';
}
}
return $form;
}