Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've been searching and searching for a while now to see if there's a way to allow people who are logged into my BuddyPress site to make a post on the activity section as "anonymous" or as their screen name, an ideal additional option would allow comments on that post to be made as anonymous or their screen name as well. Why would someone want this? I have no idea, but my client wants it one way or another.

How can I do that?

share|improve this question
    
Note that questions for plugin recommendations or job offerings are off topic here, so I took that out. –  toscho Mar 28 '13 at 1:42
2  
@tosco - So I guess also an answer that involves a plugin recommendation would be off topic ? –  krembo99 Mar 28 '13 at 2:02
    
You would need to create an anonymous user and then hook into a filter while the comment is being processed. –  Dan Mar 28 '13 at 5:25

1 Answer 1

In order to do what you are asking, there first needs to exist an anonymous user.

Assuming this user exists, there are just a few steps:

1) modify the comment form to include the anonymous check box.

2) detect whether the box is checked.

3) if the box is checked, use the comment_save_pre filter to change the user's info to that of the anonymous user.

Hope that points you in the right direction!

EDIT: Be sure that you have the comments settings in your dashboard only allowing loggedin users to comment.

share|improve this answer

Your Answer

 
discard

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.