diff --git a/core/modules/views/templates/views-view-rss.html.twig b/core/modules/views/templates/views-view-rss.html.twig
new file mode 100644
index 0000000000000000000000000000000000000000..d223b059cb2b0459da4d59354fe80b3f7f35055d
--- /dev/null
+++ b/core/modules/views/templates/views-view-rss.html.twig
@@ -0,0 +1,31 @@
+{#
+/**
+ * @file
+ * Default template for feed displays that use the RSS style.
+ *
+ * Available variables:
+ * - link: The link to the feed (the view path).
+ * - namespaces: The XML namespaces (added automatically).
+ * - title: The title of the feed (as set in the view).
+ * - description: The feed description (from feed settings).
+ * - langcode: The language encoding.
+ * - channel_elements: The formatted channel elements.
+ * - items: The feed items themselves.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_views_view_rss()
+ *
+ * @ingroup themeable
+ */
+#}
+
+
+
+ {{ title }}
+ {{ link }}
+ {{ description }}
+ {{ langcode }}
+ {{ channel_elements }}
+ {{ items }}
+
+
diff --git a/core/modules/views/templates/views-view-rss.tpl.php b/core/modules/views/templates/views-view-rss.tpl.php
deleted file mode 100644
index 18ca73eaff648300e117f96222954f6cc43532b1..0000000000000000000000000000000000000000
--- a/core/modules/views/templates/views-view-rss.tpl.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
- version="1.0" encoding="utf-8" "; ?>
->
-
-
-
-
-
-
-
-
-
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index e17f44f756042a22d695df904cca4e73e736255b..d3c0a1346d1a7462bcca88d23d690a9b3d68816b 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -846,16 +846,22 @@ function template_preprocess_views_view_list(&$vars) {
}
/**
- * Preprocess an RSS feed
- */
+ * Prepares variables for RSS feed templates.
+ *
+ * Default template: views-view-rss.html.twig.
+ *
+ * @param array $vars
+ * An associative array containing:
+ * - view: A ViewExecutable object.
+ * - rows: The raw row data.
+*/
function template_preprocess_views_view_rss(&$vars) {
global $base_url;
- $view = &$vars['view'];
- $options = &$vars['options'];
- $items = &$vars['rows'];
+ $view = $vars['view'];
+ $items = $vars['rows'];
- $style = &$view->style_plugin;
+ $style = $view->style_plugin;
$config = config('system.site');
@@ -875,8 +881,8 @@ function template_preprocess_views_view_rss(&$vars) {
}
$vars['title'] = check_plain($title);
- // Figure out which display which has a path we're using for this feed. If there isn't
- // one, use the global $base_url
+ // Figure out which display which has a path we're using for this feed. If
+ // there isn't one, use the global $base_url
$link_display_id = $view->display_handler->getLinkDisplay();
if ($link_display_id && $display = $view->displayHandlers->get($link_display_id)) {
$path = $view->displayHandlers->get($link_display_id)->getPath();
@@ -889,7 +895,8 @@ function template_preprocess_views_view_rss(&$vars) {
$url_options['query'] = $view->exposed_raw_input;
}
- // Compare the link to the default home page; if it's the default home page, just use $base_url.
+ // Compare the link to the default home page; if it's the default home page,
+ // just use $base_url.
if ($path == $config->get('page.front')) {
$path = '';
}