2627 - Арт Проект. Подключение турбо страниц для сайта task-on.com

parent f8597da4
......@@ -60,11 +60,13 @@ class Rss extends BaseObject
])
->all();
foreach ($models as $model) {
$text = preg_replace('/ (class|id|style)=".*?"/', '', $model->text);
$text = preg_replace('/(<img[^>]+>)/', '<figure>$1</figure>', $text);
$item = new Item();
$item
->title($model->title)
->link(Url::to(["/{$model->post->url}"], true))
->turboContent(preg_replace('/ (class|id|style)=".*?"/', '', $model->text))
->turboContent($text)
->pubDate($model->created_at)
->appendTo($channel);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment