Notifications
Clear all

Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum wpForo Support Forum

[Solved] Disable Editor Moderation


DB
Posts: 2
 DB
Customer
Topic starter
(@dale-bock)
Member
Joined: 7 months ago

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.

2 Replies
Astghik
Posts: 5293
Admin
(@astgh)
Support Team
Joined: 4 years ago

@dale-bock,

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/

DB
Posts: 2
 DB
Customer
Topic starter
(@dale-bock)
Member
Joined: 7 months ago

Thank you! We added it to our functions.php file and it fixed the problem for us.

Share:
Scroll to top