You are here

function boost_form_alter in Boost 5

Same name and namespace in other branches
  1. 6 boost.module \boost_form_alter()
  2. 7 boost.module \boost_form_alter()

Implementation of hook_form_alter(). Performs alterations before a form is rendered.

File

./boost.module, line 183
Provides static page caching for Drupal.

Code

function boost_form_alter($form_id, &$form) {

  // Alter Drupal's settings form by hiding the default cache enabled/disabled control (which will now always default to CACHE_DISABLED), and add our own control instead.
  if ($form_id == 'system_performance_settings') {
    require_once BOOST_PATH . '/boost.admin.inc';
    $form['page_cache'] = boost_system_settings_form($form['page_cache']);
  }
}