You are here

function theme_domain_theme_reset in Domain Access 7.2

Same name and namespace in other branches
  1. 5 domain_theme/domain_theme.module \theme_domain_theme_reset()
  2. 6.2 domain_theme/domain_theme.admin.inc \theme_domain_theme_reset()
  3. 7.3 domain_theme/domain_theme.admin.inc \theme_domain_theme_reset()

Theme a message at the top of domain theme pages.

Parameters

$domain: The $domain object for the selected domain.

Return value

Themed HTML messages.

1 call to theme_domain_theme_reset()
domain_theme_form in domain_theme/domain_theme.admin.inc
Form callback to set theme per domain.

File

domain_theme/domain_theme.admin.inc, line 210
Include file to handle theme configration screen

Code

function theme_domain_theme_reset($variables) {
  $domain = $variables['domain'];
  $output = '';
  $output .= '<p>' . t('These settings will replace your default site theme when %name is the active domain.', array(
    '%name' => $domain['sitename'],
  )) . '</p>';
  $data = db_query("SELECT theme FROM {domain_theme} WHERE domain_id = :domain_id", array(
    ':domain_id' => $domain['domain_id'],
  ))
    ->fetchAssoc();
  if (!empty($data)) {
    $output .= '<p>' . t('You may <a href="!url">erase these settings</a> to restore the default behavior.', array(
      '!url' => url('admin/structure/domain/theme-reset/' . $domain['domain_id']),
    )) . '</p>';
  }
  return $output;
}