You are here

function xmlsitemap_engines_can_submit in XML sitemap 7.2

Same name and namespace in other branches
  1. 8 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_can_submit()
  2. 6.2 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_can_submit()
  3. 2.x xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_can_submit()

Check if can submit.

2 calls to xmlsitemap_engines_can_submit()
xmlsitemap_engines_submit_access in xmlsitemap_engines/xmlsitemap_engines.module
Submit access.
xmlsitemap_engines_xmlsitemap_sitemap_operations in xmlsitemap_engines/xmlsitemap_engines.module
Implements hook_xmlsitemap_sitemap_operations().

File

xmlsitemap_engines/xmlsitemap_engines.module, line 71
Main file for XML sitemap engines.

Code

function xmlsitemap_engines_can_submit() {

  // Skip if the site is offline since search engines will not be able to
  // access the site's content.
  if (variable_get('maintenance_mode', 0) || defined('MAINTENANCE_MODE')) {
    return FALSE;
  }
  if (!variable_get('xmlsitemap_engines_engines', array()) && !variable_get('xmlsitemap_engines_custom_urls', '')) {
    return FALSE;
  }
  return TRUE;
}