Add support for Capability Manager
As mentioned in #68 we're a bit nervous of the WordPress Access Control page. instead we use PublishPress Capabilities, which used to be Capability Manager (and something before that, I think). It's got about 90k installations. It shows all the WP capabilities for a given role, but one role at a time - so avoiding issues with max_input_vars.
By default the Civi capabilities are mixed in with 'Additional Capabilities', which makes it hard to tell them apart from capabilities added by other plugins:
So we added a filter which separates it out:
It's a few lines:
function add_civicrm_category_to_capability_manager($capabilities) {
civicrm_initialize();
$permissions = array_keys(CRM_ACL_Form_WordPress_Permissions::getPermissionArray());
sort($permissions);
capabilities['CiviCRM'] = $permissions;
return capabilities;
}
add_filter('cme_plugin_capabilities','add_civicrm_category_to_capability_manager',10,1);
Is this too specific to add to Core?