Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
captcha
Commits
26911aac
Commit
26911aac
authored
Oct 08, 2019
by
Fabiano Sant'Ana
Browse files
Issue #3086495 by wundo: Remove old function
parent
85771bab
Changes
1
Hide whitespace changes
Inline
Side-by-side
captcha.admin.inc
View file @
26911aac
...
@@ -5,41 +5,6 @@
...
@@ -5,41 +5,6 @@
* Functionality and helper functions for CAPTCHA administration.
* Functionality and helper functions for CAPTCHA administration.
*/
*/
/**
* Return an array with the available CAPTCHA types.
*
* For use as options array for a select form elements.
*
* @param bool $add_special_options
* If true: also add the 'default' option.
*
* @return array
* An associative array mapping "$module/$type" to
* "$type (from module $module)" with $module the module name
* implementing the CAPTCHA and $type the name of the CAPTCHA type.
*/
function
_captcha_available_challenge_types
(
$add_special_options
=
TRUE
)
{
$captcha_types
=
[];
if
(
$add_special_options
)
{
$captcha_types
[
'default'
]
=
t
(
'Default challenge type'
);
}
// We do our own version of Drupal's module_invoke_all() here because
// we want to build an array with custom keys and values.
foreach
(
\
Drupal
::
moduleHandler
()
->
getImplementations
(
'captcha'
)
as
$module
)
{
$result
=
call_user_func_array
(
$module
.
'_captcha'
,
[
'list'
]);
if
(
is_array
(
$result
))
{
foreach
(
$result
as
$type
)
{
$captcha_types
[
"
$module
/
$type
"
]
=
t
(
'@type (from module @module)'
,
[
'@type'
=>
$type
,
'@module'
=>
$module
,
]);
}
}
}
return
$captcha_types
;
}
/**
/**
* Helper function for generating an example challenge.
* Helper function for generating an example challenge.
*/
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment