You are here

function user_dashboard_settings in UserDashboard 7

Module settings page.

1 string reference to 'user_dashboard_settings'
user_dashboard_menu in ./user_dashboard.module
Implements hook_menu().

File

./user_dashboard.module, line 502
The User Dashboard module forks Drupal 7's awesome Dashboard module to provide an individual dashboard for each user on the site.

Code

function user_dashboard_settings() {
  global $theme_key;
  drupal_theme_initialize();
  module_load_include('inc', 'block', 'block.admin');
  $blocks = array();
  foreach (block_admin_display_prepare_blocks($theme_key) as $block) {
    $blocks[$block['module'] . '_' . $block['delta']] = $block['info'];
  }
  $form = array();
  $form['user_dashboard_available_blocks'] = array(
    '#default_value' => variable_get('user_dashboard_available_blocks', array()),
    '#description' => t('Choose blocks that can be used on the user dashboard pages.'),
    '#options' => $blocks,
    '#title' => t('Available blocks'),
    '#type' => 'checkboxes',
  );
  return system_settings_form($form);
}