Version Description
(03/02/17) = * Finally fixed srcset Problems * Changed the working method of the Plugin * Some other bugfixes
Download this release
Release Info
Developer | condacore |
Plugin | HTTP / HTTPS Remover: SSL Mixed Content Fix |
Version | 1.4 |
Comparing to | |
See all releases |
Code changes from version 1.3.1 to 1.4
- http-https-remover.php +76 -42
- readme.txt +16 -5
http-https-remover.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
/**
|
3 |
* Plugin Name: HTTP / HTTPS Remover
|
4 |
* Plugin URI: https://de.wordpress.org/plugins/http-https-remover/
|
5 |
-
* Description:
|
6 |
-
* Version: 1.
|
7 |
-
* Author:
|
8 |
* Author URI: https://condacore.com/
|
9 |
* License: GPLv3
|
10 |
*/
|
@@ -23,12 +23,17 @@ if (!defined('ABSPATH')) exit;
|
|
23 |
class HTTP_HTTPS_REMOVER
|
24 |
|
25 |
{
|
|
|
|
|
|
|
|
|
26 |
// ###########################################
|
27 |
// ##### Apply Plugin on the whole Site ######
|
28 |
// ###########################################
|
29 |
public function __construct()
|
30 |
|
31 |
{
|
|
|
32 |
add_action('wp_loaded', array(
|
33 |
$this,
|
34 |
'letsGo'
|
@@ -61,47 +66,76 @@ class HTTP_HTTPS_REMOVER
|
|
61 |
// ###############################
|
62 |
// ##### The important Path ######
|
63 |
// ###############################
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
$buffer = str_replace('
|
69 |
-
//
|
70 |
-
$buffer = str_replace('
|
71 |
-
|
72 |
-
|
73 |
-
$buffer =
|
74 |
-
//
|
75 |
-
$buffer =
|
76 |
-
|
77 |
-
$buffer =
|
78 |
-
$buffer =
|
79 |
-
//
|
80 |
-
|
81 |
-
|
82 |
-
$buffer =
|
83 |
-
$buffer =
|
84 |
-
//
|
85 |
-
|
86 |
-
|
87 |
-
$buffer =
|
88 |
-
$buffer =
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
$buffer =
|
94 |
-
$buffer =
|
95 |
-
$buffer =
|
96 |
-
$buffer =
|
97 |
-
$buffer =
|
98 |
-
$buffer =
|
99 |
-
$buffer =
|
100 |
-
$buffer =
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
104 |
return $buffer;
|
105 |
}
|
106 |
}
|
107 |
new HTTP_HTTPS_REMOVER();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Plugin Name: HTTP / HTTPS Remover
|
4 |
* Plugin URI: https://de.wordpress.org/plugins/http-https-remover/
|
5 |
+
* Description: I changed the way how „HTTP / HTTPS Remover“ is working. It doesn’t remove http and https from links in source code anymore. Now it converts all links to https!
|
6 |
+
* Version: 1.4
|
7 |
+
* Author: CONDACORE
|
8 |
* Author URI: https://condacore.com/
|
9 |
* License: GPLv3
|
10 |
*/
|
23 |
class HTTP_HTTPS_REMOVER
|
24 |
|
25 |
{
|
26 |
+
|
27 |
+
|
28 |
+
//Add some links on the plugin page
|
29 |
+
|
30 |
// ###########################################
|
31 |
// ##### Apply Plugin on the whole Site ######
|
32 |
// ###########################################
|
33 |
public function __construct()
|
34 |
|
35 |
{
|
36 |
+
|
37 |
add_action('wp_loaded', array(
|
38 |
$this,
|
39 |
'letsGo'
|
66 |
// ###############################
|
67 |
// ##### The important Path ######
|
68 |
// ###############################
|
69 |
+
|
70 |
+
|
71 |
+
|
72 |
+
// All Intern Links
|
73 |
+
$buffer = str_replace('http://' . $_SERVER['HTTP_HOST'], 'https://' . $_SERVER['HTTP_HOST'], $buffer);
|
74 |
+
$buffer = str_replace('"//' . $_SERVER['HTTP_HOST'], '"https://' . $_SERVER['HTTP_HOST'], $buffer);
|
75 |
+
$buffer = str_replace('\'//' . $_SERVER['HTTP_HOST'], '\'https://' . $_SERVER['HTTP_HOST'], $buffer);
|
76 |
+
|
77 |
+
// Google APIs
|
78 |
+
$buffer = preg_replace('|http://(.*?).googleapis.com|', 'https://$1.googleapis.com', $buffer);
|
79 |
+
$buffer = preg_replace('|"//(.*?).googleapis.com|', '"https://$1.googleapis.com', $buffer);
|
80 |
+
$buffer = preg_replace("|'//(.*?).googleapis.com|", "'https://$1.googleapis.com", $buffer);
|
81 |
+
|
82 |
+
$buffer = preg_replace('|http://(.*?).google.com|', 'https://$1.google.com', $buffer);
|
83 |
+
$buffer = preg_replace('|"//(.*?).google.com|', '"https://$1.google.com', $buffer);
|
84 |
+
$buffer = preg_replace("|'//(.*?).google.com|", "'https://$1.google.com", $buffer);
|
85 |
+
|
86 |
+
// Facebook URLs
|
87 |
+
$buffer = preg_replace('|http://(.*?).fbcdn.net|', 'https://$1.fbcdn.net', $buffer);
|
88 |
+
$buffer = preg_replace('|"//(.*?).facebook.net|', '"https://$1.facebook.net', $buffer);
|
89 |
+
$buffer = preg_replace("|'//(.*?).facebook.com|", "'https://$1.facebook.com", $buffer);
|
90 |
+
|
91 |
+
// Instagram URLs
|
92 |
+
$buffer = preg_replace('|http://(.*?).instagram.com|', 'https://$1.instagram.com', $buffer);
|
93 |
+
$buffer = preg_replace('|http://(.*?).cdninstagram.com|', 'https://$1.cdninstagram.com', $buffer);
|
94 |
+
|
95 |
+
|
96 |
+
// Some CDNs
|
97 |
+
$buffer = str_replace('http://amazonaws.com', 'https://amazonaws.com', $buffer);
|
98 |
+
$buffer = preg_replace('|http://(.*?).amazonaws.com|', 'https://$1.amazonaws.com', $buffer);
|
99 |
+
$buffer = preg_replace('|http://(.*?).cloudfront.net|', 'https://$1.cloudfront.net', $buffer);
|
100 |
+
$buffer = preg_replace('|http://(.*?).cloudfront.com|', 'https://$1.cloudfront.com', $buffer);
|
101 |
+
$buffer = preg_replace('|http://(.*?).cloudflare.com|', 'https://$1.cloudflare.com', $buffer);
|
102 |
+
$buffer = preg_replace('|http://(.*?).jsdelivr.net|', 'https://$1.jsdelivr.net', $buffer);
|
103 |
+
$buffer = preg_replace('|http://(.*?).bootstrapcdn.com|', 'https://$1.bootstrapcdn.com', $buffer);
|
104 |
+
$buffer = preg_replace('|http://(.*?).rawgit.com|', 'https://$1.rawgit.com', $buffer);
|
105 |
+
$buffer = preg_replace('|http://(.*?).maxcdn.com|', 'https://$1.maxcdn.com', $buffer);
|
106 |
+
|
107 |
+
|
108 |
+
// Disqus URLs
|
109 |
+
$buffer = preg_replace('|http://(.*?).disquscdn.com|', 'https://$1.disquscdn.com', $buffer);
|
110 |
+
$buffer = preg_replace('|http://(.*?).disqus.com|', 'https://$1.disqus.com', $buffer);
|
111 |
+
|
112 |
+
// Twitter
|
113 |
+
$buffer = preg_replace('|http://(.*?).twitter.com|', 'https://$1.twitter.com', $buffer);
|
114 |
+
|
115 |
+
// Akamai
|
116 |
+
$buffer = preg_replace('|http://(.*?).akamaihd.net|', 'https://$1.akamaihd.net', $buffer);
|
117 |
+
|
118 |
+
// Gravatar
|
119 |
+
$buffer = preg_replace("|http://(.+).gravatar.com|", "'https://$1.gravatar.com", $buffer);
|
120 |
+
|
121 |
+
// WordPress
|
122 |
+
$buffer = preg_replace("|'//(.*?).w.org|", "'https://$1.w.org", $buffer);
|
123 |
+
|
124 |
+
|
125 |
}
|
126 |
return $buffer;
|
127 |
}
|
128 |
}
|
129 |
new HTTP_HTTPS_REMOVER();
|
130 |
+
|
131 |
+
//Add some links on the plugin page
|
132 |
+
add_filter('plugin_row_meta', 'http_https_remover_extra_links', 10, 2);
|
133 |
+
|
134 |
+
function http_https_remover_extra_links($links, $file) {
|
135 |
+
if ( $file == plugin_basename(dirname(__FILE__).'/http-https-remover.php') ) {
|
136 |
+
$links[] = '<a href="https://condacore.com/portfolio/http-https-remover/#beta" target="_blank">' . esc_html__('Become a Beta Tester', 'http-https-remover') . '</a>';
|
137 |
+
$links[] = '<a href="https://twitter.com/condacore" target="_blank">' . esc_html__('Twitter', 'http-https-remover') . '</a>';
|
138 |
+
$links[] = '<a href="https://paypal.me/MariusBolik" target="_blank">' . esc_html__('Donate', 'http-https-remover') . '</a>';
|
139 |
+
}
|
140 |
+
return $links;
|
141 |
+
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: condacore
|
|
3 |
Donate link: https://www.paypal.me/MariusBolik
|
4 |
Tags: http, https, mixed content
|
5 |
Requires at least: 1.2.0
|
6 |
-
Tested up to: 4.7
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -18,7 +18,11 @@ A fix for mixed content! This Plugin removes HTTP and HTTPS protocols from all l
|
|
18 |
- No Setup needed<br>
|
19 |
- Compatible with Visual Composer
|
20 |
- Fixes Google Fonts issues
|
|
|
21 |
|
|
|
|
|
|
|
22 |
|
23 |
**Mixed content** occurs when initial HTML is loaded over a secure HTTPS connection, but other resources (such as images, videos, stylesheets, scripts) are loaded over an insecure HTTP connection. This is called mixed content because both HTTP and HTTPS content are being loaded to display the same page, and the initial request was secure over HTTPS. Modern browsers display warnings about this type of content to indicate to the user that this page contains insecure resources.
|
24 |
|
@@ -28,11 +32,14 @@ Your users are counting on you to protect them when they visit your website. It
|
|
28 |
= Example =
|
29 |
|
30 |
Without Plugin:
|
31 |
-
`"http://domain.com/
|
32 |
-
|
|
|
33 |
|
34 |
With Plugin:
|
35 |
-
`"
|
|
|
|
|
36 |
|
37 |
For more infos take a look at the screenshot.
|
38 |
|
@@ -66,6 +73,10 @@ Please purge/clear cache for the changes to take effect!
|
|
66 |
1. The Sourcecode of the Website will look like this!
|
67 |
|
68 |
== Changelog ==
|
|
|
|
|
|
|
|
|
69 |
= 1.3.1 (01/13/17) =
|
70 |
* Added support for srcset tag
|
71 |
= 1.3 (01/07/17) =
|
3 |
Donate link: https://www.paypal.me/MariusBolik
|
4 |
Tags: http, https, mixed content
|
5 |
Requires at least: 1.2.0
|
6 |
+
Tested up to: 4.7.2
|
7 |
+
Stable tag: 1.4
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
18 |
- No Setup needed<br>
|
19 |
- Compatible with Visual Composer
|
20 |
- Fixes Google Fonts issues
|
21 |
+
- Speeds up your website
|
22 |
|
23 |
+
= Only install this Plugin if your web server supports https =
|
24 |
+
|
25 |
+
**Note: I changed the way how „HTTP / HTTPS Remover“ is working. It doesn’t remove http and https from links in source code anymore. Now it converts all links to https!**
|
26 |
|
27 |
**Mixed content** occurs when initial HTML is loaded over a secure HTTPS connection, but other resources (such as images, videos, stylesheets, scripts) are loaded over an insecure HTTP connection. This is called mixed content because both HTTP and HTTPS content are being loaded to display the same page, and the initial request was secure over HTTPS. Modern browsers display warnings about this type of content to indicate to the user that this page contains insecure resources.
|
28 |
|
32 |
= Example =
|
33 |
|
34 |
Without Plugin:
|
35 |
+
`src="http://domain.com/script01.js"
|
36 |
+
src="https://domain.com/script02.js"
|
37 |
+
src="//domain.com/script03.js"`
|
38 |
|
39 |
With Plugin:
|
40 |
+
`src="https://domain.com/script01.js"
|
41 |
+
src="https://domain.com/script02.js"
|
42 |
+
src="https://domain.com/script03.js"`
|
43 |
|
44 |
For more infos take a look at the screenshot.
|
45 |
|
73 |
1. The Sourcecode of the Website will look like this!
|
74 |
|
75 |
== Changelog ==
|
76 |
+
= 1.4 (03/02/17) =
|
77 |
+
* Finally fixed srcset Problems
|
78 |
+
* Changed the working method of the Plugin
|
79 |
+
* Some other bugfixes
|
80 |
= 1.3.1 (01/13/17) =
|
81 |
* Added support for srcset tag
|
82 |
= 1.3 (01/07/17) =
|