You are here

function pathauto_i18n_form_pathauto_settings_form_alter in Pathauto i18n 8

Same name and namespace in other branches
  1. 7 pathauto_i18n.module \pathauto_i18n_form_pathauto_settings_form_alter()

Implements hook_form_FORM_ID_alter().

Make pathauto_ignore_words global and add fields for languages.

File

./pathauto_i18n.module, line 190
Provides common functions and callbacks for pathauto_i18n submodules.

Code

function pathauto_i18n_form_pathauto_settings_form_alter(&$form, &$form_state, $form_id) {
  module_load_include('inc', 'pathauto');
  $languages = language_list();
  $form['pathauto_ignore_words']['#title'] = t('Strings to Remove - @language', array(
    '@language' => t('Global'),
  ));
  foreach ($languages as $language) {
    $key = 'pathauto_ignore_words_' . $language->language . '_language';
    $form[$key] = array(
      '#type' => 'textarea',
      '#title' => t('Strings to Remove - @language', array(
        '@language' => $language->name,
      )),
      '#default_value' => variable_get($key, ''),
      '#wysiwyg' => FALSE,
    );
  }
}