You are here

function panopoly_news_views_pre_view in Panopoly News 7

Implementation of hook_views_pre_render()

File

./panopoly_news.module, line 58

Code

function panopoly_news_views_pre_view(&$view, &$display_id, &$args) {

  // Modify the options from the view to add in the current sitename into the RSS feed
  if ($view->name == 'panopoly_news' && $display_id == 'panopoly_news_feed') {
    $sitename = variable_get('site_name');
    $view->display_handler->options['title'] = str_replace('!sitename', $sitename, $view->display_handler->options['title']);
    $view->display_handler->options['style_options']['description'] = str_replace('!sitename', $sitename, $view->display_handler->options['style_options']['description']);
  }
}