function web_widgets_render_embed_code in Web Widgets 6
Same name and namespace in other branches
- 7 web_widgets.module \web_widgets_render_embed_code()
Renders the embed code for a given widget style.
Parameters
$style: One of the widget styles returned by widgets_get_styles().
$path: Path that returns a widget.
$width: Width of the widget (not respected by all styles).
$height: Height of the widget (not respected by all styles).
Return value
HTML that displays the widget embed code.
1 call to web_widgets_render_embed_code()
- web_widgets_plugin_display_web_widgets::attach_to in views/
web_widgets_plugin_display_web_widgets.inc - Attach to another view.
File
- ./
web_widgets.module, line 76 - web_widgets module main. Contains the views api hook and theming functions.
Code
function web_widgets_render_embed_code($style, $path, $width, $height) {
require_once web_widgets_get_style_inc($style);
$code = theme('web_widgets_' . $style, $path, $width, $height);
return theme('web_widgets_embed_code', $code, $style);
}