You are here

function media_browser_plus_form_taxonomy_overview_terms_alter in Media Browser Plus 7.3

Implements hook_form_FORM_ID_alter().

This is necessary since altering the hierarchy or weight of terms in the overview won't trigger any term hooks *blargh* :|

File

./media_browser_plus.module, line 739
Media Browser Plus - enhanced file management functions.

Code

function media_browser_plus_form_taxonomy_overview_terms_alter(&$form, &$form_state, $vocabulary) {
  if (!isset($form_state['confirm_reset_alphabetical'])) {
    if ($form['#vocabulary']->machine_name == 'media_folders') {
      $form['#validate'][] = 'media_browser_plus_form_taxonomy_overview_terms_validate';
      $form['#submit'][] = 'media_browser_plus_form_taxonomy_overview_terms_submit';
    }
  }
}