Version Description
- Bug Fix - Fixed major issue when upgrading from previous version of WordPress HTTPS.
- Bug Fix - Added is_ssl method back to main plugin class to avoid errors with Gravity Forms.
- Bug Fix - Archive widget links should now appear correctly.
Download this release
Release Info
Developer | Mvied |
Plugin | WordPress HTTPS (SSL) |
Version | 3.0.1 |
Comparing to | |
See all releases |
Code changes from version 3.0 to 3.0.1
- lib/WordPressHTTPS.php +20 -17
- lib/WordPressHTTPS/Module/Admin/Settings.php +1 -1
- lib/WordPressHTTPS/Module/Filters.php +1 -1
- readme.txt +5 -8
- wordpress-https.php +2 -2
lib/WordPressHTTPS.php
CHANGED
@@ -104,6 +104,10 @@ class WordPressHTTPS extends WordPressHTTPS_Plugin {
|
|
104 |
} else {
|
105 |
$this->setSetting('ssl_host_diff', 0);
|
106 |
}
|
|
|
|
|
|
|
|
|
107 |
|
108 |
// Add SSL Port to HTTPS URL
|
109 |
$this->getHttpsUrl()->setPort($this->getSetting('ssl_port'));
|
@@ -183,12 +187,8 @@ class WordPressHTTPS extends WordPressHTTPS_Plugin {
|
|
183 |
$url->setHost($this->getHttpsUrl()->getHost());
|
184 |
$url->setPort($this->getHttpsUrl()->getPort());
|
185 |
|
186 |
-
$
|
187 |
-
|
188 |
-
$path = str_replace(rtrim($this->getHttpsUrl()->getPath(), '/'), '', $path);
|
189 |
-
$path = str_replace(rtrim($this->getHttpUrl()->getPath(), '/'), '', $path);
|
190 |
-
$path = rtrim($this->getHttpsUrl()->getPath(), '/') . '/' . ltrim($path, '/');
|
191 |
-
$url->setPath($path);
|
192 |
}
|
193 |
return $url;
|
194 |
} else {
|
@@ -208,13 +208,9 @@ class WordPressHTTPS extends WordPressHTTPS_Plugin {
|
|
208 |
$url->setScheme('http');
|
209 |
$url->setHost($this->getHttpUrl()->getHost());
|
210 |
$url->setPort($this->getHttpUrl()->getPort());
|
211 |
-
|
212 |
-
$
|
213 |
-
|
214 |
-
$path = str_replace(rtrim($this->getHttpsUrl()->getPath(), '/'), '', $path);
|
215 |
-
$path = str_replace(rtrim($this->getHttpUrl()->getPath(), '/'), '', $path);
|
216 |
-
$path = rtrim($this->getHttpUrl()->getPath(), '/') . '/' . ltrim($path, '/');
|
217 |
-
$url->setPath($path);
|
218 |
}
|
219 |
return $url;
|
220 |
} else {
|
@@ -243,6 +239,16 @@ class WordPressHTTPS extends WordPressHTTPS_Plugin {
|
|
243 |
}
|
244 |
return is_ssl();
|
245 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
|
247 |
/**
|
248 |
* Redirects page to HTTP or HTTPS accordingly
|
@@ -262,10 +268,7 @@ class WordPressHTTPS extends WordPressHTTPS_Plugin {
|
|
262 |
}
|
263 |
|
264 |
if ( $url ) {
|
265 |
-
$
|
266 |
-
$path = '/'. ltrim(str_replace($this->getHttpsUrl()->getPath(), '', $path), '/');
|
267 |
-
$path = '/'. ltrim(str_replace($this->getHttpUrl()->getPath(), '', $path), '/');
|
268 |
-
$url->setPath(rtrim($url->getPath(), '/') . $path);
|
269 |
|
270 |
// Use a cookie to detect redirect loops
|
271 |
$redirect_count = ( isset($_COOKIE['redirect_count']) && is_numeric($_COOKIE['redirect_count']) ? (int)$_COOKIE['redirect_count']+1 : 1 );
|
104 |
} else {
|
105 |
$this->setSetting('ssl_host_diff', 0);
|
106 |
}
|
107 |
+
|
108 |
+
if ( strpos($this->getHttpsUrl()->getPath(), $this->getHttpUrl()->getPath()) === false ) {
|
109 |
+
$this->getHttpsUrl()->setPath( $this->getHttpsUrl()->getPath() . $this->getHttpUrl()->getPath() );
|
110 |
+
}
|
111 |
|
112 |
// Add SSL Port to HTTPS URL
|
113 |
$this->getHttpsUrl()->setPort($this->getSetting('ssl_port'));
|
187 |
$url->setHost($this->getHttpsUrl()->getHost());
|
188 |
$url->setPort($this->getHttpsUrl()->getPort());
|
189 |
|
190 |
+
if ( $this->getSetting('ssl_host_diff') && strpos($url->getPath(), $this->getHttpsUrl()->getPath()) === false ) {
|
191 |
+
$url->setPath(str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $url->getPath()));
|
|
|
|
|
|
|
|
|
192 |
}
|
193 |
return $url;
|
194 |
} else {
|
208 |
$url->setScheme('http');
|
209 |
$url->setHost($this->getHttpUrl()->getHost());
|
210 |
$url->setPort($this->getHttpUrl()->getPort());
|
211 |
+
|
212 |
+
if ( $this->getSetting('ssl_host_diff') && strpos($url->getPath(), $this->getHttpUrl()->getPath()) === false ) {
|
213 |
+
$url->setPath(str_replace($this->getHttpsUrl()->getPath(), $this->getHttpUrl()->getPath(), $url->getPath()));
|
|
|
|
|
|
|
|
|
214 |
}
|
215 |
return $url;
|
216 |
} else {
|
239 |
}
|
240 |
return is_ssl();
|
241 |
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Maintained for backwards compatibility.
|
245 |
+
*
|
246 |
+
* @param none
|
247 |
+
* @return bool
|
248 |
+
*/
|
249 |
+
public function is_ssl() {
|
250 |
+
return $this->isSsl();
|
251 |
+
}
|
252 |
|
253 |
/**
|
254 |
* Redirects page to HTTP or HTTPS accordingly
|
268 |
}
|
269 |
|
270 |
if ( $url ) {
|
271 |
+
$url->setPath(rtrim(str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $_SERVER['REQUEST_URI'])));
|
|
|
|
|
|
|
272 |
|
273 |
// Use a cookie to detect redirect loops
|
274 |
$redirect_count = ( isset($_COOKIE['redirect_count']) && is_numeric($_COOKIE['redirect_count']) ? (int)$_COOKIE['redirect_count']+1 : 1 );
|
lib/WordPressHTTPS/Module/Admin/Settings.php
CHANGED
@@ -189,7 +189,7 @@ class WordPressHTTPS_Module_Admin_Settings extends WordPressHTTPS_Module impleme
|
|
189 |
$_POST[$key] = get_option($key);
|
190 |
}
|
191 |
} else {
|
192 |
-
$_POST[$key] = $this->getPlugin()->getHttpsUrl();
|
193 |
}
|
194 |
} else {
|
195 |
$_POST[$key] = get_option($key);
|
189 |
$_POST[$key] = get_option($key);
|
190 |
}
|
191 |
} else {
|
192 |
+
$_POST[$key] = $this->getPlugin()->getHttpsUrl()->toString();
|
193 |
}
|
194 |
} else {
|
195 |
$_POST[$key] = get_option($key);
|
lib/WordPressHTTPS/Module/Filters.php
CHANGED
@@ -42,7 +42,7 @@ class WordPressHTTPS_Module_Filters extends WordPressHTTPS_Module implements Wor
|
|
42 |
|
43 |
// Filter HTTPS from links in WP 3.0+
|
44 |
if ( version_compare(get_bloginfo('version'), '3.0', '>') && !is_admin() && $this->getPlugin()->getHttpUrl()->getScheme() != 'https' ) {
|
45 |
-
$filters = array('page_link', 'post_link', 'category_link', '
|
46 |
foreach( $filters as $filter ) {
|
47 |
add_filter($filter, array($this->getPlugin(), 'makeUrlHttp'), 10);
|
48 |
}
|
42 |
|
43 |
// Filter HTTPS from links in WP 3.0+
|
44 |
if ( version_compare(get_bloginfo('version'), '3.0', '>') && !is_admin() && $this->getPlugin()->getHttpUrl()->getScheme() != 'https' ) {
|
45 |
+
$filters = array('page_link', 'post_link', 'category_link', 'archives_link', 'tag_link', 'search_link');
|
46 |
foreach( $filters as $filter ) {
|
47 |
add_filter($filter, array($this->getPlugin(), 'makeUrlHttp'), 10);
|
48 |
}
|
readme.txt
CHANGED
@@ -4,18 +4,11 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.4
|
7 |
-
Stable tag: 3.0
|
8 |
|
9 |
WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
|
10 |
|
11 |
== Description ==
|
12 |
-
<ul>
|
13 |
-
<li>Supports Shared and Private SSL.</li>
|
14 |
-
<li>Helps reduce or completely fix partially encrypted / mixed content errors.</li>
|
15 |
-
<li>Force SSL on a per-page basis.</li>
|
16 |
-
<li>Force SSL in admin panel.</li>
|
17 |
-
</ul>
|
18 |
-
|
19 |
If you're having partially encrypted/mixed content errors or other problems, please read the <a href="http://wordpress.org/extend/plugins/wordpress-https/faq/">FAQ</a>. If you're still having trouble, please <a href="http://wordpress.org/tags/wordpress-https#postform">start a support topic</a> and I will do my best to assist you.
|
20 |
|
21 |
== Installation ==
|
@@ -71,6 +64,10 @@ add_filter('force_ssl' , 'custom_force_ssl', 10, 2);`
|
|
71 |
2. Force SSL checkbox added to add/edit posts screen
|
72 |
|
73 |
== Changelog ==
|
|
|
|
|
|
|
|
|
74 |
= 3.0 =
|
75 |
* The plugin has been completely re-written.
|
76 |
* Redirect loops should no longer be an issue.
|
4 |
Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.4
|
7 |
+
Stable tag: 3.0.1
|
8 |
|
9 |
WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
|
10 |
|
11 |
== Description ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
If you're having partially encrypted/mixed content errors or other problems, please read the <a href="http://wordpress.org/extend/plugins/wordpress-https/faq/">FAQ</a>. If you're still having trouble, please <a href="http://wordpress.org/tags/wordpress-https#postform">start a support topic</a> and I will do my best to assist you.
|
13 |
|
14 |
== Installation ==
|
64 |
2. Force SSL checkbox added to add/edit posts screen
|
65 |
|
66 |
== Changelog ==
|
67 |
+
= 3.0.1 =
|
68 |
+
* Bug Fix - Fixed major issue when upgrading from previous version of WordPress HTTPS.
|
69 |
+
* Bug Fix - Added is_ssl method back to main plugin class to avoid errors with Gravity Forms.
|
70 |
+
* Bug Fix - Archive widget links should now appear correctly.
|
71 |
= 3.0 =
|
72 |
* The plugin has been completely re-written.
|
73 |
* Redirect loops should no longer be an issue.
|
wordpress-https.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin URI: http://mvied.com/projects/wordpress-https/
|
5 |
Description: WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
|
6 |
Author: Mike Ems
|
7 |
-
Version: 3.0
|
8 |
Author URI: http://mvied.com/
|
9 |
*/
|
10 |
|
@@ -24,7 +24,7 @@ require_once('WordPressHTTPS.php');
|
|
24 |
if ( function_exists('get_bloginfo') && ! defined('WP_UNINSTALL_PLUGIN') ) {
|
25 |
$wordpress_https = new WordPressHTTPS;
|
26 |
$wordpress_https->setSlug('wordpress-https');
|
27 |
-
$wordpress_https->setVersion('3.0');
|
28 |
$wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance());
|
29 |
$wordpress_https->setPluginUrl(plugins_url('', __FILE__));
|
30 |
$wordpress_https->setDirectory(dirname(__FILE__));
|
4 |
Plugin URI: http://mvied.com/projects/wordpress-https/
|
5 |
Description: WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
|
6 |
Author: Mike Ems
|
7 |
+
Version: 3.0.1
|
8 |
Author URI: http://mvied.com/
|
9 |
*/
|
10 |
|
24 |
if ( function_exists('get_bloginfo') && ! defined('WP_UNINSTALL_PLUGIN') ) {
|
25 |
$wordpress_https = new WordPressHTTPS;
|
26 |
$wordpress_https->setSlug('wordpress-https');
|
27 |
+
$wordpress_https->setVersion('3.0.1');
|
28 |
$wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance());
|
29 |
$wordpress_https->setPluginUrl(plugins_url('', __FILE__));
|
30 |
$wordpress_https->setDirectory(dirname(__FILE__));
|