You are here

function emaudio_emfield_rss in Embedded Media Field 5

Same name and namespace in other branches
  1. 6.3 contrib/emaudio/emaudio.module \emaudio_emfield_rss()
  2. 6 contrib/emaudio/emaudio.module \emaudio_emfield_rss()
  3. 6.2 contrib/emaudio/emaudio.module \emaudio_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 emaudio_PROVIDER_rss($item, $teaser)

File

contrib/emaudio/emaudio.module, line 312

Code

function emaudio_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', 'emaudio', $item['provider'], 'rss', $item, $teaser);
    }
  }
  return $rss_data;
}