parser: add basic support for media:thumbnail

master
Andrew Dolgov 11 years ago
parent 70fc5a5eab
commit e23aedd402

@ -175,6 +175,17 @@ class FeedItem_Atom extends FeedItem_Common {
array_push($encs, $enc); array_push($encs, $enc);
} }
$enclosures = $this->xpath->query("media:thumbnail", $this->elem);
foreach ($enclosures as $enclosure) {
$enc = new FeedEnclosure();
$enc->type = "image/generic";
$enc->link = $enclosure->getAttribute("url");
array_push($encs, $enc);
}
return $encs; return $encs;
} }

@ -150,6 +150,17 @@ class FeedItem_RSS extends FeedItem_Common {
array_push($encs, $enc); array_push($encs, $enc);
} }
$enclosures = $this->xpath->query("media:thumbnail", $this->elem);
foreach ($enclosures as $enclosure) {
$enc = new FeedEnclosure();
$enc->type = "image/generic";
$enc->link = $enclosure->getAttribute("url");
array_push($encs, $enc);
}
return $encs; return $encs;
} }

Loading…
Cancel
Save