function domain_theme_settings in Domain Access 7.2
Same name and namespace in other branches
- 6.2 domain_theme/domain_theme.admin.inc \domain_theme_settings()
- 7.3 domain_theme/domain_theme.admin.inc \domain_theme_settings()
The domain theme page callback router.
Parameters
$theme: The theme being configured.
$domain: The $domain object created by domain_lookup().
1 string reference to 'domain_theme_settings'
- domain_theme_menu in domain_theme/
domain_theme.module - Implements hook_menu()
File
- domain_theme/
domain_theme.admin.inc, line 229 - Include file to handle theme configration screen
Code
function domain_theme_settings($theme, $domain) {
// Load the system form file.
include_once drupal_get_path('module', 'system') . '/system.admin.inc';
// Set the proper context for the user.
$settings = db_query("SELECT theme, settings FROM {domain_theme} WHERE domain_id = :domain_id AND theme = :theme", array(
':domain_id' => $domain['domain_id'],
':theme' => $theme,
))
->fetchAssoc();
drupal_set_message(t('You are viewing the %theme settings for %domain.', array(
'%theme' => $theme,
'%domain' => $domain['sitename'],
)), 'status', FALSE);
drupal_set_title(t('@site : @theme settings', array(
'@site' => $domain['sitename'],
'@theme' => $theme,
)));
// If there are settings, we have to load ours.
if (!empty($settings)) {
domain_theme_set_variables($settings);
return drupal_get_form('system_theme_settings', $settings['theme']);
}
else {
return drupal_get_form('system_theme_settings', $theme);
}
}