You are here

function _fb_user_button_text in Drupal for Facebook 7.4

Same name and namespace in other branches
  1. 6.3 fb_user.module \_fb_user_button_text()
  2. 7.3 fb_user.module \_fb_user_button_text()

Helper function to retrieve button text.

File

./fb_user.module, line 386
This module manages relations between local Drupal user accounts and their accounts on facebook.com.

Code

function _fb_user_button_text($form_id) {
  $button_text =& drupal_static(__FUNCTION__);
  if (!isset($button_text)) {
    $button_text = array(
      'user_register_form' => variable_get(FB_USER_VAR_TEXT_REGISTER, NULL),
      'user_login' => variable_get(FB_USER_VAR_TEXT_LOGIN, NULL),
      'user_login_block' => variable_get(FB_USER_VAR_TEXT_LOGIN_BLOCK, NULL),
    );
  }
  return isset($button_text[$form_id]) ? $button_text[$form_id] : '';
}