t("Available RSS feeds")); } static function get($block_id, $theme) { $block = ""; switch ($block_id) { case "rss_feeds": $feeds = array(); foreach (module::active() as $module) { $class_name = "{$module->name}_rss"; if (method_exists($class_name, "available_feeds")) { $feeds = array_merge($feeds, call_user_func(array($class_name, "available_feeds"), $theme->item(), $theme->tag())); } } if (!empty($feeds)) { $block = new Block(); $block->css_id = "g-rss"; $block->title = t("Available RSS feeds"); $block->content = new View("rss_block.html"); $block->content->feeds = $feeds; } break; } return $block; } }