function drush_xmlsitemap_index in XML sitemap 6.2
Same name and namespace in other branches
- 8 xmlsitemap.drush.inc \drush_xmlsitemap_index()
- 7.2 xmlsitemap.drush.inc \drush_xmlsitemap_index()
Process un-indexed XML sitemap links.
1 string reference to 'drush_xmlsitemap_index'
- xmlsitemap_drush_command in ./
xmlsitemap.drush.inc - Implements hook_drush_command().
File
- ./
xmlsitemap.drush.inc, line 78 - Drush integration functions for the xmlsitemap module.
Code
function drush_xmlsitemap_index() {
$limit = (int) drush_get_option('limit', variable_get('xmlsitemap_batch_limit', 100));
$count_before = db_result(db_query("SELECT COUNT(id) FROM {xmlsitemap}"));
module_invoke_all('xmlsitemap_index_links', $limit);
$count_after = db_result(db_query("SELECT COUNT(id) FROM {xmlsitemap}"));
if ($count_after == $count_before) {
drush_print(dt('No new XML sitemap links to index.'));
}
else {
drush_print(dt('Indexed @count new XML sitemap links.', array(
'@count' => $count_after - $count_before,
)));
}
}