'inline')); } function wwbtc_form_search_form_alter(&$form, &$form_state) { $form['basic']['submit']['#weight'] = 0; global $user; if($user->uid == 1) { //print_r($form); } } function wwbtc_node_validate($node, $form, &$form_state) { if($node->type == 'event') { /* $nodeOut = '
'; $nodeOut .= print_r($form_state, 1); $nodeOut .= ''; d watchdog('wwbtc', $nodeOut); */ if($form_state['input']['field_event_image'][LANGUAGE_NONE][0]['fid'] == 0 && $form_state['input']['field_featured'][LANGUAGE_NONE] == 1) { form_set_error('field_event_image', 'Featured events must have an image'); } } } //reformat the path on faculty nodes to be [academic_division]/faculty/[title] function wwbtc_pathauto_alias_alter(&$alias, &$context) { if (isset($context['data']['node']->nid) && $context['data']['node']->type == 'faculty') { $term_root = taxonomy_get_parents_all($context['data']['node']->field_academic_division[LANGUAGE_NONE][0]['tid']); $division = pathauto_cleanstring($term_root[count($term_root) - 1]->name); $title = pathauto_cleanstring($context['data']['node']->title); $alias = $division . '/faculty/' . $title; } } function wwbtc_preprocess_image_style(&$variables) { switch ($variables['style_name']) { case 'responsive_image': $variables['attributes']['class'][] = 'img-responsive'; break; default: break; } }