You are here

function _quote_variable_get in Quote 6

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

Return a quote module variable.

Parameters

$name: The name of the variable to retrieve.

Return value

The value of the variable requested.

3 calls to _quote_variable_get()
quote_form_alter in ./quote.module
Implementation of hook_form_alter().
quote_link in ./quote.module
Implementation of hook_link().
quote_settings_form in ./quote.admin.inc
Menu callback: quote module settings form.

File

./quote.module, line 200
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_variable_get($name = NULL) {
  static $variables = array();
  if (empty($variables)) {
    $defaults = array(
      'node_types' => array(
        'blog',
        'story',
      ),
      'node_link_display' => 1,
      'subject_required' => 1,
    );
    $variables = variable_get('quote', array());
    $variables = array_merge($defaults, $variables);
  }
  return $name ? $variables[$name] : $variables;
}