You are here

function xmlsitemap_engines_menu in XML sitemap 5

Same name and namespace in other branches
  1. 5.2 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_menu()
  2. 6.2 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_menu()
  3. 6 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_menu()
  4. 7.2 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_menu()

Implementation of hook_menu().

Related topics

File

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

Code

function xmlsitemap_engines_menu($may_cache) {
  $items = array();
  $access_content = user_access('access content');
  if ($may_cache) {
    if ($verify = variable_get('xmlsitemap_engines_google_verify', '')) {
      $items[] = array(
        'path' => $verify,
        'title' => t('Google verification page'),
        'callback' => '_xmlsitemap_engines_verify',
        'callback arguments' => array(
          'google',
        ),
        'type' => MENU_CALLBACK,
        'access' => $access_content,
      );
    }
    if (($verify = variable_get('xmlsitemap_engines_yahoo_verify', '')) != '') {
      $items[] = array(
        'path' => $verify,
        'title' => t('Yahoo! verification page'),
        'callback' => '_xmlsitemap_engines_verify',
        'callback arguments' => array(
          'yahoo',
        ),
        'type' => MENU_CALLBACK,
        'access' => $access_content,
      );
    }
    if (($verify = variable_get('xmlsitemap_engines_bing_verify', '')) != '') {
      $items[] = array(
        'path' => $verify,
        'title' => t('Bing verification page'),
        'callback' => '_xmlsitemap_engines_verify',
        'callback arguments' => array(
          'bing',
        ),
        'type' => MENU_CALLBACK,
        'access' => $access_content,
      );
    }
  }
  return $items;
}