diff --git a/wp-content/plugins/wp-recaptcha-bp/recaptcha.php b/wp-content/plugins/wp-recaptcha-bp/recaptcha.php index 73461902f3ac1f16647c63cc794a776113ef0d66..7c16045ecbebb79b3c0dcaac733c153466c812e7 100644 --- a/wp-content/plugins/wp-recaptcha-bp/recaptcha.php +++ b/wp-content/plugins/wp-recaptcha-bp/recaptcha.php @@ -11,6 +11,7 @@ * @link http://www.google.com/recaptcha */ +require_once('config.php'); require_once('wp-plugin.php'); if (class_exists('ReCAPTCHAPlugin')) @@ -115,8 +116,8 @@ class ReCAPTCHAPlugin extends WPPlugin $option_defaults = array(); $old_options = WPPlugin::retrieve_options("recaptcha"); if ($old_options) { - $option_defaults['site_key'] = $old_options['pubkey']; - $option_defaults['secret'] = $old_options['privkey']; + $option_defaults['site_key'] = $old_options['pubkey'] ? $old_options['pubkey'] : GLOBAL_RECAPTCHA_KEY; + $option_defaults['secret'] = $old_options['privkey'] ? $old_options['privkey'] : GLOBAL_RECAPTCHA_PRIVATE_KEY; // styling $option_defaults['recaptcha_language'] = $old_options['re_lang']; @@ -126,14 +127,14 @@ class ReCAPTCHAPlugin extends WPPlugin } else { $old_options = WPPlugin::retrieve_options($this->options_name); if ($old_options) { - $option_defaults['site_key'] = $old_options['public_key']; - $option_defaults['secret'] = $old_options['private_key']; + $option_defaults['site_key'] = $old_options['public_key'] ? $old_options['pubkey'] : GLOBAL_RECAPTCHA_KEY; + $option_defaults['secret'] = $old_options['private_key'] ? $old_options['privkey'] : GLOBAL_RECAPTCHA_PRIVATE_KEY; $option_defaults['comments_theme'] = 'standard'; $option_defaults['recaptcha_language'] = $old_options['recaptcha_language']; $option_defaults['no_response_error'] = $old_options['no_response_error']; } else { - $option_defaults['site_key'] = ''; - $option_defaults['secret'] = ''; + $option_defaults['site_key'] = GLOBAL_RECAPTCHA_KEY; + $option_defaults['secret'] = GLOBAL_RECAPTCHA_PRIVATE_KEY; $option_defaults['comments_theme'] = 'standard'; $option_defaults['recaptcha_language'] = 'en'; $option_defaults['no_response_error'] =