drupal_add_feed

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/common.inc, строка 170

Версии
5 – 6
drupal_add_feed($url = NULL, $title = '')

Добавляет URL фида для текущей страницы.

Параметры

$url URL фида.

$title Заголовок фида.

▾ 8 функции вызывают drupal_add_feed()

aggregator_page_category in modules/aggregator/aggregator.pages.inc
Menu callback; displays all the items aggregated in a particular category.
aggregator_page_last in modules/aggregator/aggregator.pages.inc
Menu callback; displays the most recent items gathered from any feed.
blog_page_last in modules/blog/blog.pages.inc
Коллбэк меню. Показывает страницу Друпал с последними записями в блогах пользователей.
blog_page_user in modules/blog/blog.pages.inc
Коллбэк меню. Показывает страницу Друпал с последними записями в блоге данного пользователя.
drupal_get_feeds in includes/common.inc
Get the feed URLs for the current page.
node_page_default in modules/node/node.module
Menu callback; Generate a listing of promoted nodes.
taxonomy_term_page in modules/taxonomy/taxonomy.pages.inc
Коллбэк меню; отображает все ноды, связанные с термином таксономии.
template_preprocess_forums in modules/forum/forum.module
Process variables for forums.tpl.php

Код

<?php
function drupal_add_feed($url = NULL, $title = '') {
  static $stored_feed_links = array();

  if (!is_null($url) && !isset($stored_feed_links[$url])) {
    $stored_feed_links[$url] = theme('feed_icon', $url, $title);

    drupal_add_link(array('rel' => 'alternate',
                          'type' => 'application/rss+xml',
                          'title' => $title,
                          'href' => $url));
  }
  return $stored_feed_links;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему