format_rss_item

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

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

Версии
5 – 6
format_rss_item($title, $link, $description, $args = array())

Форматирует один элемент(новость) RSS.

Произвольный элемент может быть добавлен через ассоциативный массив $args.

Связанные темы

▾ 2 функции вызывают format_rss_item()

node_feed in modules/node/node.module
A generic function for generating RSS feeds from a set of nodes.
theme_aggregator_page_rss in modules/aggregator/aggregator.pages.inc
Темизирует вывод RSS.

Код

<?php
function format_rss_item($title, $link, $description, $args = array()) {
  $output = "<item>\n";
  $output .= ' <title>'. check_plain($title) ."</title>\n";
  $output .= ' <link>'. check_url($link) ."</link>\n";
  $output .= ' <description>'. check_plain($description) ."</description>\n";
  $output .= format_xml_elements($args);
  $output .= "</item>\n";

  return $output;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

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