parser: support multiple dc:creator elements (returns as comma-separated list)
This commit is contained in:
parent
4edfb526e1
commit
aa40a268f0
|
@ -41,11 +41,14 @@ abstract class FeedItem_Common extends FeedItem {
|
||||||
return clean($author->nodeValue);
|
return clean($author->nodeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
$author = $this->xpath->query("dc:creator", $this->elem)->item(0);
|
$author_elems = $this->xpath->query("dc:creator", $this->elem);
|
||||||
|
$authors = [];
|
||||||
|
|
||||||
if ($author) {
|
foreach ($author_elems as $author) {
|
||||||
return clean($author->nodeValue);
|
array_push($authors, clean($author->nodeValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return implode(", ", $authors);
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_comments_url() {
|
function get_comments_url() {
|
||||||
|
|
Loading…
Reference in New Issue