Yes, you can use the filter simple_history/view_history_capability.
Something like this should work (only admins have the capability manage_options):
add_filter("simple_history/view_history_capability", function($capability) {
$capability = "manage_options";
return $capability;
});
Thanks Par, but that did not change anything.
Here is how it was before the code:
Editor was not able to see the history… only the Simple History tab on the dashboard and the Simple History page saying “no events so far”.
Here is how it is now after the code:
Same as before.
Is there a way that Editors (or any role that is not admin) just don’t see Simple History on the dashboard?
Thanks
Oh, you are correct. It is possible to change this in a plugin, but in a theme it was not possible. I’ve fixed this now and just released version 2.1.5 that should fix this:
https://ww.wp.xz.cn/plugins/simple-history/changelog/
Please test again and let me know if it works!
Hi Par,
Simple History is still showing on the Editor’s Dashboard after the update.
Thanks
Where and how exactly are you adding the code?
I have tried with that code both in the functions.php-file and in the code of a plugin, and it works at both places.
It worked!
I had commented out the code in functions.php after I posted that it was not working.
Then after the update I had forgotten to revert it.
Thanks!