Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 9d72bfe515c90800399e0bd209fa386a62fe6393 Mon Sep 17 00:00:00 2001
From: joe <joe@incal.net>
Date: Fri, 16 Nov 2012 10:27:17 +0100
Subject: [PATCH 149/229] Patch to stop recaptcha from dumbly use http://
schema when we are on https
---
wp-content/plugins/wp-recaptcha-bp/wp-plugin.php | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/wp-content/plugins/wp-recaptcha-bp/wp-plugin.php b/wp-content/plugins/wp-recaptcha-bp/wp-plugin.php
index ef05111e..001c8959 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() {
@@ -72,7 +76,7 @@ if (!class_exists('WPPlugin')) {
static function url_to_plugin_directory() {
$current_directory = basename(dirname(__FILE__));
-
+
return WPPlugin::plugins_url() . "/${current_directory}";
}
--
2.17.1