|
|
@ -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)) { |
|
|
|