You are here

function views_rss_core_views_rss_channel_elements in Views RSS 7.2

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

Implements hook_views_rss_channel_elements().

File

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

Code

function views_rss_core_views_rss_channel_elements() {
  $elements['title'] = array(
    'configurable' => FALSE,
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_title',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-title',
  );
  $elements['description'] = array(
    'description' => t('Description for this feed. If left blank, the default site mission will be used.'),
    'settings form' => array(
      '#type' => 'textarea',
      '#rows' => 3,
    ),
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_description',
      'views_rss_rewrite_relative_paths',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-description',
  );
  $elements['link'] = array(
    'configurable' => FALSE,
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_link',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-link',
  );
  $elements['atom:link'] = array(
    'configurable' => FALSE,
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_atom_link',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#namespace-elements-atom-link',
  );
  $elements['language'] = array(
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_language',
    ),
    'description' => t("The language the channel is written in. This allows aggregators to group all Italian language sites, for example, on a single page. See list of <a href='@w3c_url'>allowable values</a> for this element defined by the W3C. If left empty, it will use current site's language.", array(
      '@w3c_url' => url('http://www.w3.org/TR/REC-html40/struct/dirlang.html', array(
        'fragment' => 'langcodes',
      )),
    )),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-language',
  );
  $elements['category'] = array(
    'description' => t('Specify one or more categories that the channel belongs to. Separate multiple items with comma.'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_category',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-category',
  );
  $elements['image'] = array(
    'description' => t('Path to the image to be used as the artwork for your feed, for example <em>sites/default/files/AllAboutEverything.jpg</em>. Allowed image formats are GIF, JPEG or PNG. Maximum image width is 144 pixels, maximum height 400 pixels.'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_image',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-image',
  );
  $elements['copyright'] = array(
    'description' => t('Copyright notice for content in the channel.'),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-copyright',
  );
  $elements['managingEditor'] = array(
    'description' => t('Email address for person responsible for editorial content.'),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-managingeditor',
  );
  $elements['webMaster'] = array(
    'description' => t('Email address for person responsible for technical issues relating to channel.'),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-webmaster',
  );
  $elements['generator'] = array(
    'description' => t('A string indicating the program used to generate the channel.'),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-generator',
  );
  $elements['docs'] = array(
    'description' => t("A URL that points to the documentation for the format used in the RSS file. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is."),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-docs',
  );
  $elements['cloud'] = array(
    'description' => t("Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds. Example: <em>soap://rpc.sys.com:80/RPC2#pingMe</em>"),
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_cloud',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-cloud',
  );
  $elements['ttl'] = array(
    'description' => t("ttl stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source."),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-ttl',
  );
  $elements['skipHours'] = array(
    'description' => t('A hint for aggregators telling them which hours they can skip. The hours must be expressed as an integer representing the number of hours since 00:00:00 GMT. Values from 0 to 23 are permitted, with 0 representing midnight. An hour must not be duplicated.'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_skip',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-skiphours',
  );
  $elements['skipDays'] = array(
    'description' => t('A hint for aggregators telling them which days of the week they can skip (up to seven days).'),
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_skip',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-skipdays',
  );
  $elements['pubDate'] = array(
    'configurable' => FALSE,
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_date',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-pubdate',
  );
  $elements['lastBuildDate'] = array(
    'configurable' => FALSE,
    'preprocess functions' => array(
      'views_rss_core_preprocess_channel_date',
    ),
    'help' => 'http://www.rssboard.org/rss-profile#element-channel-lastbuilddate',
  );
  return $elements;
}