function shareaholic_advanced_settings_form_submit($form, &$form_state) { if (ShareaholicUtilities::has_tos_and_apikey()) { ShareaholicUtilities::update_options(array('disable_og_tags' => $form_state['values']['disable_og_tags'] === 1 ? 'on' : 'off', 'disable_internal_share_counts_api' => $form_state['values']['disable_internal_share_counts_api'] === 1 ? 'on' : 'off')); drupal_set_message(t('Settings Saved: please clear your cache.'), 'status'); } }
/** * Inserts the xua-compatible header if the user has accepted * ToS and has API key */ public static function set_xua_compatible_header() { if (ShareaholicUtilities::has_tos_and_apikey() && !drupal_get_http_header('X-UA-Compatible')) { drupal_add_http_header('X-UA-Compatible', 'IE=edge,chrome=1'); } }