Created
September 18, 2013 16:45
-
-
Save anonymous/6611959 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_views_data_alter(). | |
*/ | |
function feature_user_views_data_alter(&$data) { | |
// Actions | |
$data['users']['profession'] = array( | |
'title' => t('Profession'), | |
'help' => t('Profession of a user'), | |
'field' => array( | |
'handler' => 'views_handler_field_user_profession', | |
), | |
'filter' => array( | |
'handler' => 'views_handler_filter_string', | |
), | |
); | |
// Create joins | |
$data['users']['table']['join']['taxonomy_term_data'] = array( | |
'left_field' => 'tid', | |
'field' => 'profession', | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment