function commons_bw_form_views_exposed_form_alter in Drupal Commons 7.3
Implements hook_form_FORM_ID_alter().
File
- modules/
commons/ commons_bw/ commons_bw.module, line 96
Code
function commons_bw_form_views_exposed_form_alter(&$form, &$form_state, $form_id) {
// Implements tweaks to exposed filters and sorts per the Commons designs.
if (strpos($form['#id'], 'views-exposed-form-commons-bw') === 0) {
// Remove the sort order (eg, descending vs ascending).
$form['sort_order']['#access'] = FALSE;
$form['sort_by']['#title'] = t('Sorted by');
}
}