Is possible to only allow Administrators to moderate comments via the frontend moderation tool? We allow editors to modify their posts, but don't want to allow them to modify or delete comments from other users. Currently, I need to toggle the plugin on/off whenever it needs to be used by an admin.
Notifications
Clear all
Limited Support
Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.
We appreciate your patience and understanding while our team is away. Thank you for being part of the gVectors community!
Merry Christmas and Happy Holidays! 🎄
Jan 18, 2022 1:23 am
2 Replies
Jan 18, 2022 1:03 pm
Please use the hook code below:
global $wpDiscuzFrontEndModeration;
if (function_exists('wpDiscuz') && $wpDiscuzFrontEndModeration && !current_user_can("manage_options")) {
remove_action("wpdiscuz_comment_buttons", [&$wpDiscuzFrontEndModeration, "addButtons"], 13, 4);
remove_action("wpdiscuz_filtering_buttons", [&$wpDiscuzFrontEndModeration, "filterButton"], 13, 2);
remove_action("wp_ajax_wfem_move_comment", [&$wpDiscuzFrontEndModeration, "moveComment"], 13);
remove_action("wp_ajax_wfem_post_titles", [&$wpDiscuzFrontEndModeration, "postTitles"], 13);
remove_action("wpdiscuz_comment_buttons", [&$wpDiscuzFrontEndModeration, "addButtons"], 13, 4);
remove_action("wp_ajax_wfem_blacklist", [&$wpDiscuzFrontEndModeration, "setToBlacklist"], 13);
remove_action("wpdiscuz_comments_args", [&$wpDiscuzFrontEndModeration, "commentArguments"], 13);
remove_action("wp_ajax_wfem_moderate", [&$wpDiscuzFrontEndModeration, "responseToModeration"], 13);
remove_filter("wpdiscuz_filter_args", [&$wpDiscuzFrontEndModeration, "filterArgs"], 13);
remove_filter("wpdiscuz_js_options", [&$wpDiscuzFrontEndModeration, "moderateScriptArray"], 13);
remove_action("wp_ajax_wfem_delete", [&$wpDiscuzFrontEndModeration, "deleteComment"], 13);
remove_action("wp_ajax_wfem_email", [&$wpDiscuzFrontEndModeration, "sendMail"], 13);
}
Put the code in the WordPress active theme functions.php file. This article should be helpful for you: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/
Jan 20, 2022 6:09 am
Thank you! We added it to our functions.php file and it fixed the problem for us.
