function xmlsitemap_engines_can_submit in XML sitemap 2.x
Same name and namespace in other branches
- 8 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_can_submit()
- 6.2 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_can_submit()
- 7.2 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 53 - Main file for the 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 (\Drupal::state()
->get('system.maintenance_mode') || defined('MAINTENANCE_MODE')) {
return FALSE;
}
if (!\Drupal::config('xmlsitemap_engines.settings')
->get('engines') && !\Drupal::config('xmlsitemap_engines.settings')
->get('custom_urls')) {
return FALSE;
}
return TRUE;
}