Returns hook-independent variables to template_preprocess().
function _template_preprocess_default_variables() {
// Variables that don't depend on a database connection.
$variables = array(
'attributes' => array(),
'title_attributes' => array(),
'content_attributes' => array(),
'title_prefix' => array(),
'title_suffix' => array(),
'db_is_active' => !defined('MAINTENANCE_MODE'),
'is_admin' => FALSE,
'logged_in' => FALSE,
);
// drupal_is_front_page() might throw an exception.
try {
$variables['is_front'] = drupal_is_front_page();
} catch (Exception $e) {
// If the database is not yet available, set default values for these
// variables.
$variables['is_front'] = FALSE;
$variables['db_is_active'] = FALSE;
}
// Give modules a chance to alter the default template variables.
drupal_alter('template_preprocess_default_variables', $variables);
return $variables;
}