Really Simple SSL - Version 4.0.15

Version Description

  • Fix: non hierarchical structured form elements in the template could cause settings not to get saved in some configurations.
Download this release

Release Info

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

Code changes from version 4.0.14 to 4.0.15

class-admin.php CHANGED
@@ -3633,7 +3633,23 @@ class rsssl_admin extends rsssl_front_end
3633
  $header = $this->get_template_part($grid_item, 'header', $index);
3634
  $instructions = $grid_item['instructions'] ? '<a href="'.esc_url($grid_item['instructions']).'" target="_blank">'.__("Instructions manual", "really-simple-ssl").'</a>' : '';
3635
  // Add form if type is settings
3636
- $block = str_replace(array('{class}', '{title}', '{header}', '{content}', '{footer}', '{instructions}'), array($grid_item['class'], $grid_item['title'], $header, $content, $footer, $instructions), $element);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3637
  $output .= $block;
3638
  }
3639
 
@@ -3649,39 +3665,22 @@ class rsssl_admin extends rsssl_front_end
3649
  * @return string
3650
  */
3651
 
3652
- public function get_template_part($grid_item, $key, $index) {
3653
 
3654
- if ( !isset($grid_item[$key]) || !$grid_item[$key] ) {
3655
- $template_part = '';
3656
- } else {
3657
- if ( strpos( $grid_item[ $key ], '.php' ) !== false && file_exists($grid_item[ $key ]) ) {
3658
- ob_start();
3659
- require $grid_item[ $key ];
3660
- $template_part = ob_get_clean();
3661
- } else {
3662
- $template_part = '';
3663
- }
3664
- }
3665
-
3666
- if ($key === 'content' ) {
3667
- if ( $grid_item['type'] === 'scan' ) {
3668
- $template_part = '<form id="rsssl_scan_form" action="" method="post">'.$template_part;
3669
- } elseif ( $grid_item['type'] === 'settings' ) {
3670
- if ( is_network_admin() ) {
3671
- $template_part = '<form action="edit.php?action=rsssl_update_network_settings" method="post">'.wp_nonce_field('rsssl_ms_settings_update', 'rsssl_ms_nonce').
3672
- $template_part;
3673
- } else {
3674
- $template_part = '<form action="options.php" method="post">'.$template_part;
3675
- }
3676
- }
3677
- }
3678
-
3679
- if ( $key === 'footer' && ( $grid_item['type'] === 'scan' || $grid_item['type'] === 'settings') ) {
3680
- $template_part .= '</form>';
3681
- }
3682
 
3683
- return apply_filters("rsssl_template_part_".$key.'_'.$index, $template_part, $grid_item);
3684
- }
3685
 
3686
  /**
3687
  * Returns a success, error or warning image for the settings page
3633
  $header = $this->get_template_part($grid_item, 'header', $index);
3634
  $instructions = $grid_item['instructions'] ? '<a href="'.esc_url($grid_item['instructions']).'" target="_blank">'.__("Instructions manual", "really-simple-ssl").'</a>' : '';
3635
  // Add form if type is settings
3636
+ $form_open = '';
3637
+ $form_close = '';
3638
+ if ( $grid_item['type'] === 'scan' ) {
3639
+ $form_open = '<form id="rsssl_scan_form" action="" method="post">';
3640
+ $form_close = '</form>';
3641
+ } elseif ( $grid_item['type'] === 'settings' ) {
3642
+ if ( is_network_admin() ) {
3643
+ $form_open = '<form action="edit.php?action=rsssl_update_network_settings" method="post">'.wp_nonce_field('rsssl_ms_settings_update', 'rsssl_ms_nonce');
3644
+ $form_close = '</form>';
3645
+
3646
+ } else {
3647
+ $form_open = '<form action="options.php" method="post">';
3648
+ $form_close = '</form>';
3649
+ }
3650
+ }
3651
+
3652
+ $block = str_replace(array('{class}', '{title}', '{header}', '{content}', '{footer}', '{instructions}', '{form_open}','{form_close}'), array($grid_item['class'], $grid_item['title'], $header, $content, $footer, $instructions, $form_open, $form_close), $element);
3653
  $output .= $block;
3654
  }
3655
 
3665
  * @return string
3666
  */
