You are here

nofollowlist.admin.inc in Nofollow List 7

File

nofollowlist.admin.inc
View source
<?php

function nofollowlist_admin_settings_form($form_state) {
  $form = _nofollowlist_settings_form();
  $form['nofollowlist_option']['#default_value'] = variable_get('nofollowlist_option', 'black');
  $form['nofollowlist_hosts']['#default_value'] = variable_get('nofollowlist_hosts', '');
  $form['nofollowlist_everywhere'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add nofollow everywhere'),
    '#description' => t("Preliminary benchmarks indicate that invoking theme() can slow down the l() function by 20% or more, and that some of the link-heavy Drupal pages spend more than 10% of the total page request time in the l() function."),
    '#default_value' => variable_get('nofollowlist_everywhere', FALSE),
  );
  $form['#submit'][] = 'nofollowlist_admin_settings_form_submit';
  return system_settings_form($form);
}

/**
 * Flush theme registry
 */
function nofollowlist_admin_settings_form_submit($form, &$form_state) {
  system_rebuild_theme_data();
  drupal_theme_rebuild();
}