You are here

function views_rss_core_views_rss_item_elements in Views RSS 8.2

Same name and namespace in other branches
  1. 8.3 modules/views_rss_core/views_rss_core.module \views_rss_core_views_rss_item_elements()
  2. 6.2 modules/views_rss_core/views_rss_core.module \views_rss_core_views_rss_item_elements()
  3. 7.2 modules/views_rss_core/views_rss_core.module \views_rss_core_views_rss_item_elements()

Implements hook_views_rss_item_elements().

File

modules/views_rss_core/views_rss_core.module, line 126
Provides core <channel> and <item> elements for Views RSS module.

Code

function views_rss_core_views_rss_item_elements() {
  $elements['title'] = array(
    'description' => t('The title of the item. Required by RSS specification.'),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-item-title',
  );
  $elements['link'] = array(
    'description' => t('The URL of the item. Required by RSS specification.'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_item_link',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-item-link',
  );
  $elements['description'] = array(
    'description' => t('The item synopsis. Required by RSS specification.'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_item_description',
      'views_rss_rewrite_relative_paths',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-item-description',
  );
  $elements['author'] = array(
    'description' => t('Email address of the author of the item. A feed published by an individual should omit this element and use the &lt;managingEditor&gt; or &lt;webMaster&gt; channel elements to provide contact information.'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_item_author',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-item-author',
  );
  $elements['category'] = array(
    'description' => t('Includes the item in one or more categories.'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_item_category',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-item-category',
  );
  $elements['comments'] = array(
    'description' => t('URL of a page for comments relating to the item.'),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-item-comments',
  );
  $elements['enclosure'] = array(
    'description' => t('Describes a media object that is attached to the item.'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_item_enclosure',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-item-enclosure',
  );
  $elements['guid'] = array(
    'description' => t('A string that uniquely identifies the item.'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_item_guid',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-item-guid',
  );
  $elements['pubDate'] = array(
    'description' => t('Indicates when the item was published.'),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-item-pubdate',
  );
  $elements['source'] = array(
    'configurable' => FALSE,
    'description' => t('The RSS channel that the item came from.'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_item_source',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-item-source',
  );
  return $elements;
}