function template_preprocess_opening_hours_week in Opening hours 7
Same name and namespace in other branches
- 6 opening_hours.module \template_preprocess_opening_hours_week()
Preprocess variables for the week template.
File
- ./
opening_hours.module, line 678 - Opening hours module.
Code
function template_preprocess_opening_hours_week(&$vars) {
static $once;
$nid = NULL;
if ($vars['node']) {
$nid = $vars['node']->nid;
}
// Only add JavaScript and templates the first time this is run on a page.
if (!$once) {
opening_hours_add_js('presentation', $nid);
// Add our client-side templates to the page.
$vars['preface'] = theme('opening_hours_presentation');
$once = TRUE;
}
}