Add Author into MrssFormat
This commit is contained in:
parent
80fe041f32
commit
88bf15e46c
1 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,7 @@ class MrssFormat extends FormatAbstract{
|
||||||
foreach($this->getDatas() as $data){
|
foreach($this->getDatas() as $data){
|
||||||
$itemTitle = strip_tags(is_null($data->title) ? '' : $data->title);
|
$itemTitle = strip_tags(is_null($data->title) ? '' : $data->title);
|
||||||
$itemUri = is_null($data->uri) ? '' : $data->uri;
|
$itemUri = is_null($data->uri) ? '' : $data->uri;
|
||||||
|
$itemAuthor = is_null($data->author) ? '' : $data->author;
|
||||||
$itemThumbnailUri = is_null($data->thumbnailUri) ? '' : $data->thumbnailUri;
|
$itemThumbnailUri = is_null($data->thumbnailUri) ? '' : $data->thumbnailUri;
|
||||||
$itemTimestamp = is_null($data->timestamp) ? '' : date(DATE_RFC2822, $data->timestamp);
|
$itemTimestamp = is_null($data->timestamp) ? '' : date(DATE_RFC2822, $data->timestamp);
|
||||||
// We prevent content from closing the CDATA too early.
|
// We prevent content from closing the CDATA too early.
|
||||||
|
@ -37,6 +38,7 @@ class MrssFormat extends FormatAbstract{
|
||||||
<guid isPermaLink="true">{$itemUri}</guid>
|
<guid isPermaLink="true">{$itemUri}</guid>
|
||||||
<pubDate>{$itemTimestamp}</pubDate>
|
<pubDate>{$itemTimestamp}</pubDate>
|
||||||
<description>{$itemContent}</description>
|
<description>{$itemContent}</description>
|
||||||
|
<author>{$itemAuthor}</author>
|
||||||
<media:title>{$itemTitle}</media:title>
|
<media:title>{$itemTitle}</media:title>
|
||||||
<media:thumbnail url="{$itemThumbnailUri}" />
|
<media:thumbnail url="{$itemThumbnailUri}" />
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in a new issue