function template_preprocess_uc_order_invoice_page in Ubercart 7.3
Same name and namespace in other branches
- 8.4 uc_order/uc_order.module \template_preprocess_uc_order_invoice_page()
Preprocesses a printable invoice page.
See also
File
- uc_order/
uc_order.module, line 1835
Code
function template_preprocess_uc_order_invoice_page(&$variables) {
// Construct page title.
if (drupal_get_title()) {
$head_title = array(
'title' => strip_tags(drupal_get_title()),
'name' => variable_get('site_name', 'Drupal'),
);
}
else {
$head_title = array(
'name' => variable_get('site_name', 'Drupal'),
);
if (variable_get('site_slogan', '')) {
$head_title['slogan'] = variable_get('site_slogan', '');
}
}
// Add favicon.
if (theme_get_setting('toggle_favicon')) {
$favicon = theme_get_setting('favicon');
$type = theme_get_setting('favicon_mimetype');
drupal_add_html_head_link(array(
'rel' => 'shortcut icon',
'href' => drupal_strip_dangerous_protocols($favicon),
'type' => $type,
));
}
$variables['head'] = drupal_get_html_head();
// Set the default language if necessary.
$language = isset($GLOBALS['language']) ? $GLOBALS['language'] : language_default();
$variables['head_title'] = implode(' | ', $head_title);
$variables['base_path'] = base_path();
$variables['language'] = $language;
$variables['language']->dir = $language->direction ? 'rtl' : 'ltr';
}