function sharethis_views_data_alter in ShareThis 7.2
Implements hook_views_data_alter().
File
- views/
sharethis.views.inc, line 30 - Views integration for ShareThis.
Code
function sharethis_views_data_alter(&$data) {
if (module_exists('search_api_views')) {
foreach (search_api_index_load_multiple(FALSE) as $index) {
$key = 'search_api_index_' . $index->machine_name;
if (isset($data[$key])) {
$data[$key]['sharethis'] = array(
'title' => t('ShareThis Link'),
'help' => t('Link provided by the ShareThis service.'),
'field' => array(
'handler' => 'sharethis_handler_field_link',
'click sortable' => FALSE,
),
);
}
}
}
}