You are here

function xmlsitemap_get_directory in XML sitemap 6.2

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

End of "defgroup xmlsitemap_link_api"

Related topics

8 calls to xmlsitemap_get_directory()
xmlsitemap_check_all_directories in ./xmlsitemap.module
xmlsitemap_check_directory in ./xmlsitemap.module
Check that the sitemap files directory exists and is writable.
xmlsitemap_clear_directory in ./xmlsitemap.module
xmlsitemap_requirements in ./xmlsitemap.install
Implements hook_requirements().
xmlsitemap_settings_form in ./xmlsitemap.admin.inc
Form builder; Administration settings form.

... See full list

File

./xmlsitemap.module, line 774
Main file for the xmlsitemap module.

Code

function xmlsitemap_get_directory(stdClass $sitemap = NULL) {
  $directory =& xmlsitemap_static(__FUNCTION__);
  if (!isset($directory)) {
    $directory = file_create_path(variable_get('xmlsitemap_path', 'xmlsitemap'));
  }
  if (!empty($sitemap->smid)) {
    return $directory . '/' . $sitemap->smid;
  }
  else {
    return $directory;
  }
}