You are here

function theme_quotes_citation in Quotes 7

Theamable function that displays the authors citation.

2 calls to theme_quotes_citation()
quotes_node_view in ./quotes.module
Implements hook_node_view().
quotes_view in ./quotes.module
Implements hook_view().

File

./quotes.module, line 1601
The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.

Code

function theme_quotes_citation(&$variables) {
  $node = $variables['node'];
  $format = $variables['format'];

  // Are we in a quotes_block?
  $in_block = isset($node->in_block) && $node->in_block;

  // Add citation if present.
  if (!empty($node->quotes_citation)) {

    // Check to see if we want the citation to show.
    if ($in_block && isset($node->show_citation) && $node->show_citation == 0) {

      // Do not display citation for this block.
      $node->quotes_citation = '';
    }
    else {
      $node->content['quotes_citation'] = array(
        '#prefix' => '<div class="quotes-citation"><cite>',
        '#suffix' => '</cite></div>',
        '#markup' => check_markup($node->quotes_citation, $format, $node->language, FALSE),
      );
    }
  }
  $variables['node'] = $node;
}