commit ffdd2ab6ce265631abec6c6798f3ad427ab5425f Author: Joel Pittet Date: Tue May 14 20:13:19 2013 -0700 doc updates diff --git a/core/modules/views/templates/views-view-rss.html.twig b/core/modules/views/templates/views-view-rss.html.twig index a416ef8..d223b05 100644 --- a/core/modules/views/templates/views-view-rss.html.twig +++ b/core/modules/views/templates/views-view-rss.html.twig @@ -13,9 +13,9 @@ * - items: The feed items themselves. * * @see template_preprocess() + * @see template_preprocess_views_view_rss() * * @ingroup themeable - * @ingroup views_templates */ #} diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index e0bbbeb..cb9907f 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -845,16 +845,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'); @@ -874,8 +880,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(); @@ -888,7 +894,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 = ''; }