You are here

function ape_form_system_performance_settings_alter in Advanced Page Expiration 7

Same name and namespace in other branches
  1. 8 ape.module \ape_form_system_performance_settings_alter()

Implements hook_form_FORM_ID_alter().

Remove page_cache_maximum_age selection from main performance page and instead direct users to this module's config page. Also do a little cleanup to clarify external caching.

File

./ape.module, line 142
Allows finer control of the Cache Control header.

Code

function ape_form_system_performance_settings_alter(&$form, &$form_state) {
  unset($form['caching']['page_cache_maximum_age']);
  $form['clear_cache']['#weight'] = -5;
  $form['caching']['#title'] = t('General Caching');
  $form['caching']['#weight'] = -4;
  $form['ape_caching'] = array(
    '#type' => 'fieldset',
    '#title' => t('External page caching'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
    '#weight' => -3,
  );
  $form['ape_caching']['page_cache_maximum_age'] = array(
    '#markup' => l(t('Configure external page caching strategy with APE.'), 'admin/config/development/ape'),
  );
}