xmlsitemap_custom.module in XML sitemap 7.2
Same filename and directory in other branches
Main file for XML sitemap Custom.
File
xmlsitemap_custom/xmlsitemap_custom.moduleView source
<?php
/**
* @file
* Main file for XML sitemap Custom.
*/
/**
* Implements hook_menu().
*/
function xmlsitemap_custom_menu() {
$items['admin/config/search/xmlsitemap/custom'] = array(
'title' => 'Custom links',
'page callback' => 'xmlsitemap_custom_list_links',
'access arguments' => array(
'administer xmlsitemap',
),
'type' => MENU_LOCAL_TASK,
'file' => 'xmlsitemap_custom.admin.inc',
);
$items['admin/config/search/xmlsitemap/custom/add'] = array(
'title' => 'Add custom link',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'xmlsitemap_custom_edit_link_form',
),
'access arguments' => array(
'administer xmlsitemap',
),
'type' => MENU_LOCAL_ACTION,
'file' => 'xmlsitemap_custom.admin.inc',
'modal' => TRUE,
);
$items['admin/config/search/xmlsitemap/custom/edit/%xmlsitemap_custom'] = array(
'title' => 'Edit custom link',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'xmlsitemap_custom_edit_link_form',
6,
),
'access arguments' => array(
'administer xmlsitemap',
),
'file' => 'xmlsitemap_custom.admin.inc',
'modal' => TRUE,
);
$items['admin/config/search/xmlsitemap/custom/delete/%xmlsitemap_custom'] = array(
'title' => 'Delete custom link',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'xmlsitemap_custom_delete_link_form',
6,
),
'access arguments' => array(
'administer xmlsitemap',
),
'file' => 'xmlsitemap_custom.admin.inc',
'modal' => TRUE,
);
return $items;
}
/**
* Menu load callback; load a custom sitemap link from the {xmlsitemap} table.
*
* @param string $id
* The sitemap link ID of the custom link to load.
*
* @see xmlsitemap_link_load()
*/
function xmlsitemap_custom_load($id) {
return xmlsitemap_link_load('custom', $id);
}
/**
* Implements hook_xmlsitemap_link_info().
*/
function xmlsitemap_custom_xmlsitemap_link_info() {
return array(
'custom' => array(
'label' => t('Custom links'),
),
);
}
Functions
Name | Description |
---|---|
xmlsitemap_custom_load | Menu load callback; load a custom sitemap link from the {xmlsitemap} table. |
xmlsitemap_custom_menu | Implements hook_menu(). |
xmlsitemap_custom_xmlsitemap_link_info | Implements hook_xmlsitemap_link_info(). |