mediafront_emfield.module in MediaFront 6
File
plugins/mediafront_emfield/mediafront_emfield.module
View source
<?php
function mediafront_emfield_playlist_node($node, $args) {
$additions = array();
foreach ($node as $fieldname => $field) {
if (strpos($fieldname, 'field_') === 0) {
if ($field[0]["data"] && $field[0]["data"]["thumbnail"]) {
mediafront_add_media($additions, $field[0]["data"]["thumbnail"]);
}
if ($field[0]["data"] && $field[0]["data"]["emthumb"]) {
mediafront_add_media($additions, $field[0]["data"]["emthumb"]);
}
if ($field[0]["provider"]) {
$file = new stdClass();
$file->player = $field[0]["provider"];
$file->path = $field[0]["value"];
$file->class = 'media';
$file->mediaType = 'media';
mediafront_add_media($additions, $file);
}
}
}
return $additions;
}