• Hi everyone ??

    I want my bbPress threads to be automatically marked as “solved” if the question (first message) gets 50 upvotes (yeah, I know that’s weird) and the upvotes/downvotes to get blocked. Yet, I want the thread to remain “open” even while it is solved, allowing users to keep on writing answers.

    Is there some code (something like “if $upvotes>=’50’ { $threadStatus=’Solved’ };”) I could use to achieve that?

    Thanks!

Viewing 1 replies (of 1 total)
  • Yes, using v1.2, you could use our hook ‘bbpvotes_do_post_vote’, which is fired when a vote is submitted.

    
    function my_post_vote($post_id,$voter_id,$vote,$post_score){
        if ($post_score >= 50) {
            //...
        }
    }
    add_action('bbpvotes_do_post_vote','my_post_vote',10,4);
    

    (this has not been tested but should work)

Viewing 1 replies (of 1 total)
  • The topic ‘“Solve” topic when reaching a specific amount of upvotes?’ is closed to new replies.