mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 03:26:20 +05:30
Add enclosure image on RSS field
This commit is contained in:
parent
d93170d6d4
commit
9f5d8e983e
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