Merge pull request #677 from Eliastik/rss_enclosure

Add enclosure image on RSS field by @Eliastik
This commit is contained in:
Dan 2024-02-17 05:45:53 +07:00 committed by GitHub
commit 37ccec85b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)));
}
}
}