Как в Drupal полностью отключить RSS.

Рубрика: 

Отключить rss полностью можно только при помощи хака ядра. Обновление версии Drupal, повлечет за собой сброс настроек - необходимо помнить об этом!

Итак, для выполнения поставленной цели нам необходимо модифицировать два файла из папки includes.

Первый файл theme.inc

function theme_feed_icon($variables) {
  $text = t('Subscribe to @feed-title', array('@feed-title' => $variables['title']));
/*  if ($image = theme('image', array('path' => 'misc/feed.png', 'alt' => $text))) {
    return l($image, $variables['url'], array('html' => TRUE, 'attributes' => array('class' => array('feed-icon'), 'title' => $text)));
  }
*/
}

Второй common.inc

function drupal_add_feed($url = NULL, $title = '') {
  $stored_feed_links = &drupal_static(__FUNCTION__, array());
 
/*  if (isset($url)) {
    $stored_feed_links[$url] = theme('feed_icon', array('url' => $url, 'title' => $title));
 
    drupal_add_html_head_link(array(
      'rel' => 'alternate',
      'type' => 'application/rss+xml',
      'title' => $title,
      // Force the URL to be absolute, for consistency with other <link> tags
      // output by Drupal.
      'href' => url($url, array('absolute' => TRUE)),
    ));
  }
*/  return $stored_feed_links;
}
© 2011-2012 Dimaseo.