Browse Source

atom: support <published>

Andrew Dolgov 7 years ago
parent
commit
d256f1fbd8
1 changed files with 6 additions and 0 deletions
  1. 6 0
      classes/feeditem/atom.php

+ 6 - 0
classes/feeditem/atom.php

@@ -17,6 +17,12 @@ class FeedItem_Atom extends FeedItem_Common {
 			return strtotime($updated->nodeValue);
 		}
 
+		$published = $this->elem->getElementsByTagName("published")->item(0);
+
+		if ($published) {
+			return strtotime($published->nodeValue);
+		}
+
 		$date = $this->xpath->query("dc:date", $this->elem)->item(0);
 
 		if ($date) {