function mcd_preprocess_maintenance_page in Maintenance Countdown 7
Same name and namespace in other branches
- 6 mcd.countdown.inc \mcd_preprocess_maintenance_page()
Add some variables for maintenance-coundown-page.tpl.php file. You can override this or core or add custom variables via your theme just using the same TEMPLATE_preprocess_maintenance_page
Parameters
$variables:
File
- ./
mcd.countdown.inc, line 76 - This file provides theme part of MCD module
Code
function mcd_preprocess_maintenance_page(&$variables) {
$path = drupal_get_path('module', 'mcd');
// CUT unneeded js files! Yay! Should work as magic...
$js = drupal_add_js();
array_splice($js, 4);
$variables['js'] = drupal_get_js('header', $js);
$variables['mcd_js'] = '<script src="' . $GLOBALS['base_url'] . '/' . $path . '/js/jquery.lwtCountdown-1.0-min.js' . "\"></script>\n";
$variables['mcd_js_countdown'] = mcd_js_countdown();
if (variable_get('mcd_site_logo') == 1) {
unset($variables['logo']);
}
if (variable_get('mcd_site_name') == 1) {
unset($variables['site_name']);
}
if (variable_get('mcd_site_slogan') == 1) {
unset($variables['site_slogan']);
}
// add theme css
drupal_add_css($path . '/styles/' . variable_get('mcd_page_themes', 'light') . '.css', array(
'type' => 'file',
'group' => CSS_THEME,
'every_page' => FALSE,
'weight' => 99,
'preprocess' => FALSE,
));
$variables['time_up_message'] = variable_get('mcd_time_up_message', FALSE);
if (variable_get('mcd_reload_button', 0) == 0) {
$variables['reload_button'] = l(t('♻ Reload'), $_GET['q'], array(
'attributes' => array(
'id' => 'page_reload',
'title' => t('Reload this page'),
),
));
}
else {
$variables['reload_button'] = FALSE;
}
if (mcd_check_simplenews() && variable_get('mcd_email_subscr', 0) != 0) {
$block = module_invoke('simplenews', 'block_view', variable_get('mcd_email_subscr'));
$variables['subsc'] = render($block['content']);
}
}