function web_widgets_plugin_display_web_widgets::render in Web Widgets 6
Same name and namespace in other branches
- 7 views/web_widgets_plugin_display_web_widgets.inc \web_widgets_plugin_display_web_widgets::render()
Instead of going through the standard views_view.tpl.php, delegate this to the style handler.
File
- views/
web_widgets_plugin_display_web_widgets.inc, line 43 - Implementation of widget display.
Class
- web_widgets_plugin_display_web_widgets
- The plugin that handles a feed, such as RSS or atom.
Code
function render() {
// Ensure that the embed style functions are available
$current_style = $this
->get_option('embed_style');
$current_style = empty($current_style) ? 'iframe' : $current_style;
require_once web_widgets_get_style_inc($current_style);
// See if the render() function is "overloaded" or not
web_widgets_inside_widget(TRUE);
$render_func = 'web_widgets_' . $current_style . '_render';
if (function_exists($render_func)) {
$output = $render_func($this);
}
else {
// Fallback to default way
$content = theme($this
->theme_functions(), $this->view);
$code = '';
$track = $this
->get_option('track');
if (!empty($track)) {
$code = theme('web_widgets_tracking_code', $track);
}
$title = $this->view
->get_title();
$output = web_widgets_render_widget($current_style, $code . $content, $title);
}
web_widgets_inside_widget(FALSE);
return $output;
}