Version Description
- Improvement: Hardened the security of plugin.
Download this release
Release Info
Developer | brainstormworg |
Plugin | Lightweight Sidebar Manager |
Version | 1.1.6 |
Comparing to | |
See all releases |
Code changes from version 1.1.5 to 1.1.6
- classes/class-bsf-sb-metabox.php +6 -5
- readme.txt +8 -5
- sidebar-manager.php +2 -2
classes/class-bsf-sb-metabox.php
CHANGED
@@ -81,7 +81,7 @@ if ( ! class_exists( 'BSF_SB_Metabox' ) ) {
|
|
81 |
*/
|
82 |
public function metabox_save( $post_id ) {
|
83 |
|
84 |
-
if( ! isset( $_POST[ BSF_SB_POST_TYPE . '-nonce' ] ) ) {
|
85 |
return;
|
86 |
}
|
87 |
|
@@ -110,12 +110,13 @@ if ( ! class_exists( 'BSF_SB_Metabox' ) ) {
|
|
110 |
}
|
111 |
|
112 |
if ( isset( $_POST['bsf-sb-users'] ) ) {
|
113 |
-
|
|
|
114 |
}
|
115 |
|
116 |
if ( isset( $_POST['replace_this_sidebar'] ) ) {
|
117 |
|
118 |
-
$replace_sidebar =
|
119 |
|
120 |
update_post_meta( $post_id, '_replace_this_sidebar', $replace_sidebar );
|
121 |
}
|
@@ -158,7 +159,7 @@ if ( ! class_exists( 'BSF_SB_Metabox' ) ) {
|
|
158 |
if ( strrpos( $slug, BSF_SB_PREFIX ) !== false ) {
|
159 |
continue;
|
160 |
}
|
161 |
-
$out .= '<option value="' . $slug . '"' . selected( $replace_sidebar, $slug, false ) . '>' . $name . '</option>';
|
162 |
}
|
163 |
$out .= '</select>';
|
164 |
} else {
|
@@ -174,7 +175,7 @@ if ( ! class_exists( 'BSF_SB_Metabox' ) ) {
|
|
174 |
$out .= '<i class="bsf-sb-help dashicons dashicons-editor-help" title="' . esc_attr__( 'Add an optional description fot the Widgets screen.', 'sidebar-manager' ) . '"></i>';
|
175 |
$out .= '</td>';
|
176 |
$out .= '<td class="bsf-sb-row-content">';
|
177 |
-
$out .= '<input type="text" rows="1" name="excerpt" value="' . $post->post_excerpt . '">';
|
178 |
$out .= '</td>';
|
179 |
$out .= '</tr>';
|
180 |
|
81 |
*/
|
82 |
public function metabox_save( $post_id ) {
|
83 |
|
84 |
+
if ( ! isset( $_POST[ BSF_SB_POST_TYPE . '-nonce' ] ) ) {
|
85 |
return;
|
86 |
}
|
87 |
|
110 |
}
|
111 |
|
112 |
if ( isset( $_POST['bsf-sb-users'] ) ) {
|
113 |
+
$bsf_sb_user_roles = array_map( 'sanitize_text_field', $_POST['bsf-sb-users'] );
|
114 |
+
update_post_meta( $post_id, '_bsf-sb-users', $bsf_sb_user_roles );
|
115 |
}
|
116 |
|
117 |
if ( isset( $_POST['replace_this_sidebar'] ) ) {
|
118 |
|
119 |
+
$replace_sidebar = sanitize_text_field( $_POST['replace_this_sidebar'] );
|
120 |
|
121 |
update_post_meta( $post_id, '_replace_this_sidebar', $replace_sidebar );
|
122 |
}
|
159 |
if ( strrpos( $slug, BSF_SB_PREFIX ) !== false ) {
|
160 |
continue;
|
161 |
}
|
162 |
+
$out .= '<option value="' . esc_attr( $slug ) . '"' . selected( $replace_sidebar, $slug, false ) . '>' . esc_attr( $name ) . '</option>';
|
163 |
}
|
164 |
$out .= '</select>';
|
165 |
} else {
|
175 |
$out .= '<i class="bsf-sb-help dashicons dashicons-editor-help" title="' . esc_attr__( 'Add an optional description fot the Widgets screen.', 'sidebar-manager' ) . '"></i>';
|
176 |
$out .= '</td>';
|
177 |
$out .= '<td class="bsf-sb-row-content">';
|
178 |
+
$out .= '<input type="text" rows="1" name="excerpt" value="' . esc_attr( $post->post_excerpt ) . '">';
|
179 |
$out .= '</td>';
|
180 |
$out .= '</tr>';
|
181 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: BrainstormForce
|
|
3 |
Donate link: https://www.paypal.me/BrainstormForce
|
4 |
Tags: custom sidebar, sidebar manager, custom widget areas, widgets, conditional sidebar
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -51,8 +51,11 @@ Other plugins we found are heavy with ugly interface, non supported, developed o
|
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
-
= 1.1.
|
55 |
-
-
|
|
|
|
|
|
|
56 |
|
57 |
= 1.1.4 =
|
58 |
- Fix: Fixed compatibility with other plugins with respect to the admin notice.
|
@@ -65,7 +68,7 @@ Other plugins we found are heavy with ugly interface, non supported, developed o
|
|
65 |
- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules
|
66 |
|
67 |
= 1.1.1 =
|
68 |
-
- Fix: Fixes a fatal error on Sidebar list page.
|
69 |
|
70 |
= 1.1.0 =
|
71 |
- New: Target rules appearing in Display Rules column for sidebars.
|
3 |
Donate link: https://www.paypal.me/BrainstormForce
|
4 |
Tags: custom sidebar, sidebar manager, custom widget areas, widgets, conditional sidebar
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.7
|
7 |
+
Stable tag: 1.1.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= 1.1.6 =
|
55 |
+
- Improvement: Hardened the security of plugin.
|
56 |
+
|
57 |
+
= 1.1.5 =
|
58 |
+
- Fix: Security hardening.
|
59 |
|
60 |
= 1.1.4 =
|
61 |
- Fix: Fixed compatibility with other plugins with respect to the admin notice.
|
68 |
- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules
|
69 |
|
70 |
= 1.1.1 =
|
71 |
+
- Fix: Fixes a fatal error on Sidebar list page.
|
72 |
|
73 |
= 1.1.0 =
|
74 |
- New: Target rules appearing in Display Rules column for sidebars.
|
sidebar-manager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Sidebar Manager
|
4 |
* Plugin URI: http://www.brainstormforce.com
|
5 |
* Description: This is the plugin to create custom siderbars to your site.
|
6 |
-
* Version: 1.1.
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: https://www.brainstormforce.com/
|
9 |
* Text Domain: bsfsidebars
|
@@ -25,7 +25,7 @@ define( 'BSF_SB_FILE', __FILE__ );
|
|
25 |
define( 'BSF_SB_BASE', plugin_basename( BSF_SB_FILE ) );
|
26 |
define( 'BSF_SB_DIR', plugin_dir_path( BSF_SB_FILE ) );
|
27 |
define( 'BSF_SB_URL', plugins_url( '/', BSF_SB_FILE ) );
|
28 |
-
define( 'BSF_SB_VER', '1.1.
|
29 |
define( 'BSF_SB_PREFIX', 'bsf-sb' );
|
30 |
define( 'BSF_SB_POST_TYPE', 'bsf-sidebar' );
|
31 |
|
3 |
* Plugin Name: Sidebar Manager
|
4 |
* Plugin URI: http://www.brainstormforce.com
|
5 |
* Description: This is the plugin to create custom siderbars to your site.
|
6 |
+
* Version: 1.1.6
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: https://www.brainstormforce.com/
|
9 |
* Text Domain: bsfsidebars
|
25 |
define( 'BSF_SB_BASE', plugin_basename( BSF_SB_FILE ) );
|
26 |
define( 'BSF_SB_DIR', plugin_dir_path( BSF_SB_FILE ) );
|
27 |
define( 'BSF_SB_URL', plugins_url( '/', BSF_SB_FILE ) );
|
28 |
+
define( 'BSF_SB_VER', '1.1.6' );
|
29 |
define( 'BSF_SB_PREFIX', 'bsf-sb' );
|
30 |
define( 'BSF_SB_POST_TYPE', 'bsf-sidebar' );
|
31 |
|