Really Simple SSL - Version 3.2.1

Version Description

  • Fix: fixed a bug in the regex pattern to update existing update count
Download this release

Release Info

Developer RogierLankhorst
Plugin Icon 128x128 Really Simple SSL
Version 3.2.1
Comparing to
See all releases

Code changes from version 3.2 to 3.2.1

Files changed (3) hide show
  1. class-admin.php +8 -4
  2. readme.txt +4 -1
  3. rlrsssl-really-simple-ssl.php +1 -1
class-admin.php CHANGED
@@ -2355,7 +2355,7 @@ class rsssl_admin extends rsssl_front_end
2355
 
2356
  $count = $this->count_plusones();
2357
 
2358
- if ($count > 0) {
2359
  $update_count = "<span class='update-plugins rsssl-update-count'><span class='update-count'>$count</span></span>";
2360
  } else {
2361
  $update_count = "";
@@ -2389,8 +2389,9 @@ class rsssl_admin extends rsssl_front_end
2389
  global $menu;
2390
 
2391
  $count = $this->count_plusones();
 
2392
 
2393
- if ($count > 0) {
2394
  $update_count = "<span class='update-plugins rsssl-update-count'><span class='update-count'>$count</span></span>";
2395
  } else {
2396
  $update_count = "";
@@ -2416,8 +2417,12 @@ class rsssl_admin extends rsssl_front_end
2416
 
2417
  //Get the existing count with regex
2418
  if (strpos($menu[80][0], "plugin-count") != false) {
2419
- $pattern = "(?<=\'plugin-count'>)(.*?)(?=\<)\g";
2420
  $existing_count = preg_match($pattern, $menu[80][0]);
 
 
 
 
2421
  }
2422
 
2423
  return intval($existing_count);
@@ -2672,7 +2677,6 @@ class rsssl_admin extends rsssl_front_end
2672
 
2673
  public function count_plusones(){
2674
  if (!current_user_can('manage_options')) return 0;
2675
-
2676
  $count = get_transient('rsssl_plusone_count');
2677
  if (!$count) {
2678
  $count = 0;
2355
 
2356
  $count = $this->count_plusones();
2357
 
2358
+ if ($count > 0 ) {
2359
  $update_count = "<span class='update-plugins rsssl-update-count'><span class='update-count'>$count</span></span>";
2360
  } else {
2361
  $update_count = "";
2389
  global $menu;
2390
 
2391
  $count = $this->count_plusones();
2392
+ $existing_counts = $this->get_existing_settings_plusones();
2393
 
2394
+ if ($count > 0 && ($existing_counts==0)) {
2395
  $update_count = "<span class='update-plugins rsssl-update-count'><span class='update-count'>$count</span></span>";
2396
  } else {
2397
  $update_count = "";
2417
 
2418
  //Get the existing count with regex
2419
  if (strpos($menu[80][0], "plugin-count") != false) {
2420
+ $pattern = '/(?<=[\'|\"]plugin-count[\'|\"]>)(.*?)(?=\<)/i';
2421
  $existing_count = preg_match($pattern, $menu[80][0]);
2422
+ $str = $menu[80][0];
2423
+ if (preg_match($pattern, $str, $matches)){
2424
+ $existing_count = $matches[1];
2425
+ }
2426
  }
2427
 
2428
  return intval($existing_count);
2677
 
2678
  public function count_plusones(){
2679
  if (!current_user_can('manage_options')) return 0;
 
2680
  $count = get_transient('rsssl_plusone_count');
2681
  if (!$count) {
2682
  $count = 0;
readme.txt CHANGED
@@ -6,7 +6,7 @@ Requires at least: 4.6
6
  License: GPL2
7
  Tested up to: 5.2
8
  Requires PHP: 5.4
9
- Stable tag: 3.2
10
 
11
  No setup required! You only need an SSL certificate, and this plugin will do the rest.
12
 
@@ -81,6 +81,9 @@ If you are experiencing redirect loops on your site, try these [instructions](ht
81
  Yes. There is a dedicated network settings page where you can switch between network activated SSL and per page SSL. In the dedicated pro for multisite plugin, you can override all site settings for SSL on the network level, and can activate and deactivate SSL in the network menu for each site.
82
 
83
  == Changelog ==
 
 
 
84
  = 3.2 =
85
  * Added update counter to Settings/SSL menu item if recommended settings aren't enabled yet
86
  * Added WP-CLI support
6
  License: GPL2
7
  Tested up to: 5.2
8
  Requires PHP: 5.4
9
+ Stable tag: 3.2.1
10
 
11
  No setup required! You only need an SSL certificate, and this plugin will do the rest.
12
 
81
  Yes. There is a dedicated network settings page where you can switch between network activated SSL and per page SSL. In the dedicated pro for multisite plugin, you can override all site settings for SSL on the network level, and can activate and deactivate SSL in the network menu for each site.
82
 
83
  == Changelog ==
84
+ = 3.2.1 =
85
+ * Fix: fixed a bug in the regex pattern to update existing update count
86
+
87
  = 3.2 =
88
  * Added update counter to Settings/SSL menu item if recommended settings aren't enabled yet
89
  * Added WP-CLI support
rlrsssl-really-simple-ssl.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Really Simple SSL
4
  * Plugin URI: https://www.really-simple-ssl.com
5
  * Description: Lightweight plugin without any setup to make your site SSL proof
6
- * Version: 3.2
7
  * Text Domain: really-simple-ssl
8
  * Domain Path: /languages
9
  * Author: Rogier Lankhorst, Mark Wolters
3
  * Plugin Name: Really Simple SSL
4
  * Plugin URI: https://www.really-simple-ssl.com
5
  * Description: Lightweight plugin without any setup to make your site SSL proof
6
+ * Version: 3.2.1
7
  * Text Domain: really-simple-ssl
8
  * Domain Path: /languages
9
  * Author: Rogier Lankhorst, Mark Wolters