Version Description
Release Date - 7th Mai 2019
- Fixed incompatibility with other plugins
Download this release
Release Info
Developer | condacore |
Plugin | HTTP / HTTPS Remover: SSL Mixed Content Fix |
Version | 2.2 |
Comparing to | |
See all releases |
Code changes from version 2.1 to 2.2
- http-https-remover.php +137 -115
- readme.txt +6 -1
http-https-remover.php
CHANGED
@@ -3,152 +3,174 @@
|
|
3 |
* Plugin Name: HTTP / HTTPS Remover
|
4 |
* Plugin URI: https://de.wordpress.org/plugins/http-https-remover/
|
5 |
* Description: This Plugin creates protocol relative urls by removing http + https from links.
|
6 |
-
* Version: 2.
|
7 |
* Author: CONDACORE
|
8 |
* Author URI: https://condacore.com/
|
9 |
* License: GPLv3
|
10 |
*/
|
11 |
|
12 |
if (!defined('ABSPATH'))
|
13 |
-
|
14 |
|
15 |
class HTTP_HTTPS_REMOVER
|
16 |
{
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
/* Plugin Activation Hook */
|
27 |
-
register_activation_hook(
|
28 |
/* Add admin notice */
|
29 |
-
add_action(
|
30 |
/* Adding links filter */
|
31 |
-
add_filter(
|
32 |
-
|
33 |
/* Remove Trans */
|
34 |
-
|
35 |
-
add_action(
|
36 |
-
add_action(
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
delete_transient(
|
42 |
echo "Transient Deleted!";
|
43 |
exit;
|
44 |
}
|
45 |
-
|
46 |
/**
|
47 |
* Create transient data
|
48 |
-
|
49 |
-
|
50 |
-
public function jr_default_activation_hook()
|
51 |
-
|
|
|
52 |
}
|
53 |
-
|
54 |
/**
|
55 |
* Adding Links
|
56 |
-
|
57 |
-
|
58 |
-
function jr_add_action_links
|
59 |
-
|
60 |
-
|
|
|
61 |
">Get share count recovery</a>',
|
62 |
-
|
63 |
-
return array_merge(
|
64 |
}
|
65 |
-
|
66 |
/**
|
67 |
* Admin Notice on Activation.
|
68 |
-
|
69 |
-
public function jr_activation_notice_hook()
|
|
|
70 |
|
71 |
/* Check transient */
|
72 |
-
if(
|
73 |
?>
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
<div style="width: 33.333%;float:left;text-align: left;">
|
89 |
-
<a style="color:green;" target="_blank" href="https://sellcodes.com/s/N3bDHV">See all plugin features </a>
|
90 |
-
</div>
|
91 |
-
<div style="width: 33.333%;float:left;text-align: left;">
|
92 |
-
<a id="remove_trans_anchor" style="color:#999;" href="#">
|
93 |
-
I‘m fine with getting less shares & traffic
|
94 |
-
</a>
|
95 |
-
</div>
|
96 |
-
<div style="clear: both;"></div>
|
97 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
</div>
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
}
|
118 |
});
|
119 |
-
})
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
}
|
124 |
}
|
125 |
-
|
126 |
-
|
127 |
-
public function letsGo()
|
128 |
-
{
|
129 |
-
global $pagenow;
|
130 |
-
ob_start(array(
|
131 |
-
$this,
|
132 |
-
'mainPath'
|
133 |
-
));
|
134 |
-
}
|
135 |
-
|
136 |
-
public function mainPath($buffer)
|
137 |
-
{
|
138 |
-
$content_type = NULL;
|
139 |
-
foreach (headers_list() as $header) {
|
140 |
-
if (strpos(strtolower($header), 'content-type:') === 0) {
|
141 |
-
$pieces = explode(':', strtolower($header));
|
142 |
-
$content_type = trim($pieces[1]);
|
143 |
-
break;
|
144 |
-
}
|
145 |
-
}
|
146 |
-
if (is_null($content_type) || substr($content_type, 0, 9) === 'text/html') {
|
147 |
-
|
148 |
-
$buffer = preg_replace('/https?:/i', '', $buffer);
|
149 |
-
|
150 |
-
}
|
151 |
-
return $buffer;
|
152 |
-
}
|
153 |
}
|
154 |
-
|
3 |
* Plugin Name: HTTP / HTTPS Remover
|
4 |
* Plugin URI: https://de.wordpress.org/plugins/http-https-remover/
|
5 |
* Description: This Plugin creates protocol relative urls by removing http + https from links.
|
6 |
+
* Version: 2.2
|
7 |
* Author: CONDACORE
|
8 |
* Author URI: https://condacore.com/
|
9 |
* License: GPLv3
|
10 |
*/
|
11 |
|
12 |
if (!defined('ABSPATH'))
|
13 |
+
exit;
|
14 |
|
15 |
class HTTP_HTTPS_REMOVER
|
16 |
{
|
17 |
+
|
18 |
+
public function __construct()
|
19 |
+
{
|
20 |
+
|
21 |
+
add_action('wp_loaded', array(
|
22 |
+
$this,
|
23 |
+
'letsGo'
|
24 |
+
), 99, 1);
|
25 |
+
|
26 |
/* Plugin Activation Hook */
|
27 |
+
register_activation_hook(__FILE__, array($this, 'jr_default_activation_hook'));
|
28 |
/* Add admin notice */
|
29 |
+
add_action('admin_notices', array($this, 'jr_activation_notice_hook'));
|
30 |
/* Adding links filter */
|
31 |
+
add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'jr_add_action_links'));
|
32 |
+
|
33 |
/* Remove Trans */
|
34 |
+
|
35 |
+
add_action('wp_ajax_nopriv_jr_remove_trans', array($this, 'jr_remove_set_transient'));
|
36 |
+
add_action('wp_ajax_jr_remove_trans', array($this, 'jr_remove_set_transient'));
|
37 |
+
}
|
38 |
+
|
39 |
+
public function jr_remove_set_transient()
|
40 |
+
{
|
41 |
+
delete_transient('jr-wp-admin-notice');
|
42 |
echo "Transient Deleted!";
|
43 |
exit;
|
44 |
}
|
45 |
+
|
46 |
/**
|
47 |
* Create transient data
|
48 |
+
*/
|
49 |
+
|
50 |
+
public function jr_default_activation_hook()
|
51 |
+
{
|
52 |
+
set_transient('jr-wp-admin-notice', true, 0);
|
53 |
}
|
54 |
+
|
55 |
/**
|
56 |
* Adding Links
|
57 |
+
*/
|
58 |
+
|
59 |
+
function jr_add_action_links($links)
|
60 |
+
{
|
61 |
+
$mylinks = array(
|
62 |
+
'<a target="_blank" style="color:green;" href="https://sellcodes.com/s/N3bDHV
|
63 |
">Get share count recovery</a>',
|
64 |
+
);
|
65 |
+
return array_merge($links, $mylinks);
|
66 |
}
|
67 |
+
|
68 |
/**
|
69 |
* Admin Notice on Activation.
|
70 |
+
*/
|
71 |
+
public function jr_activation_notice_hook()
|
72 |
+
{
|
73 |
|
74 |
/* Check transient */
|
75 |
+
if (get_transient('jr-wp-admin-notice')) {
|
76 |
?>
|
77 |
+
<div class="updated notice is-dismissible http_custom_class">
|
78 |
+
<p>
|
79 |
+
Plugin "HTTP / HTTPS Remover: SSL Mixed Content Fix” has been successfully installed and activated – hurray!
|
80 |
+
</p>
|
81 |
+
<p>
|
82 |
+
<strong>Next:</strong> if you don‘t want to lose traffic to your site we strongly recommend to get the <a style="color:green;" target="_blank" href="https://sellcodes.com/s/N3bDHV">Ultimate Social Media plugin</a> which has a share count recovery feature (so that you don‘t lose any share counts after your switch to https) besides many other cool features.
|
83 |
+
</p>
|
84 |
+
<div class="notice_links" style="padding: 10px 0;">
|
85 |
+
<div style="width: 33.333%;float:left;text-align: left;">
|
86 |
+
<!--<a style="color:green;" href="#">Get plugin now</a>-->
|
87 |
+
|
88 |
+
<script type="text/javascript" src="https://sellcodes.com/quick_purchase/XdHlrQnc/embed.js"></script>
|
89 |
+
<div class="sellcodes-quick-purchase"><a style="color: green;font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell, 'Helvetica Neue',sans-serif;font-size: 14px !important;text-decoration: underline !important;" class="sc-button" data-product-id="XdHlrQnc" data-option-id="4HiwuC6Y" data-referral="N3bDHV">Get plugin now</a></div>
|
90 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
</div>
|
92 |
+
<div style="width: 33.333%;float:left;text-align: left;">
|
93 |
+
<a style="color:green;" target="_blank" href="https://sellcodes.com/s/N3bDHV">See all plugin features </a>
|
94 |
+
</div>
|
95 |
+
<div style="width: 33.333%;float:left;text-align: left;">
|
96 |
+
<a id="remove_trans_anchor" style="color:#999;" href="#">
|
97 |
+
I‘m fine with getting less shares & traffic
|
98 |
+
</a>
|
99 |
+
</div>
|
100 |
+
<div style="clear: both;"></div>
|
101 |
</div>
|
102 |
+
</div>
|
103 |
+
<style>
|
104 |
+
.http_custom_class .notice-dismiss {
|
105 |
+
display: none;
|
106 |
+
}
|
107 |
+
</style>
|
108 |
+
|
109 |
+
<script>
|
110 |
+
var ajax_request_url = '<?php echo admin_url('admin-ajax.php'); ?>';
|
111 |
+
jQuery(document).ready(function($) {
|
112 |
+
$("#remove_trans_anchor").on("click", function(e) {
|
113 |
+
e.preventDefault();
|
114 |
+
$.ajax({
|
115 |
+
url: ajax_request_url,
|
116 |
+
type: "POST",
|
117 |
+
data: "action=jr_remove_trans",
|
118 |
+
success: function(response) {
|
119 |
+
jQuery('.http_custom_class .notice-dismiss').trigger('click');
|
120 |
+
}
|
121 |
});
|
122 |
+
});
|
123 |
+
})
|
124 |
+
</script>
|
125 |
+
<?php
|
126 |
+
//delete_transient( 'jr-wp-admin-notice' );
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
|
131 |
+
|
132 |
+
|
133 |
+
public function letsGo()
|
134 |
+
{
|
135 |
+
global $pagenow;
|
136 |
+
ob_start(array(
|
137 |
+
$this,
|
138 |
+
'mainPath'
|
139 |
+
));
|
140 |
+
}
|
141 |
+
|
142 |
+
public function mainPath($buffer)
|
143 |
+
{
|
144 |
+
$content_type = NULL;
|
145 |
+
foreach (headers_list() as $header) {
|
146 |
+
if (strpos(strtolower($header), 'content-type:') === 0) {
|
147 |
+
$pieces = explode(':', strtolower($header));
|
148 |
+
$content_type = trim($pieces[1]);
|
149 |
+
break;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
if (is_null($content_type) || substr($content_type, 0, 9) === 'text/html') {
|
153 |
+
|
154 |
+
$buffer = preg_replace('/https?:/i', '', $buffer);
|
155 |
+
}
|
156 |
+
return $buffer;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
$http_https_remover = new HTTP_HTTPS_REMOVER();
|
160 |
+
|
161 |
+
function wp_upe_upgrade_completed($upgrader_object, $options)
|
162 |
+
{
|
163 |
+
// The path to our plugin's main file
|
164 |
+
$our_plugin = plugin_basename(__FILE__);
|
165 |
+
// If an update has taken place and the updated type is plugins and the plugins element exists
|
166 |
+
if ($options['action'] == 'update' && $options['type'] == 'plugin' && isset($options['plugins'])) {
|
167 |
+
// Iterate through the plugins being updated and check if ours is there
|
168 |
+
foreach ($options['plugins'] as $plugin) {
|
169 |
+
if ($plugin == $our_plugin) {
|
170 |
+
// Set a transient to record that our plugin has just been updated
|
171 |
+
jr_default_activation_hook();
|
172 |
+
}
|
173 |
}
|
174 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
}
|
176 |
+
add_action('upgrader_process_complete', 'wp_upe_upgrade_completed', 10, 2);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/MariusBolik
|
|
4 |
Tags: SSL, https, force SSL, mixed content, insecure content, secure website, website security, TLS, security, secure socket layers, HSTS
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.1.1
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -90,6 +90,11 @@ Change all your CDN references to load with // (this will adapt based on how the
|
|
90 |
|
91 |
== Changelog ==
|
92 |
|
|
|
|
|
|
|
|
|
|
|
93 |
= 2.1 =
|
94 |
*Release Date - 20th March 2019*
|
95 |
|
4 |
Tags: SSL, https, force SSL, mixed content, insecure content, secure website, website security, TLS, security, secure socket layers, HSTS
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.1.1
|
7 |
+
Stable tag: 2.2
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
90 |
|
91 |
== Changelog ==
|
92 |
|
93 |
+
= 2.2 =
|
94 |
+
*Release Date - 7th Mai 2019*
|
95 |
+
|
96 |
+
* Fixed incompatibility with other plugins
|
97 |
+
|
98 |
= 2.1 =
|
99 |
*Release Date - 20th March 2019*
|
100 |
|