You are here

function xmlsitemap_var in XML sitemap 6.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_var()
  2. 7.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
XMLSitemapUnitTest::testAssertFlag in ./xmlsitemap.test
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 289
Main file for the xmlsitemap module.

Code

function xmlsitemap_var($name, $default = NULL) {
  $defaults =& xmlsitemap_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' => theme('placeholder', $name),
    )));
  }
  return variable_get($name, isset($default) || !isset($defaults[$name]) ? $default : $defaults[$name]);
}