You are here

function amp_admin_form_submit in Accelerated Mobile Pages (AMP) 7

Submit handler for the amp_admin_form Clears the Drupal cache if the AMP Library warnings display checkbox value is changed

_state

Parameters

type $form:

1 string reference to 'amp_admin_form_submit'
amp_admin_form in ./amp.admin.inc
Form constructor for the AMP administration form.

File

./amp.admin.inc, line 173
Administrative page callbacks for the AMP module.

Code

function amp_admin_form_submit($form, &$form_state) {
  if (variable_get('amp_library_warnings_display', false) !== $form_state['values']['amp_library_warnings_display']) {
    cache_clear_all();
    drupal_set_message(t('AMP Library debugging checkbox changed. Cleared cache.'));
  }
}