Which user capability would you like?
I made a change in class.phimind.php on line 78.
To change the capability ‘edit_plugins’ to ‘eeplus’
And in my plugin i’ve added:
register_activation_hook( __FILE__, array("pnct_excelExport", "add_permissions") );
class pnct_excelExport{
function add_permissions(){
global $wp_roles;
$wp_roles->add_cap("administrator", "eeplus");
$wp_roles->add_cap("editor", "eeplus");
}
}
new pnct_excelExport();
It would be easy if you changed line 78 like this:
$capability = apply_filters('phimind_excel_export_capability', 'edit_plugins');
add_submenu_page( ... , $capability, ... );
Or you could set it fixed to something like ‘eeplus’, like I did.
In that case it would be nice if you’d include the first piece of code with ‘add_permissions’.
And then add a filter so others are able to change the affected roles.
Thank you, just added the filter. Try it out via https://github.com/michael-cannon/excel-export-plus/tree/0.3.0RC1.
Filter name is eep_menu_page_capability.