File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 55* Use Sass (libsass) instead of Compass
66* Unminify CodeMirror scripts
77* Fixes for the WP 3.8 interface
8+ * Fix 'enable snippets menu for site admins' multisite setting
89
910## 1.9
1011* 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 = '' ) {
672672 public function get_cap ( $ deprecated = '' ) {
673673
674674 if ( is_multisite () ) {
675- $ active_menus = get_site_option ( 'menu_items ' , array () );
675+ $ menu_perms = get_site_option ( 'menu_items ' , array () );
676676
677677 /* If multisite is enabled and the snippet menu is not activated,
678678 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 {
680682 return $ this ->network_cap ;
681-
683+ }
682684 }
683685
684686 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
125125* Use Sass (libsass) instead of Compass
126126* Unminify CodeMirror scripts
127127* Fixes for the WP 3.8 interface
128+ * Fix 'enable snippets menu for site admins' multisite setting
128129
129130= 1.9 =
130131* Add and remove network capabilities as super admins are added and removed
You can’t perform that action at this time.
0 commit comments