| 1 |
<?php |
<?php |
| 2 |
// $Id: captcha.admin.inc,v 1.29 2009/07/11 17:30:38 soxofaan Exp $ |
// $Id: captcha.admin.inc,v 1.30 2009/08/10 22:33:34 soxofaan Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Return an array with the available CAPTCHA types, for use as options array |
* Return an array with the available CAPTCHA types, for use as options array |
| 16 |
$captcha_types['none'] = '['. t('none') .']'; |
$captcha_types['none'] = '['. t('none') .']'; |
| 17 |
$captcha_types['default'] = '['. t('default challenge type') .']'; |
$captcha_types['default'] = '['. t('default challenge type') .']'; |
| 18 |
} |
} |
| 19 |
|
// We do our own version of Drupal's module_invoke_all() here because |
| 20 |
|
// we want to build an array with custom keys and values. |
| 21 |
foreach (module_implements('captcha') as $module) { |
foreach (module_implements('captcha') as $module) { |
| 22 |
$result = call_user_func_array($module .'_captcha', 'list'); |
$result = call_user_func_array($module .'_captcha', array('list')); |
| 23 |
if (is_array($result)) { |
if (is_array($result)) { |
| 24 |
foreach ($result as $type) { |
foreach ($result as $type) { |
| 25 |
$captcha_types["$module/$type"] = t('@type (from module @module)', array('@type' => $type, '@module' => $module)); |
$captcha_types["$module/$type"] = t('@type (from module @module)', array('@type' => $type, '@module' => $module)); |