File tree 3 files changed +7
-3
lines changed 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 5
5
* Use Sass (libsass) instead of Compass
6
6
* Unminify CodeMirror scripts
7
7
* Fixes for the WP 3.8 interface
8
+ * Fix 'enable snippets menu for site admins' multisite setting
8
9
9
10
## 1.9
10
11
* Add and remove network capabilities as super admins are added and removed
Original file line number Diff line number Diff line change @@ -672,13 +672,15 @@ public function user_can( $deprecated = '' ) {
672
672
public function get_cap ( $ deprecated = '' ) {
673
673
674
674
if ( is_multisite () ) {
675
- $ active_menus = get_site_option ( 'menu_items ' , array () );
675
+ $ menu_perms = get_site_option ( 'menu_items ' , array () );
676
676
677
677
/* If multisite is enabled and the snippet menu is not activated,
678
678
restrict snippet operations to super admins only */
679
- if ( ! in_array ( 'snippets ' , $ active_menus ) )
679
+ if ( ! empty ( $ menu_perms ['snippets ' ] ) ) {
680
+ return $ this ->cap ;
681
+ } else {
680
682
return $ this ->network_cap ;
681
-
683
+ }
682
684
}
683
685
684
686
return $ this ->cap ;
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ That's fantastic! Join me on [GitHub](https://github.com/bungeshea/code-snippets
125
125
* Use Sass (libsass) instead of Compass
126
126
* Unminify CodeMirror scripts
127
127
* Fixes for the WP 3.8 interface
128
+ * Fix 'enable snippets menu for site admins' multisite setting
128
129
129
130
= 1.9 =
130
131
* Add and remove network capabilities as super admins are added and removed
You can’t perform that action at this time.
0 commit comments