You are here

function janrain_capture_signin_link in Janrain Registration 7.3

Same name and namespace in other branches
  1. 7.4 janrain_capture.module \janrain_capture_signin_link()
  2. 7 janrain_capture.module \janrain_capture_signin_link()
  3. 7.2 janrain_capture.module \janrain_capture_signin_link()

Returns a render array for the 'Register / Sign in' link for Janrain Capture.

File

./janrain_capture.module, line 442
This module implements authentication endpoints for Janrain Capture.

Code

function janrain_capture_signin_link() {
  $ver = variable_get('janrain_capture_ver', JANRAIN_CAPTURE_VERSION_DEFAULT);
  if ($ver == JANRAIN_CAPTURE_VERSION_LEGACY) {
    $link = array(
      '#type' => 'link',
      '#title' => t('Register / Sign in'),
      '#href' => janrain_capture_url(),
      '#attributes' => array(
        'class' => array(
          'janrain_capture_anchor',
          'janrain_capture_signin',
        ),
      ),
    );
  }
  else {
    $link = array(
      '#type' => 'link',
      '#title' => t('Register / Sign in'),
      '#href' => janrain_capture_url(),
      '#attributes' => array(
        'class' => array(
          'capture_modal_open',
        ),
      ),
    );
  }
  return $link;
}