You are here

function spaces_og_form_alter in Spaces 6.3

Same name and namespace in other branches
  1. 5.2 spaces_og.module \spaces_og_form_alter()
  2. 6 spaces_og/spaces_og.module \spaces_og_form_alter()
  3. 6.2 spaces_og/spaces_og.module \spaces_og_form_alter()
  4. 7.3 spaces_og/spaces_og.module \spaces_og_form_alter()
  5. 7 spaces_og/spaces_og.module \spaces_og_form_alter()

Implementation of hook_form_alter().

File

spaces_og/spaces_og.module, line 368

Code

function spaces_og_form_alter(&$form, $form_state, $form_id) {
  if ($form['#id'] == 'node-form' && arg(0) . '/' . arg(1) != 'admin/content') {

    // Group nodes
    if (og_is_group_type($form['#node']->type)) {
      module_load_include('inc', 'spaces_og', 'spaces_og.pages');
      _spaces_og_form_alter_group($form, $form_state);
    }
    else {
      if (!og_is_omitted_type($form['#node']->type)) {
        module_load_include('inc', 'spaces_og', 'spaces_og.pages');
        _spaces_og_form_alter_node($form, $form_state);
      }
    }
  }
}