Skip to content

Commit

Permalink
PublishPress Capabilities not displayed to Super Administrator
Browse files Browse the repository at this point in the history
Multisite - On sub-sites, Role Capabilities screen did not display PublishPress Capabilities section to Super Administrators who don't have a role on the site
  • Loading branch information
agapetry committed Dec 20, 2019
1 parent 6bc4eda commit 978e066
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,10 @@
));

foreach($plugin_caps as $plugin => $__plugin_caps) {
if (!$_plugin_caps = array_fill_keys( array_intersect($__plugin_caps, $all_capabilities), true )) {
continue;
if (!is_multisite() || !is_super_admin()) {
if (!$_plugin_caps = array_fill_keys( array_intersect($__plugin_caps, $all_capabilities), true )) {
continue;
}
}

echo '<h3 class="cme-cap-section">' . sprintf(__( '%s Capabilities', 'capsman-enhanced' ), str_replace('_', ' ', $plugin )) . '</h3>';
Expand Down

0 comments on commit 978e066

Please sign in to comment.