You are here

function theme_legal_accept_label in Legal 7

Same name and namespace in other branches
  1. 7.2 legal.module \theme_legal_accept_label()

Theme the accept terms and conditions label.

Parameters

$variables: An associative array of variables for themeing, containing:

  • link: Whether or not the label contains a link to the legal page.
1 theme call to theme_legal_accept_label()
legal_display_fields in ./legal.module

File

./legal.module, line 256
Module file for Legal.

Code

function theme_legal_accept_label($variables) {
  if ($variables['link']) {

    // Display a link to the T&Cs.
    switch ($variables['target_link']) {
      case 'new_window':
        return t('<strong>Accept</strong> <a href="@terms" target="_blank">Terms & Conditions</a> of Use', array(
          '@terms' => url('legal'),
        ));
        break;
      case 'lightbox2':
        return t('<strong>Accept</strong> <a href="@terms #content" rel="lightmodal">Terms & Conditions</a> of Use', array(
          '@terms' => url('legal'),
        ));
        break;
      default:
        return t('<strong>Accept</strong> <a href="@terms">Terms & Conditions</a> of Use', array(
          '@terms' => url('legal'),
        ));
        break;
    }
  }
  else {
    return t('<strong>Accept</strong> Terms & Conditions of Use');
  }
}