You are here

function _text_captcha_word_pool_get_content in CAPTCHA Pack 7

Same name and namespace in other branches
  1. 8 text_captcha/text_captcha.module \_text_captcha_word_pool_get_content()
  2. 5 text_captcha/text_captcha.inc \_text_captcha_word_pool_get_content()
  3. 6 text_captcha/text_captcha.inc \_text_captcha_word_pool_get_content()

Helper function for getting the content of a word pool Locale dependent

4 calls to _text_captcha_word_pool_get_content()
lost_character_captcha_captcha in text_captcha/lost_character_captcha/lost_character_captcha.module
Implements hook_captcha().
_phrase_captcha_generate_words in text_captcha/phrase_captcha/phrase_captcha.module
Function for generating an array of words
_text_captcha_word_pool_form_items in text_captcha/text_captcha.inc
Helper function for setting word pool form items Locale dependent
_word_list_captcha_get_word_list_captcha in text_captcha/word_list_captcha/word_list_captcha.module
Helper function for generating a word list CAPTCHA

File

text_captcha/text_captcha.inc, line 51

Code

function _text_captcha_word_pool_get_content($name_base, $lang_code, $default_value, $explode = FALSE) {
  if (module_exists('locale')) {
    if (!$lang_code) {
      global $language;
      $lang_code = $language->language;
    }
    $content = variable_get("{$name_base}_{$lang_code}", t($default_value));
  }
  else {
    $content = variable_get($name_base, t($default_value));
  }
  if ($explode) {
    $content = _text_captcha_whitespace_explode($content);
  }
  return $content;
}