Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 23theme-child
  • back-to-hyperdb
  • creativecommons
  • debug
  • footnotes-made-easy
  • logo-login
  • master
  • renovate/roots-wordpress-6.x
  • responsive-twentyten
  • theme-link-folio
  • twentytwentytwochild
  • wordpress-full
  • wp-6.8.1
  • wpgancio
  • noblogs-5.6.1c
15 results

Target

Select target project
  • noblogs/noblogs-composer
1 result
Select Git revision
  • 23theme-child
  • back-to-hyperdb
  • creativecommons
  • debug
  • footnotes-made-easy
  • logo-login
  • master
  • renovate/roots-wordpress-6.x
  • responsive-twentyten
  • theme-link-folio
  • twentytwentytwochild
  • wordpress-full
  • wp-6.8.1
  • wpgancio
  • noblogs-5.6.1c
15 results
Show changes
Commits on Source (2)
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "d599d3607efe2f95a105256ec049b5ab", "content-hash": "15b5b1706a554e6d0e99598aab6a1558",
"packages": [ "packages": [
{ {
"name": "bjornjohansen/wplang", "name": "bjornjohansen/wplang",
...@@ -1350,24 +1350,6 @@ ...@@ -1350,24 +1350,6 @@
"type": "wordpress-plugin", "type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/wp-piwik/" "homepage": "https://wordpress.org/plugins/wp-piwik/"
}, },
{
"name": "wpackagist-plugin/wp-recaptcha-bp",
"version": "4.1",
"source": {
"type": "svn",
"url": "https://plugins.svn.wordpress.org/wp-recaptcha-bp/",
"reference": "tags/4.1"
},
"dist": {
"type": "zip",
"url": "https://downloads.wordpress.org/plugin/wp-recaptcha-bp.4.1.zip"
},
"require": {
"composer/installers": "^1.0 || ^2.0"
},
"type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/wp-recaptcha-bp/"
},
{ {
"name": "wpackagist-plugin/wp-statusnet", "name": "wpackagist-plugin/wp-statusnet",
"version": "1.4.2", "version": "1.4.2",
......
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
"wpackagist-plugin/wp-piwik": { "wpackagist-plugin/wp-piwik": {
"Disable Piwik global updates": "patches/plugins/wp-piwik.patch" "Disable Piwik global updates": "patches/plugins/wp-piwik.patch"
}, },
"wpackagist-plugin/wp-recaptcha-bp": {
"Support for global recaptcha keys": "patches/plugins/wp-recaptcha-bp.patch"
},
"wpackagist-plugin/simply-exclude": { "wpackagist-plugin/simply-exclude": {
"Small workaround to fix simplyexclude plugin broken with wordpress 4": "patches/plugins/0117-simplyexclude.patch" "Small workaround to fix simplyexclude plugin broken with wordpress 4": "patches/plugins/0117-simplyexclude.patch"
}, },
......
diff --git a/wp-content/plugins/wp-recaptcha-bp/recaptcha.php b/wp-content/plugins/wp-recaptcha-bp/recaptcha.php
index 73461902f..0ba2fab2d 100644
--- a/wp-content/plugins/wp-recaptcha-bp/recaptcha.php
+++ b/wp-content/plugins/wp-recaptcha-bp/recaptcha.php
@@ -110,13 +110,19 @@ class ReCAPTCHAPlugin extends WPPlugin
// set the default options
function register_default_options() {
- if ($this->options)
+ if ($this->options) {
+ if ($this->keys_missing()) {
+ $this->options['site_key'] = GLOBAL_RECAPTCHA_KEY;
+ $this->options['secret'] = GLOBAL_RECAPTCHA_PRIVATE_KEY;
+ WPPlugin::add_options($this->options_name, $this->options);
+ }
return;
+ }
$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 +132,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'] = '';
+ } else {
+ $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'] =
@@ -171,9 +177,11 @@ class ReCAPTCHAPlugin extends WPPlugin
}
function missing_keys_notice() {
+ /*
if ($this->keys_missing()) {
$this->create_error_notice('reCAPTCHA API Keys are missing.');
}
+ */
}
function validate_dropdown($array, $key, $value) {
@@ -202,7 +210,9 @@ class ReCAPTCHAPlugin extends WPPlugin
// if it's for wordpress mu, show the errors
if ($this->is_multi_blog()) {
- $error = $errors->get_error_message('captcha');
+ if( is_wp_error( $errors ) ) {
+ $error = $errors->get_error_message('captcha');
+ }
echo '<label for="verification">Verification:</label>';
echo ($error ? '<p class="error">' . $error . '</p>' : '');
echo $this->get_recaptcha_html();
@@ -243,7 +253,7 @@ class ReCAPTCHAPlugin extends WPPlugin
$_POST['g-recaptcha-response'] == '') {
$result['errors']->add('blank_captcha',
$this->options['no_response_error']);
- return $result['errors'];
+ return $result;
}
if ($this->_reCaptchaLib == null) {
diff --git a/wp-content/plugins/wp-recaptcha-bp/wp-plugin.php b/wp-content/plugins/wp-recaptcha-bp/wp-plugin.php
index ef05111ee..001c89597 100644
--- a/wp-content/plugins/wp-recaptcha-bp/wp-plugin.php
+++ b/wp-content/plugins/wp-recaptcha-bp/wp-plugin.php
@@ -59,9 +59,13 @@ if (!class_exists('WPPlugin')) {
static function plugins_url() {
if (WPPlugin::determine_environment() == Environment::WordPressMU)
- return site_url() . '/wp-content/mu-plugins';
+ $url = site_url() . '/wp-content/mu-plugins';
else
- return site_url() . '/wp-content/plugins';
+ $url = site_url() . '/wp-content/plugins';
+ if ($_SERVER['https'] == 'on') {
+ $url = str_replace('http://', 'https://', $url);
+ }
+ return $url;
}
static function path_to_plugin_directory() {