WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently do web admin for an internet community based on BuddyPress and Multi Site, and use the Comment author must have a previously approved comment setting to make it easier for users to comment and not be moderated. All users are vetted before their accounts are created so I know we don't have spambots.

However it does not quite behave as I wish it to and I wonder if there is a way to achieve what I want. Ideally what I'd like is for:

  1. All logged in users to be able to comment anywhere on the multi-site without moderation that they have right to comment on, unless the owner of the subsite has ticked 'An administrator must always approve the comment'
  2. For non-logged in comments to always be approved if they've ever been approved anywhere on the multi-site. (Currently it only works if the new comment is on a post by the same author on the same site they were previously approved on)

Is this possible using existing settings or plugins? If not can it be achieved another way and if so how?

share|improve this question
up vote 1 down vote accepted

You could hook into 'pre_comment_approved' and change its return value. Sample code, not tested:

add_filter( 'pre_comment_approved', 'wpse47172_approve_logged_in_users' );

function wpse47172_approve_logged_in_users( $approved )
    return is_user_logged_in() ? 1 : $approved;
share|improve this answer
Sorry for delay in answer, I'll take a look at this solution later this week, and if it works will accept answer. Looks roughly like it should work. A simple and elegant solution if it does! – AntonChanning Apr 3 '12 at 9:56
Well I've implemented this and seen existing a new members post without needing moderation and comments from non-users still need moderating so this definitely works. – AntonChanning Apr 10 '12 at 17:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.