Browse Source

Merge pull request #677 from Eliastik/rss_enclosure

Add enclosure image on RSS field by @Eliastik
pull/678/head
Dan 1 year ago
committed by GitHub
parent
commit
37ccec85b4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      system/includes/functions.php

+ 4
- 0
system/includes/functions.php View File

@ -2741,6 +2741,10 @@ function generate_rss($posts, $data = null)
->description($body) ->description($body)
->url($p->url) ->url($p->url)
->appendTo($channel); ->appendTo($channel);
if ($p->image !== null) {
$item->enclosure($p->image, 0, "image/" . end(explode('.', $p->image)));
}
} }
} }


Loading…
Cancel
Save