array(), 'unavailable' => array(), ); $finder = $phpbb_extension_manager->get_finder(); $captcha_plugin_classes = $finder ->extension_directory('/captcha') ->suffix('_plugin') ->core_path('includes/captcha/plugins/') ->get_classes(); foreach ($captcha_plugin_classes as $class) { // check if this class needs to be loaded in legacy mode $old_class = preg_replace('/^phpbb_captcha_plugins_/', '', $class); if (file_exists($phpbb_root_path . "includes/captcha/plugins/$old_class.$phpEx") && !class_exists($old_class)) { include($phpbb_root_path . "includes/captcha/plugins/$old_class.$phpEx"); $class = preg_replace('/_plugin$/', '', $old_class); } if (call_user_func(array($class, 'is_available'))) { $captchas['available'][$class] = call_user_func(array($class, 'get_name')); } else { $captchas['unavailable'][$class] = call_user_func(array($class, 'get_name')); } } return $captchas; } }