Version Description
(04/25/17) = * Now it removes http and https from source code again * Fixed broken links in social sharing plugins
Download this release
Release Info
Developer | condacore |
Plugin | HTTP / HTTPS Remover: SSL Mixed Content Fix |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.4 to 1.5
- http-https-remover.php +8 -51
- readme.txt +10 -9
http-https-remover.php
CHANGED
@@ -2,8 +2,8 @@
|
|
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: CONDACORE
|
8 |
* Author URI: https://condacore.com/
|
9 |
* License: GPLv3
|
@@ -68,58 +68,15 @@ class HTTP_HTTPS_REMOVER
|
|
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 |
-
//
|
109 |
-
$buffer =
|
110 |
-
$buffer = preg_replace('|
|
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 |
}
|
2 |
/**
|
3 |
* Plugin Name: HTTP / HTTPS Remover
|
4 |
* Plugin URI: https://de.wordpress.org/plugins/http-https-remover/
|
5 |
+
* Description: This Plugin cleans all the URLs in the source code while it removes the http:// and https:// and replaces it with //
|
6 |
+
* Version: 1.5
|
7 |
* Author: CONDACORE
|
8 |
* Author URI: https://condacore.com/
|
9 |
* License: GPLv3
|
68 |
// ###############################
|
69 |
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
+
$buffer = str_replace(array('http://'.$_SERVER['HTTP_HOST'],'https://'.$_SERVER['HTTP_HOST']), '//'.$_SERVER['HTTP_HOST'], $buffer);
|
73 |
+
$buffer = str_replace('content="//'.$_SERVER['HTTP_HOST'], 'content="https://'.$_SERVER['HTTP_HOST'], $buffer);
|
74 |
+
$buffer = str_replace('"url" : "//', '"url" : "https://', $buffer);
|
75 |
+
$buffer = preg_replace(array('|https://(.*?).googleapis.com|','|https://(.*?).googleapis.com|'), '//$1.googleapis.com', $buffer);
|
76 |
+
$buffer = preg_replace(array('|https://(.*?).google.com|','|https://(.*?).google.com|'), '//$1.googleapis.com', $buffer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
$buffer = preg_replace("|http://(.+).gravatar.com|", "'https://$1.gravatar.com", $buffer);
|
78 |
+
$buffer = preg_replace(array("|'http://(.*?).w.org|","|'https://(.*?).w.org|"), "'//$1.w.org", $buffer);
|
79 |
|
|
|
|
|
80 |
|
81 |
|
82 |
}
|
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 |
|
@@ -16,13 +16,11 @@ A fix for mixed content! This Plugin removes HTTP and HTTPS protocols from all l
|
|
16 |
- Works in Front- and Backend<br>
|
17 |
- Makes every Plugin compatible with https<br>
|
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 |
|
@@ -37,9 +35,9 @@ src="https://domain.com/script02.js"
|
|
37 |
src="//domain.com/script03.js"`
|
38 |
|
39 |
With Plugin:
|
40 |
-
`src="
|
41 |
-
src="
|
42 |
-
src="
|
43 |
|
44 |
For more infos take a look at the screenshot.
|
45 |
|
@@ -73,6 +71,9 @@ Please purge/clear cache for the changes to take effect!
|
|
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
|
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.4
|
7 |
+
Stable tag: 1.5
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
16 |
- Works in Front- and Backend<br>
|
17 |
- Makes every Plugin compatible with https<br>
|
18 |
- No Setup needed<br>
|
19 |
+
- Compatible with Visual Composer<br>
|
20 |
+
- Fixes Google Fonts issues<br>
|
21 |
- Speeds up your website
|
22 |
|
23 |
= Only install this Plugin if your web server supports https =
|
|
|
|
|
24 |
|
25 |
**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.
|
26 |
|
35 |
src="//domain.com/script03.js"`
|
36 |
|
37 |
With Plugin:
|
38 |
+
`src="//domain.com/script01.js"
|
39 |
+
src="//domain.com/script02.js"
|
40 |
+
src="//domain.com/script03.js"`
|
41 |
|
42 |
For more infos take a look at the screenshot.
|
43 |
|
71 |
1. The Sourcecode of the Website will look like this!
|
72 |
|
73 |
== Changelog ==
|
74 |
+
= 1.5 (04/25/17) =
|
75 |
+
* Now it removes http and https from source code again
|
76 |
+
* Fixed broken links in social sharing plugins
|
77 |
= 1.4 (03/02/17) =
|
78 |
* Finally fixed srcset Problems
|
79 |
* Changed the working method of the Plugin
|