Browse Source

Update functions.php

pull/674/head
danpros 1 year ago
parent
commit
7b2ac293a0
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      system/includes/functions.php

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

@ -2556,21 +2556,21 @@ function generate_rss($posts, $data = null)
$feed = new Feed(); $feed = new Feed();
$channel = new Channel(); $channel = new Channel();
$rssLength = config('rss.char'); $rssLength = config('rss.char');
$data = $data;
$data = $data;
if (is_null($data)) {
if (is_null($data)) {
$channel $channel
->title(blog_title()) ->title(blog_title())
->description(blog_description()) ->description(blog_description())
->url(site_url()) ->url(site_url())
->appendTo($feed); ->appendTo($feed);
} else {
} else {
$channel $channel
->title($data->title) ->title($data->title)
->description(strip_tags($data->body)) ->description(strip_tags($data->body))
->url($data->url) ->url($data->url)
->appendTo($feed); ->appendTo($feed);
}
}
foreach ($posts as $p) { foreach ($posts as $p) {
if (!empty($rssLength)) { if (!empty($rssLength)) {


Loading…
Cancel
Save