You are here

function xmlsitemap_engines_xmlsitemap_engines in XML sitemap 5

Same name and namespace in other branches
  1. 5.2 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_xmlsitemap_engines()

Implementation of hook_xmlsitemap_engines().

Related topics

File

xmlsitemap_engines/xmlsitemap_engines.module, line 15
Define actions for Google, Yahoo!, Ask, and Bing.

Code

function xmlsitemap_engines_xmlsitemap_engines($op, $type = NULL) {
  switch ($op) {
    case 'form':
      $form = array();
      $form = array_merge($form, _xmlsitemap_engines_google('form'));
      $form = array_merge($form, _xmlsitemap_engines_yahoo('form'));
      $form = array_merge($form, _xmlsitemap_engines_ask('form'));
      $form = array_merge($form, _xmlsitemap_engines_bing('form'));
      return $form;
    case 'ping':
      _xmlsitemap_engines_google('ping');
      _xmlsitemap_engines_yahoo('ping');
      _xmlsitemap_engines_ask('ping');
      _xmlsitemap_engines_bing('ping');
      break;
    case 'access':
      if (strpos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== FALSE) {
        return _xmlsitemap_engines_google('access', $type);
      }
  }
}