You are here

function cacheexclude_admin_settings in CacheExclude 7.2

Same name and namespace in other branches
  1. 5.2 cacheexclude.module \cacheexclude_admin_settings()
  2. 5 cacheexclude.module \cacheexclude_admin_settings()
  3. 6.2 cacheexclude.module \cacheexclude_admin_settings()

Administrative settings form.

1 string reference to 'cacheexclude_admin_settings'
cacheexclude_menu in ./cacheexclude.module
Implements hook_menu().

File

./cacheexclude.module, line 23

Code

function cacheexclude_admin_settings() {
  $form['cacheexclude_list'] = array(
    '#type' => 'textarea',
    '#title' => t('Pages to exclude from caching'),
    '#default_value' => variable_get('cacheexclude_list', ''),
    '#width' => 40,
    '#height' => 10,
    '#description' => t("Enter one page per line as Drupal paths. Don't begin link with trailing slash. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array(
      '%blog' => 'blog',
      '%blog-wildcard' => 'blog/*',
      '%front' => '<front>',
    )),
  );
  $form['cacheexclude_node_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Content types to exclude from caching'),
    '#default_value' => variable_get('cacheexclude_node_types', array()),
    '#options' => node_type_get_names(),
    '#description' => t("Check all content types that you do not want to be cached."),
  );

  // Add an additional submit handler to clear the cache after list is updated.
  $full_form = system_settings_form($form);
  $full_form['#submit'][] = 'cacheexclude_admin_settings_submit';
  return $full_form;
}