wordpress-plugin
wordpress-plugin copied to clipboard
Add filter to stats page in admin
The current edit_pages capability of the plugin for seeing analytics requires a user to be at least an editor, which by default is probably the correct capability. In some cases, sites may wish to allow users of the author or even contributor roles access to see stats as well. Since this is just seeing analytics, seems low risk. This filter would allow a developer to change the capability required with minimal effort, without having to add a whole UI to the settings screen.
https://wordpress.org/documentation/article/roles-and-capabilities/#edit_pages