WP Force SSL - Version 1.55

Version Description

Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 WP Force SSL
Version 1.55
Comparing to
See all releases

Code changes from version 1.5 to 1.55

Files changed (4) hide show
  1. css/wpfs-style.css +2 -2
  2. js/wpfs-script.js +6 -0
  3. readme.txt +8 -2
  4. wp-force-ssl.php +57 -8
css/wpfs-style.css CHANGED
@@ -1,6 +1,6 @@
1
  /*
2
  * WP Force SSL
3
- * (c) WebFactory Ltd 2019
4
  */
5
 
6
  .settings_page_wpfs-settings .button {
@@ -24,7 +24,7 @@
24
  }
25
 
26
  .settings_page_wpfs-settings .box {
27
- padding: 15px;
28
  display: inline-block;
29
  border: thin solid black;
30
  background: white;
1
  /*
2
  * WP Force SSL
3
+ * (c) WebFactory Ltd 2019 - 2020
4
  */
5
 
6
  .settings_page_wpfs-settings .button {
24
  }
25
 
26
  .settings_page_wpfs-settings .box {
27
+ padding: 30px 20px;
28
  display: inline-block;
29
  border: thin solid black;
30
  background: white;
js/wpfs-script.js CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  (function($) {
2
  // display a loading message while an action is performed
3
  function block_ui(message) {
@@ -104,6 +109,7 @@
104
  if (status.substr(0, 1) != '2') {
105
  swal({ heightAuto: false, type: 'error', title: wpfs.undocumented_error });
106
  } else {
 
107
  swal({
108
  type: 'success',
109
  heightAuto: false,
1
+ /*
2
+ * WP Force SSL
3
+ * (c) WebFactory Ltd 2019 - 2020
4
+ */
5
+
6
  (function($) {
7
  // display a loading message while an action is performed
8
  function block_ui(message) {
109
  if (status.substr(0, 1) != '2') {
110
  swal({ heightAuto: false, type: 'error', title: wpfs.undocumented_error });
111
  } else {
112
+ $('#review-notification').show();
113
  swal({
114
  type: 'success',
115
  heightAuto: false,
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: WebFactory, UnderConstructionPage, googlemapswidget, wpreset
3
  Tags: ssl, force ssl, add ssl, enable ssl, https, ssl certificate, ssl redirect, redirect, mixed content, hsts
4
  Requires at least: 4.6
5
- Tested up to: 5.2
6
  Requires PHP: 5.2
7
- Stable Tag: 1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -65,6 +65,12 @@ No, nothing. After activating WP Force SSL, the main option "redirect SSL" will
65
 
66
 
67
  == Changelog ==
 
 
 
 
 
 
68
  = v1.5 =
69
  - 2019/09/23
70
  - complete rewrite of entire WP Force SSL plugin
2
  Contributors: WebFactory, UnderConstructionPage, googlemapswidget, wpreset
3
  Tags: ssl, force ssl, add ssl, enable ssl, https, ssl certificate, ssl redirect, redirect, mixed content, hsts
4
  Requires at least: 4.6
5
+ Tested up to: 5.4
6
  Requires PHP: 5.2
7
+ Stable Tag: 1.55
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
65
 
66
 
67
  == Changelog ==
68
+
69
+ = v1.55 =
70
+ - 2020/01/22
71
+ - minor bug fixes
72
+ - 384,400 downloads; 90,000 installations
73
+
74
  = v1.5 =
75
  - 2019/09/23
76
  - complete rewrite of entire WP Force SSL plugin
wp-force-ssl.php CHANGED
@@ -5,9 +5,24 @@
5
  Description: Redirect all traffic from HTTP to HTTPS for your entire site.
6
  Author: WebFactory Ltd
7
  Author URI: https://www.webfactoryltd.com/
8
- Version: 1.5
9
  Text Domain: wp-force-ssl
10
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
 
13
  // if the file is called directly
@@ -69,6 +84,7 @@ class wpForceSSL
69
  add_filter('admin_footer_text', array($this, 'admin_footer_text'));
70
  add_action('admin_enqueue_scripts', array($this, 'admin_scripts'));
71
  add_filter('install_plugins_table_api_args_featured', array($this, 'featured_plugins_tab'));
 
72
 
73
  // ajax hooks for the settings, and SSL certificate test
74
  add_action('wp_ajax_save_settting_nonce_action', array($this, 'ajax_save_setting'));
@@ -91,6 +107,7 @@ class wpForceSSL
91
  if (!is_array($meta) || empty($meta)) {
92
  $meta['first_version'] = $this->get_plugin_version();
93
  $meta['first_install'] = time();
 
94
  update_option(WPFSSL_META_KEY, $meta);
95
  }
96
 
@@ -204,6 +221,26 @@ class wpForceSSL
204
  } // add_settings_page
205
 
206
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  /**
208
  * Echo plugin settings page
209
  *
@@ -231,7 +268,19 @@ class wpForceSSL
231
  <li>Make sure "Force SSL" option below is enabled (green).</li>
232
  <li>Check that <a href="<?php echo admin_url('options-general.php'); ?>" target="_blank">WP Address &amp; Site Address</a> settings have an <code>https://</code> prefix set.</li>
233
  </ul>
234
-
 
 
 
 
 
 
 
 
 
 
 
 
235
  <h2><br><?php _e('Settings', 'wp-force-ssl'); ?></h2>
236
  <form id="wpfs_form">
237
  <table class="form-table">
@@ -267,8 +316,6 @@ class wpForceSSL
267
  <a href="#" class="button button-secondary wpfs_test_ssl">Test site's SSL certificate</a>
268
  </p>
269
  </form>
270
-
271
- <p class="box">Did WP Force SSL help you make your site more secure?<br><a href="https://wordpress.org/support/plugin/wp-force-ssl/reviews/#new-post" target="_blank">Please rate it</a> so that others know too that it's free, simple &amp; it works. <b>Thank you!</b></p>
272
  </div>
273
  <?php
274
  } // settings_page_content
@@ -350,7 +397,9 @@ class wpForceSSL
350
  {
351
  remove_filter('plugins_api_result', array($this, 'plugins_api_result'), 10);
352
  $res = $this->add_plugin_favs('wp-reset', $res);
 
353
  $res = $this->add_plugin_favs('eps-301-redirects', $res);
 
354
  return $res;
355
  } // plugins_api_result
356
 
@@ -392,7 +441,7 @@ class wpForceSSL
392
  'short_description' => true,
393
  )
394
  ));
395
- if (!is_wp_error($plugin_info)) {
396
  array_unshift($res->plugins, $plugin_info);
397
  set_transient('wf-plugin-info-' . $plugin_slug, $plugin_info, DAY_IN_SECONDS * 7);
398
  }
@@ -645,7 +694,7 @@ class wpForceSSL
645
  *
646
  * @return null
647
  */
648
- private function __sleep()
649
  { }
650
 
651
 
@@ -656,7 +705,7 @@ class wpForceSSL
656
  *
657
  * @return null
658
  */
659
- private function __wakeup()
660
  { }
661
  // end class
662
  }
5
  Description: Redirect all traffic from HTTP to HTTPS for your entire site.
6
  Author: WebFactory Ltd
7
  Author URI: https://www.webfactoryltd.com/
8
+ Version: 1.55
9
  Text Domain: wp-force-ssl
10
+
11
+ Copyright 2019 - 2020 WebFactory Ltd (email: support@webfactoryltd.com)
12
+
13
+ This program is free software; you can redistribute it and/or modify
14
+ it under the terms of the GNU General Public License, version 2, as
15
+ published by the Free Software Foundation.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU General Public License for more details.
21
+
22
+ You should have received a copy of the GNU General Public License
23
+ along with this program; if not, write to the Free Software
24
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
+ */
26
 
27
 
28
  // if the file is called directly
84
  add_filter('admin_footer_text', array($this, 'admin_footer_text'));
85
  add_action('admin_enqueue_scripts', array($this, 'admin_scripts'));
86
  add_filter('install_plugins_table_api_args_featured', array($this, 'featured_plugins_tab'));
87
+ add_action('admin_action_wpfs_dismiss_review_notice', array($this, 'action_dismiss_review_notice'));
88
 
89
  // ajax hooks for the settings, and SSL certificate test
90
  add_action('wp_ajax_save_settting_nonce_action', array($this, 'ajax_save_setting'));
107
  if (!is_array($meta) || empty($meta)) {
108
  $meta['first_version'] = $this->get_plugin_version();
109
  $meta['first_install'] = time();
110
+ $meta['hide_review_notification'] = false;
111
  update_option(WPFSSL_META_KEY, $meta);
112
  }
113
 
221
  } // add_settings_page
222
 
223
 
224
+ /**
225
+ * Dismiss review notification
226
+ *
227
+ * @since 1.55
228
+ *
229
+ * @return null
230
+ *
231
+ */
232
+ public function action_dismiss_review_notice() {
233
+ if (false == wp_verify_nonce(@$_GET['_wpnonce'], 'wpfs_dismiss_review_notice')) {
234
+ wp_die('Please reload the page and try again.');
235
+ }
236
+
237
+ $this->meta['hide_review_notification'] = true;
238
+ update_option(WPFSSL_META_KEY, $this->meta);
239
+
240
+ wp_safe_redirect('options-general.php?page=wpfs-settings');
241
+ } // action_dismiss_review_notice
242
+
243
+
244
  /**
245
  * Echo plugin settings page
246
  *
268
  <li>Make sure "Force SSL" option below is enabled (green).</li>
269
  <li>Check that <a href="<?php echo admin_url('options-general.php'); ?>" target="_blank">WP Address &amp; Site Address</a> settings have an <code>https://</code> prefix set.</li>
270
  </ul>
271
+ <?php
272
+ if (!isset($this->meta['hide_review_notification']) ||
273
+ empty($this->meta['hide_review_notification'])) {
274
+
275
+ $dismiss_url = add_query_arg(array('action' => 'wpfs_dismiss_review_notice', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
276
+ $dismiss_url = wp_nonce_url($dismiss_url, 'wpfs_dismiss_review_notice');
277
+ ?>
278
+ <p id="review-notification" class="box"<?php if ($this->wpfs_settings['wpfs_ssl'] == 'no') echo ' style="display: none;"'; ?>><b>Your site is now more secure! Please help others learn about this free plugin.</b><br><br>Please help other users learn about WP Force SSL by leaving a review.<br>It only takes a minute but it helps a lot and it keeps the plugin updated, maintained and free. <b>Thank you!</b><br><br>
279
+ <a class="button button-primary" href="https://wordpress.org/support/plugin/wp-force-ssl/reviews/?filter=5" target="_blank">Help other users - leave a review</a><a href="<?php echo $dismiss_url; ?>">I already left a review</a>
280
+ </p>
281
+ <?php
282
+ }
283
+ ?>
284
  <h2><br><?php _e('Settings', 'wp-force-ssl'); ?></h2>
285
  <form id="wpfs_form">
286
  <table class="form-table">
316
  <a href="#" class="button button-secondary wpfs_test_ssl">Test site's SSL certificate</a>
317
  </p>
318
  </form>
 
 
319
  </div>
320
  <?php
321
  } // settings_page_content
397
  {
398
  remove_filter('plugins_api_result', array($this, 'plugins_api_result'), 10);
399
  $res = $this->add_plugin_favs('wp-reset', $res);
400
+ $res = $this->add_plugin_favs('wp-external-links', $res);
401
  $res = $this->add_plugin_favs('eps-301-redirects', $res);
402
+ $res = $this->add_plugin_favs('simple-author-box', $res);
403
  return $res;
404
  } // plugins_api_result
405
 
441
  'short_description' => true,
442
  )
443
  ));
444
+ if (!is_wp_error($plugin_info) && is_object($plugin_info) && $plugin_info) {
445
  array_unshift($res->plugins, $plugin_info);
446
  set_transient('wf-plugin-info-' . $plugin_slug, $plugin_info, DAY_IN_SECONDS * 7);
447
  }
694
  *
695
  * @return null
696
  */
697
+ public function __sleep()
698
  { }
699
 
700
 
705
  *
706
  * @return null
707
  */
708
+ public function __wakeup()
709
  { }
710
  // end class
711
  }