You are here

function theme_quote in Quote 7

Same name and namespace in other branches
  1. 5 quote.module \theme_quote()
  2. 6.2 quote.module \theme_quote()
  3. 6 quote.module \theme_quote()

Theme a quote with its content and author - default theme function.

Parameters

$vars: An associative array with the following structure: 'quote_content' - The quote's string content. 'quote_author' - The name of the author of the quote.

Return value

$quote_output Themed quote.

1 theme call to theme_quote()
_quote_filter_process_callback in ./quote.module
Generate and return the quote theming for a quote occurence found by _quote_filter_process().

File

./quote.module, line 364
The quote module provides a filter and appropriate links that allow users to quote nodes and other comments in their own comments.

Code

function theme_quote($vars) {
  extract($vars);
  $zebra = $nest & 1 ? 'odd' : 'even';
  $quote_output = '<blockquote class="quote-msg quote-nest-' . $nest . ' ' . $zebra . '">';
  if ($quote_author != '') {
    $quote_author = t('%author wrote: ', array(
      '%author' => $quote_author,
    ));
  }
  else {
    $quote_author = t('Quote: ');
  }
  $quote_author = '<div class="quote-author">' . $quote_author . '</div>';
  $quote_output .= $quote_author . $quote_content . '</blockquote>';
  return $quote_output;
}