You are here

function hidden_language_preprocess_table in Hidden Language 7

Implements hook_preprocess_HOOK().

File

./hidden_language.module, line 84

Code

function hidden_language_preprocess_table(&$variables) {
  if (isset($variables['attributes']['id']) && in_array($variables['attributes']['id'], array(
    'language-order',
    'language-order-weight',
    'language-items-table',
  ))) {
    module_load_include('inc', 'locale', 'locale.admin');
    $form = drupal_get_form('locale_languages_overview_form');
    array_splice($variables['header'], 5, 0, t('Hidden'));
    foreach ($variables['rows'] as $id => &$row) {
      array_splice($row['data'], 5, 0, array(
        NULL,
      ));
      $row['data'][5] = array(
        'data' => drupal_render($form['hidden'][$row['data'][2]]),
        'align' => 'center',
      );
    }
  }
}