diff options
author | Andrew Dolgov <[email protected]> | 2010-11-04 14:40:55 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-04 14:40:55 +0300 |
commit | c784546704d9a76933c0929e427ef826e35a70a0 (patch) | |
tree | e7cddc9859ba2a502c57824c911883248ead3777 /functions.php | |
parent | fb8d17f3fb060279235ee7202fe600454793ea08 (diff) |
generated feeds: support enclosures
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/functions.php b/functions.php index 6eafe8082..601d59ecd 100644 --- a/functions.php +++ b/functions.php @@ -3702,7 +3702,16 @@ print sanitize_rss($link, $line["content_preview"], false, $owner_uid); print "]]></description>"; - + + $enclosures = get_article_enclosures($link, $line["id"]); + + foreach ($enclosures as $e) { + $type = htmlspecialchars($e['content_type']); + $url = htmlspecialchars($e['content_url']); + $length = $e['duration']; + print "<enclosure url=\"$url\" type=\"$type\" length=\"$length\"/>"; + } + print "</item>"; } |