You are here

function og_subscribe_link in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og.module \og_subscribe_link()
  2. 5 og.module \og_subscribe_link()
  3. 5.2 og.module \og_subscribe_link()
  4. 5.3 og.module \og_subscribe_link()
  5. 5.7 og.module \og_subscribe_link()
  6. 6.2 og.module \og_subscribe_link()
2 calls to og_subscribe_link()
og_block_details in ./og.module
og_views_handler_field_og_subscribe::render in modules/og_views/includes/og_views_handler_field_og_subscribe.inc

File

./og.module, line 2578

Code

function og_subscribe_link($node) {
  if ($node->og_selective == OG_MODERATED) {
    $txt = t('Request membership');
  }
  elseif ($node->og_selective == OG_OPEN) {
    $txt = t('Join');
  }
  if (isset($txt)) {
    return l($txt, "og/subscribe/{$node->nid}", array(
      'attributes' => array(
        'rel' => 'nofollow',
      ),
      'query' => drupal_get_destination(),
    ));
  }
}