summaryrefslogtreecommitdiffstats
path: root/views_natural_sort_text_field.views.inc
blob: 96989062009ac4befdf19285630c8f4a45d5936e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

/**
 * @file
 */

/**
 *
 */
function views_natural_sort_text_field_field_views_data_alter(&$data, $field, $module) {
  // TODO: check to see if field is "registered" to be sort naturally.
  if (!in_array($field['id'], array_keys(views_natural_sort_text_field_get_configured_fields()))) {
    return;
  }
  $field_table = _field_sql_storage_tablename($field);
  $data[$field_table][$field['field_name'] . '_value']['sort']['handler'] = 'views_natural_sort_handler_sort_text_field';
}