You are here

function xmlsitemap_engines_submit_engines in XML sitemap 6.2

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

Submit the sitemaps to all the specified search engines.

Parameters

$smids: An optional array of XML sitemap IDs. If not provided, it will load all existing XML sitemaps.

1 call to xmlsitemap_engines_submit_engines()
xmlsitemap_engines_cron in xmlsitemap_engines/xmlsitemap_engines.module
Implements hook_cron().
1 string reference to 'xmlsitemap_engines_submit_engines'
xmlsitemap_engines_xmlsitemap_sitemap_operations in xmlsitemap_engines/xmlsitemap_engines.module
Implements hook_xmlsitemap_sitemap_operations().

File

xmlsitemap_engines/xmlsitemap_engines.module, line 97

Code

function xmlsitemap_engines_submit_engines(array $smids = array()) {
  if (empty($smids)) {
    $smids = FALSE;
  }
  $sitemaps = xmlsitemap_sitemap_load_multiple($smids);
  $engines = variable_get('xmlsitemap_engines_engines', array());
  $engine_info = xmlsitemap_engines_get_engine_info();
  foreach ($engines as $engine) {
    if (isset($engine_info[$engine]['url'])) {
      xmlsitemap_engines_submit_sitemaps($engine_info[$engine]['url'], $sitemaps);
    }
  }
  $custom_urls = variable_get('xmlsitemap_engines_custom_urls', '');
  $custom_urls = preg_split('/[\\r\\n]+/', $custom_urls, -1, PREG_SPLIT_NO_EMPTY);
  foreach ($custom_urls as $custom_url) {
    xmlsitemap_engines_submit_sitemaps($custom_url, $sitemaps);
  }
  variable_set('xmlsitemap_engines_submit_last', REQUEST_TIME);
}