You are here

function copyright_block_token_values in Copyright Block module 6

Implementation of hook_token_values().

File

./copyright_block.module, line 98
Creates a dynamic customisable copyright message block.

Code

function copyright_block_token_values($type, $object = NULL, $options = array()) {
  $values = array();
  if ($type == 'global') {
    $start_year = variable_get('copyright_block_start_year', date('Y'));
    $current_year = date('Y');
    $values['copyright-block-dates'] = $current_year > $start_year ? $start_year . '-' . $current_year : $start_year;
  }
  return $values;
}