Multisite role capabilities
-
hi,
I have a multisite installation with eight instances, with the first being the “main” website of an ecosystem.
I need to add the the wp super cache settings capability to the editor and administrator roles in every “child” site.
at the moment wp super cache settings are not visible, nor accessible to other roles than the superadministrator.
the issue is that the “main” site has some custom post types that I make accessible to the “children” websites. once a post i created, i need the editors and administrator to access the “Delete Cache On All Blogs” button inside the settings.
I tried this code with no success:
function custom_grant_cache_access() {
$admin_role = get_role('administrator');
if ($admin_role) {
$admin_role->add_cap('wp_cache_manage_options');
}
}
add_action('admin_init', 'custom_grant_cache_access');
function custom_cache_menu_access() {
if (current_user_can('administrator')) {
add_menu_page('WP Super Cache', 'WP Super Cache', 'wp_cache_manage_options', 'wp-cache', '', 'dashicons-admin-generic', 56);
}
}
add_action('network_admin_menu', 'custom_cache_menu_access');is it possible in some way? or do you plan to update the plugin with this feature?
- You must be logged in to reply to this topic.