You are here

function theme_domain_conf_reset in Domain Access 7.2

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

Theme a message at the top of domain configuration pages.

Parameters

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

Return value

Themed HTML messages.

1 theme call to theme_domain_conf_reset()
domain_conf_page in domain_conf/domain_conf.admin.inc
The domain conf page callback router.

File

domain_conf/domain_conf.admin.inc, line 247
Domain manager configuration options.

Code

function theme_domain_conf_reset($variables) {
  $domain = $variables['domain'];
  $output = '';
  $output .= '<p>' . t('These settings will replace or supplement your default site settings when %name is the active domain.', array(
    '%name' => $domain['sitename'],
  )) . '</p>';
  $data = db_query("SELECT COUNT(domain_id) FROM {domain_conf} WHERE domain_id = :domain_id", array(
    ':domain_id' => $domain['domain_id'],
  ))
    ->fetchField();
  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/conf-reset/' . $domain['domain_id']),
    )) . '</p>';
  }
  return $output;
}