Reject Comments Based on Author Email

Here’s a suggestion for a filter: /** * Filters a comment’s approval status before it is set. * * @since 2.1.0 * @since 4.9.0 Returning a WP_Error value from the filter will shortcircuit comment insertion and * allow skipping further processing. * * @param bool|string|WP_Error $approved The approval status. Accepts 1, 0, ‘spam’ or WP_Error. … Read more

BuddyBoss (BuddyPress / bbPress) moderation filters not doing anything

You’ve got the bp_bypass_if_user_can_moderate arguments wrong. From the documentation you linked to it should be bool $value, int $user_id, string $title, string $content, and as normal for filters you should pass through $value if you’re not going to change it. e.g. here’s a fixed up version of your filter: add_filter( ‘bp_bypass_check_for_moderation’, ‘bbp_bypass_if_user_can_moderate’, 10, 4 ); … Read more

show if comment is in moderation

use the follow var: $comment->comment_approved and check for the value <?php if (0 == $comment->comment_approved) { ?> <em><?php _e(‘Your comment must approved.’, FB_BASIS_TEXTDOMAIN) ?></em> <?php } ?> code example: http://code.google.com/p/wp-basis-theme/source/browse/trunk/basis/comments.php

Hold comments for moderation only if user is not logged in

Here you go, paste this code in your themes functions.php file: function loggedin_approved_comment($approved) { // No need to do the check if the comment is already approved anyway. if (!$approved) { if (is_user_logged_in()) { // Note: 1/0, not true/false $approved = 1; } } return $approved; } // Action allows the comment automatic approval to … Read more

How do I redirect users after submitting a replies for moderation on bbpress?

This is one of the serious flaws in bbpress, and surprisingly nobody at bbpress is interested to solve this. One work around is to download the plugin “404 solution”, after activation go to “Add Redirect”, then “Manual Redirect”, add the following as the main URL of bbpress: https://www.example.com/?post_type=topic&p=xxxx. Change your domain with your website link, … Read more

Why do comment moderators need to have all create/edit/delete toboth posts and pages?

Ordinarily WordPress only allows Editors and Administrators to moderate comments, and both roles require those capabilities. This page from the Codex does an excellent job of explaining roles and capabilities: https://wordpress.org/support/article/roles-and-capabilities/ You can manually create a new Role and assign to it only the capabilities you want the Role to have, so that those you … Read more