Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing Author ID on submit

  • @egroleau

    Participant

    I’m trying to modify the author ID of bbPress topics/replies automatically on submit.

    I’ve tried a few different things but haven’t been able to get it working yet. Any suggestions?

    if(!function_exists(‘user_to_anonymous’)){
    function user_to_anonymous($comment_data){
    $comment_data[‘post_author_id’] = 8;
    $comment_data[‘post_author’] = ‘Robert’;
    return $comment_data; }
    add_filter(‘preprocess_comment’,’user_to_anonymous’); }

    More background info:

    End goal will be to attribute posts to an ‘Anonymous’ user ID so users can to post sensitive content to a group without being identified. Similar to a private post but making their name private, not the post.

    (I’m running WP 4.4.2, bbPress 2.5.8, BuddyPress 2.4.3)

    Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar