You are here

function emvideo_emfield_rss in Embedded Media Field 6

Same name and namespace in other branches
  1. 6.3 contrib/emvideo/emvideo.module \emvideo_emfield_rss()
  2. 6.2 contrib/emvideo/emvideo.module \emvideo_emfield_rss()

Providers may supply an enclosure for rss feeds. This expects something in a file format, so would be an object in the format of $file->filepath, $file->filesize, and $file->filemime. Calls the providers hook EMVIDEO_PROVIDER_RSS($item, $teaser).

File

contrib/emvideo/emvideo.module, line 568
Embedded Video module is a handler for 3rd party video files.

Code

function emvideo_emfield_rss($node, $items = array(), $teaser = NULL) {
  $rss_data = array();
  foreach ($items as $item) {

    // note only the first $item will get an RSS enclosure, other items may have media: data in the feed however
    if ($item['value'] && $item['provider']) {
      $rss_data[] = module_invoke('emfield', 'include_invoke', 'emvideo', $item['provider'], 'rss', $item, $teaser);
    }
  }
  return $rss_data;
}