You are here

function _quote_filter_process_callback in Quote 7

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

Generate and return the quote theming for a quote occurence found by _quote_filter_process().

Parameters

$matches: The RegExp matches (for author and quote) found in _quote_filter_process().

Return value

$output_quote Themed quote.

1 string reference to '_quote_filter_process_callback'
_quote_filter_process in ./quote.module
Replace [quote] tags with markup for display.

File

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

Code

function _quote_filter_process_callback($matches) {
  static $index = 0;
  $nest = ++$index;
  if (!stristr($matches[2], '[quote')) {
    $index = 0;
  }
  $quote_author = trim(drupal_substr($matches[1], 6));
  $quote_content = _quote_filter_process($matches[2]);
  $quote_output = theme('quote', array(
    'quote_content' => $quote_content,
    'quote_author' => $quote_author,
    'nest' => $nest,
  ));
  return $quote_output;
}