Version Description
- Fix bug to permissions removal.
Download this release
Release Info
Developer | rpetersen29 |
Plugin | Simple Banner |
Version | 2.4.7 |
Comparing to | |
See all releases |
Code changes from version 2.4.6 to 2.4.7
- readme.txt +7 -1
- simple-banner.php +8 -5
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/rpetersenDev
|
|
4 |
Tags: banner, banners, simple, announcement, announcements, cta, notification, bar, bars, free, hello bar, hellobar, pro
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.4.1
|
7 |
-
Stable tag: 2.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -96,6 +96,9 @@ This feature is being actively developed, in the meantime you can use this custo
|
|
96 |
|
97 |
== Changelog ==
|
98 |
|
|
|
|
|
|
|
99 |
= 2.4.6 =
|
100 |
* Banner now shows in sidebar upon activation.
|
101 |
|
@@ -206,6 +209,9 @@ This feature is being actively developed, in the meantime you can use this custo
|
|
206 |
|
207 |
== Upgrade Notice ==
|
208 |
|
|
|
|
|
|
|
209 |
= 2.4.6 =
|
210 |
* Banner now shows in sidebar upon activation.
|
211 |
|
4 |
Tags: banner, banners, simple, announcement, announcements, cta, notification, bar, bars, free, hello bar, hellobar, pro
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.4.1
|
7 |
+
Stable tag: 2.4.7
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
96 |
|
97 |
== Changelog ==
|
98 |
|
99 |
+
= 2.4.7 =
|
100 |
+
* Fix bug to permissions removal.
|
101 |
+
|
102 |
= 2.4.6 =
|
103 |
* Banner now shows in sidebar upon activation.
|
104 |
|
209 |
|
210 |
== Upgrade Notice ==
|
211 |
|
212 |
+
= 2.4.7 =
|
213 |
+
* Fix bug to permissions removal.
|
214 |
+
|
215 |
= 2.4.6 =
|
216 |
* Banner now shows in sidebar upon activation.
|
217 |
|
simple-banner.php
CHANGED
@@ -3,16 +3,16 @@
|
|
3 |
* Plugin Name: Simple Banner
|
4 |
* Plugin URI: https://github.com/rpetersen29/simple-banner
|
5 |
* Description: Display a simple banner at the top of your website.
|
6 |
-
* Version: 2.4.
|
7 |
* Author: Ryan Petersen
|
8 |
* Author URI: http://rpetersen29.github.io/
|
9 |
* License: GPL2
|
10 |
*
|
11 |
* @package Simple Banner
|
12 |
-
* @version 2.4.
|
13 |
* @author Ryan Petersen <rpetersen.dev@gmail.com>
|
14 |
*/
|
15 |
-
define ('VERSION', '2.4.
|
16 |
|
17 |
register_activation_hook( __FILE__, 'simple_banner_activate' );
|
18 |
function simple_banner_activate() {
|
@@ -129,8 +129,11 @@ function simple_banner_menu() {
|
|
129 |
$add_role->add_cap( $manage_options );
|
130 |
} else {
|
131 |
$remove_role = get_role( $role_name );
|
132 |
-
|
133 |
-
$remove_role->
|
|
|
|
|
|
|
134 |
}
|
135 |
}
|
136 |
}
|
3 |
* Plugin Name: Simple Banner
|
4 |
* Plugin URI: https://github.com/rpetersen29/simple-banner
|
5 |
* Description: Display a simple banner at the top of your website.
|
6 |
+
* Version: 2.4.7
|
7 |
* Author: Ryan Petersen
|
8 |
* Author URI: http://rpetersen29.github.io/
|
9 |
* License: GPL2
|
10 |
*
|
11 |
* @package Simple Banner
|
12 |
+
* @version 2.4.7
|
13 |
* @author Ryan Petersen <rpetersen.dev@gmail.com>
|
14 |
*/
|
15 |
+
define ('VERSION', '2.4.7');
|
16 |
|
17 |
register_activation_hook( __FILE__, 'simple_banner_activate' );
|
18 |
function simple_banner_activate() {
|
129 |
$add_role->add_cap( $manage_options );
|
130 |
} else {
|
131 |
$remove_role = get_role( $role_name );
|
132 |
+
// only remove capabilities if they were previously added
|
133 |
+
if ($remove_role->has_cap( $manage_simple_banner )){
|
134 |
+
$remove_role->remove_cap( $manage_simple_banner );
|
135 |
+
$remove_role->remove_cap( $manage_options );
|
136 |
+
}
|
137 |
}
|
138 |
}
|
139 |
}
|