You are here

function emaudio_emfield_rss in Embedded Media Field 6

Same name and namespace in other branches
  1. 5 contrib/emaudio/emaudio.module \emaudio_emfield_rss()
  2. 6.3 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 321
Embedded Audio module is a handler for mp3 and similar audio files, hosted on 3rd party sites.

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;
}