_providers ) { return $this->_providers; } $built_in = array( 'Ai1ec_Captcha_Recaptcha_Provider', 'Ai1ec_Captcha_Nocaptcha_Provider', ); $all_providers = apply_filters( 'ai1ec_captcha_providers', $built_in ); if ( empty( $all_providers ) ) { return array(); } $providers = array(); foreach ( $all_providers as $provider_class ) { $provider = new $provider_class( $this->_registry ); if ( ! $provider instanceof Ai1ec_Captcha_Provider ) { continue; } $providers[] = $provider; } return $providers; } /** * Returns providers settings. * * @return array Providers settings. */ public function get_providers_as_settings() { $all_providers = $this->get_providers(); $settings = array(); foreach ( $all_providers as $provider ) { $settings[] = array( 'text' => $provider->get_name(), 'value' => get_class( $provider ), 'settings' => $provider->get_settings(), ); } return $settings; } }