mirror of
https://github.com/danpros/htmly.git
synced 2026-04-19 20:16:22 +05:30
Merge pull request #677 from Eliastik/rss_enclosure
Add enclosure image on RSS field by @Eliastik
This commit is contained in:
commit
37ccec85b4
1 changed files with 4 additions and 0 deletions
|
|
@ -2741,6 +2741,10 @@ function generate_rss($posts, $data = null)
|
|||
->description($body)
|
||||
->url($p->url)
|
||||
->appendTo($channel);
|
||||
|
||||
if ($p->image !== null) {
|
||||
$item->enclosure($p->image, 0, "image/" . end(explode('.', $p->image)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue