mysite_check_settings

Definition

mysite_check_settings($type)
mysite.module, line 3214

Description

Display a message to the site administrator if the content type is inactive.

Parameters

$type The include type name

Code

function mysite_check_settings($type) {
  $types = variable_get('mysite_content', array());
  // see if this type can be activated.
  $func = 'mysite_type_'. $type .'_active';
  $active = $func($type);
  $link = '';
  if ($active[$type]) {
    $link = '<p>'. l(t('Enable this plugin.'), 'admin/settings/mysite/type/activate/'. $type) .'</p>';
  }
  if (empty($types[$type]) && !$_POST) {
    drupal_set_message(t('The <b>@type plugin</b> is not enabled for MySite.  Changes made here may not be visible to your users. !active', array('@type' => ucwords($type), '!active' => $link)));
  }
}