function theme_site_disclaimer_checkbox_label in Site Disclaimer 7
Same name and namespace in other branches
- 6 site_disclaimer.module \theme_site_disclaimer_checkbox_label()
Theme the Site Disclaimer checkbox label.
Parameters
$checkbox_label: The label from the admin form saved in the DB.
$node: The Site Disclaimer $node.
Return value
HTML output.
1 theme call to theme_site_disclaimer_checkbox_label()
- site_disclaimer_form_user_register_form_alter in ./
site_disclaimer.module - Implements hook_form_form_id_alter().
File
- ./
site_disclaimer.module, line 300 - This module adds Site Disclaimer to the registration page.
Code
function theme_site_disclaimer_checkbox_label($variables) {
$checkbox_label = $variables['checkbox_label'];
$node = $variables['node'];
if (!drupal_strlen($checkbox_label)) {
return '';
}
$output = $checkbox_label;
if (!empty($node)) {
//We are linking to the terms instead, replace the link.
$output = str_replace('@link', l($node->title, 'node/' . $node->nid), $output);
}
$output = _site_disclaimer_checkbox_label_substitute_links($output);
return $output;
}