3667
 
3668
+ public function get_template_part($grid_item, $key, $index) {
3669
 
3670
+ if ( !isset($grid_item[$key]) || !$grid_item[$key] ) {
3671
+ $template_part = '';
3672
+ } else {
3673
+ if ( strpos( $grid_item[ $key ], '.php' ) !== false && file_exists($grid_item[ $key ]) ) {
3674
+ ob_start();
3675
+ require $grid_item[ $key ];
3676
+ $template_part = ob_get_clean();
3677
+ } else {
3678
+ $template_part = '';
3679
+ }
3680
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3681
 
3682
+ return apply_filters("rsssl_template_part_".$key.'_'.$index, $template_part, $grid_item);
3683
+ }
3684
 
3685
  /**
3686
  * Returns a success, error or warning image for the settings page
grid/templates/grid-element.php CHANGED
@@ -1,14 +1,16 @@
1
  <div class="rsssl-item {class}">
2
- <div class="item-container">
 
3
  <div class="rsssl-grid-item-header">
4
- <h3>{title}</h3>
5
  {header}
6
  </div>
7
- <div class="rsssl-grid-item-content">
8
- {content}
9
- </div>
10
- <div class="rsssl-grid-item-footer">
11
- {footer}
12
- </div>
13
- </div>
 
14
  </div>
1
  <div class="rsssl-item {class}">
2
+ <div class="item-container">
3
+ {form_open}
4
  <div class="rsssl-grid-item-header">
5
+ <h3>{title}</h3>
6
  {header}
7
  </div>
8
+ <div class="rsssl-grid-item-content">
9
+ {content}
10
+ </div>
11
+ <div class="rsssl-grid-item-footer">
12
+ {footer}
13
+ </div>
14
+ {form_close}
15
+ </div>
16
  </div>
readme.txt CHANGED
@@ -6,7 +6,7 @@ Requires at least: 4.9
6
  License: GPL2
7
  Tested up to: 5.7
8
  Requires PHP: 5.6
9
- Stable tag: 4.0.14
10
 
11
  No setup required! You only need an SSL certificate, and this plugin will do the rest.
12
 
@@ -86,6 +86,9 @@ If you are experiencing redirect loops on your site, try these [instructions](ht
86
  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.
87
 
88
  == Changelog ==
 
 
 
89
  = 4.0.14 =
90
  * Improvement: when WordPress incorrectly reports that SSL is not possible, correct the resulting site health notice.
91
  * Improvement: don't show the secure cookies notice on subsites of a multisite installation. Show on the network dashboard instead.
6
  License: GPL2
7
  Tested up to: 5.7
8
  Requires PHP: 5.6
9
+ Stable tag: 4.0.15
10
 
11
  No setup required! You only need an SSL certificate, and this plugin will do the rest.
12
 
86
  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.
87
 
88
  == Changelog ==
89
+ = 4.0.15 =
90
+ * Fix: non hierarchical structured form elements in the template could cause settings not to get saved in some configurations.
91
+
92
  = 4.0.14 =
93
  * Improvement: when WordPress incorrectly reports that SSL is not possible, correct the resulting site health notice.
94
  * Improvement: don't show the secure cookies notice on subsites of a multisite installation. Show on the network dashboard instead.
rlrsssl-really-simple-ssl.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Really Simple SSL
4
  * Plugin URI: https://really-simple-ssl.com
5
  * Description: Lightweight plugin without any setup to make your site SSL proof
6
- * Version: 4.0.14
7
  * Author: Really Simple Plugins
8
  * Author URI: https://really-simple-plugins.com
9
  * License: GPL2
3
  * Plugin Name: Really Simple SSL
4
  * Plugin URI: https://really-simple-ssl.com
5
  * Description: Lightweight plugin without any setup to make your site SSL proof
6
+ * Version: 4.0.15
7
  * Author: Really Simple Plugins
8
  * Author URI: https://really-simple-plugins.com
9
  * License: GPL2