Tests wrong capability? (reloaded)
-
Hi. We’ve got centralized moderation so we want to do the opposite of this plugin’s mission. Yet, the info page for this plugin says it can do it: “If, by any chance, the post author has no moderation rights (Contributor level) or there is no author e-mail set then the default site e-mail address will still get the notification.”
As it was noted by other user nearly 3 years ago, although you have User Role plugin configured to not allow Authors of Contributors to moderate anything, the plugin does not work as expected 🙁
The plugin’s author told him that he would test that, but I see this plugin still doesn’t check that moderate_comments permission.
-
I’ve tried to manually add edit_comment permission to User Role Editor panel and to explicitly disable it there, but it has not worked: emails are still sent to Contibutors (posts’ authors) and not to site’s Admin.
Hi @touda as I explained to the OP in https://ww.wp.xz.cn/support/topic/tests-wrong-capabilty/ this plugin does not test for any capability. It only adds a filter to
wp_notify_moderator()which removes the main admin e-mail address if there is an author address.It is in fact the WordPress core function https://developer.ww.wp.xz.cn/reference/functions/wp_notify_moderator/ which test for the
edit_commentcapability. So if that capability is missing from the User Role plugin, maybe ask that plugin’s developers?I would guess that the
edit_commentcapability is not in the User Role plugin because it is not a simple “on/off” capability but rather depends on other capabilities of that post’s author.That said, I might be able to work on a variant of this plugin which would be able to achieve what you are looking for… You can send me a message via https://status301.net/contact/ where you can explain in detail what you are specifically looking for 🙂
Thank you very much, Rolf, for the quick and complete explanation. Yes, I guess it wouldn’t be too dificult to make that variant plugin – it’s a great idea indeed, and I will send you that message right now 🙂
The topic ‘Tests wrong capability? (reloaded)’ is closed to new replies.