You are here

function xmlsitemap_var in XML sitemap 7.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_var()
  2. 6.2 xmlsitemap.module \xmlsitemap_var()
  3. 2.x xmlsitemap.module \xmlsitemap_var()

Internal implementation of variable_get().

8 calls to xmlsitemap_var()
XMLSitemapTestHelper::assertFlag in ./xmlsitemap.test
Assert Flag.
XMLSitemapUnitTest::testAssertFlag in ./xmlsitemap.test
Test Assert Flag.
xmlsitemap_get_chunk_size in ./xmlsitemap.module
Get the sitemap chunk size.
xmlsitemap_menu_cron in xmlsitemap_menu/xmlsitemap_menu.module
Implements hook_cron().
xmlsitemap_node_cron in xmlsitemap_node/xmlsitemap_node.module
Implements hook_cron().

... See full list

File

./xmlsitemap.module, line 342
xmlsitemap XML sitemap

Code

function xmlsitemap_var($name, $default = NULL) {
  $defaults =& drupal_static(__FUNCTION__);
  if (!isset($defaults)) {
    $defaults = xmlsitemap_variables();
  }
  $name = 'xmlsitemap_' . $name;

  // @todo Remove when stable.
  if (!isset($defaults[$name])) {
    trigger_error(strtr('Default variable for %variable not found.', array(
      '%variable' => drupal_placeholder($name),
    )));
  }
  return variable_get($name, isset($default) || !isset($defaults[$name]) ? $default : $defaults[$name]);
}