home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (xmlsitemap_engines.api.php)

This example Drupal source code file (xmlsitemap_engines.api.php) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

array, engines, function, hook_xmlsitemap_engine_info, hook_xmlsitemap_engine_info_alter, name, php, return, search, url

The xmlsitemap_engines.api.php Drupal example source code

<?php
// $Id: xmlsitemap_engines.api.php,v 1.1.2.2 2009/12/18 23:32:40 davereid Exp $

/**
 * @file
 * Hooks provided by the XML sitemap engines module.
 */

/**
 * @addtogroup hooks
 * @{
 */

/**
 * Provide a list of supported sitemap engines.
 */
function hook_xmlsitemap_engine_info() {
  $engines['example'] = array(
    'name' => t('Example search engine'),
    'url' => 'http://example.com/ping?sitemap=[sitemap]'
  );
  return $engines;
}

/**
 * Alter the list of sitemap engines.
 */
function hook_xmlsitemap_engine_info_alter(&$engines) {
  $engines['example']['name'] = t('Kitten Search');
  $engines['example']['url'] = 'http://kittens.com/ping?sitemap=[sitemap]';
}

/**
 * @} End of "addtogroup hooks".
 */

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal xmlsitemap_engines.api.php source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.