function adsense_form_filter_admin_format_form_alter in Google AdSense integration 6
Implementation of hook_form_filter_admin_format_form_alter().
File
- ./
adsense.module, line 213 - Displays Google AdSense ads on Drupal pages.
Code
function adsense_form_filter_admin_format_form_alter(&$form, $form_state) {
// In Drupal <= 6.9 (or later) the HTML corrector has a bug that causes
// problems with the use of the AdSense tag filter.
sscanf(VERSION, "%d.%d", $major, $minor);
if ($major == 6 && $minor <= 99) {
if (empty($form_state['post']) && $form['filters']['adsense/0']['#default_value'] && $form['filters']['filter/3']['#default_value'] || !empty($form_state['post']) && $form_state['post']['filters']['adsense/0'] == '1' && $form_state['post']['filters']['filter/3'] == '1') {
drupal_set_message(t('The HTML corrector filter has a bug that causes problems with the use of the AdSense tag. Disabling the HTML corrector filter is recommended.'), 'warning', TRUE);
}
}
}