You are here

function skinr_ui_settings_multiple_delete_confirm in Skinr 6.2

1 call to skinr_ui_settings_multiple_delete_confirm()
skinr_ui_list in ./skinr_ui.admin.inc
Menu callback; displays the skinr listing page.

File

./skinr_ui.admin.inc, line 1054
Admin page callbacks for the skinr module.

Code

function skinr_ui_settings_multiple_delete_confirm(&$form_state, $skinr_settings) {
  $themes = list_themes();
  $form['skinr_settings'] = array(
    '#prefix' => '<ul>',
    '#suffix' => '</ul>',
    '#tree' => TRUE,
  );

  // array_filter returns only elements with TRUE values
  foreach ($skinr_settings as $skinr_setting => $value) {
    $parts = explode('__', $skinr_setting, 3);
    $form['skinr_settings'][$skinr_setting] = array(
      '#type' => 'hidden',
      '#value' => $skinr_setting,
      '#prefix' => '<li>',
      '#suffix' => t('Skinr ID %sid of type %type for theme %theme', array(
        '%sid' => $parts[2],
        '%type' => $parts[1],
        '%theme' => $themes[$parts[0]]->info['name'],
      )) . "</li>\n",
    );
  }
  $form['operation'] = array(
    '#type' => 'hidden',
    '#value' => 'delete',
  );
  $form['#submit'][] = 'skinr_ui_settings_multiple_delete_confirm_submit';
  return confirm_form($form, t('Are you sure you want to delete these items?'), 'admin/build/skinr', t('This action cannot be undone.'), t('Delete all'), t('Cancel'));
}