function theme_jstimer in Javascript Timer 7
Same name and namespace in other branches
- 8 jstimer.module \theme_jstimer()
- 6 jstimer.module \theme_jstimer()
2 theme calls to theme_jstimer()
- jstimer_field_formatter_view in ./
jstimer.field.inc - Implements hook_field_formatter_view(). Normal behavior for two date fields is to use value1 where it is available. Use value2 only if value1 is empty.
- jst_timer_form_alter in widgets/
jst_timer.module - Implementation of hook_form_alter(). Add the timer widget specific settings to admin screen.
File
- ./
jstimer.module, line 49
Code
function theme_jstimer($variables) {
$widget_name = $variables['widget_name'];
$widget_args = $variables['widget_args'];
$widgets = jstimer_get_widgets();
$widget = NULL;
foreach ($widgets as $w) {
if ($widget_name == $w->name) {
$widget = $w;
break;
}
}
if (!isset($widget)) {
return "Widget {$widget_name} not found.";
}
if (function_exists($widget->theme_function)) {
return call_user_func($widget->theme_function, $widget_args);
}
else {
return "Widget {$widget_name} theme not found.";
}
}