You are here

function og_get_types in Organic groups 5.7

Same name and namespace in other branches
  1. 5.8 og.module \og_get_types()
  2. 5 og.module \og_get_types()
  3. 5.3 og.module \og_get_types()
  4. 6.2 og.module \og_get_types()
  5. 6 og.module \og_get_types()
6 calls to og_get_types()
og_admin_settings in ./og.module
og_get_sql_args in ./og.module
og_notifications_form_alter in og_notifications/og_notifications.module
Implementation of hook_form_alter().
og_og_create_links in ./og.module
og_requirements in ./og.module

... See full list

File

./og.module, line 2312

Code

function og_get_types($usage) {
  $types = node_get_types();
  foreach ($types as $type) {
    if ($usage == 'group_post') {
      if (!og_is_omitted_type($type->type) && !og_is_group_type($type->type)) {
        $return[$usage][] = $type->type;
      }
    }
    else {
      $type_usage = variable_get('og_content_type_usage_' . $type->type, 'omitted');
      $return[$type_usage][] = $type->type;
    }
  }
  return isset($return[$usage]) ? $return[$usage] : array();
}