Commit c593dbee authored by Dave Reid's avatar Dave Reid

Revert "Issue #2663632 by ryan.gibson, RenatoG, Michelle, Chris Matthews,...

Revert "Issue #2663632 by ryan.gibson, RenatoG, Michelle, Chris Matthews, pifagor: Exclude unaliased paths from sitemap"

This reverts commit 12d0d1d3.
parent ed734b19
......@@ -408,11 +408,6 @@ function xmlsitemap_settings_form($form, &$form_state) {
'#default_value' => variable_get('xmlsitemap_disable_cron_regeneration', 0),
'#description' => t('This can be disabled if other methods are being used to generate the sitemap files, like <em>drush xmlsitemap-regenerate</em>.'),
$form['advanced']['xmlsitemap_skip_unaliased'] = array(
'#type' => 'checkbox',
'#title' => t('Skip unaliased nodes when generating sitemap.'),
'#default_value' => variable_get('xmlsitemap_skip_unaliased', 0),
$form['advanced']['xmlsitemap_output_elements'] = array(
'#type' => 'checkboxes',
'#title' => t('Enable or disable the individual @loc elements from output', array('@loc' => '<loc>')),
......@@ -259,11 +259,6 @@ function xmlsitemap_generate_chunk(stdClass $sitemap, XMLSitemapWriter $writer,
// @todo Should this be moved to XMLSitemapWritier::writeSitemapElement()?
drupal_alter('xmlsitemap_element', $element, $link, $sitemap);
// If the setting to skip unaliased nodes is enabled, and there is no alias
// for the node, don't write it to the sitemap.
if (variable_get('xmlsitemap_skip_unaliased', 0) && strpos($element['loc'], "node") !== FALSE) {
$element = "";
if (!empty($element)) {
$writer->writeSitemapElement('url', $element);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment