Support » Plugin: bbPress Voting » A bit annoying when editing

  • tejt99

    (@tejt99)


    I love this plugin and is exactly what I needed however the system stopping double votes became very annoying when I tried to use it in conjunction with myCRED, because even when I cleared cache and cookies it still gave me already voted message. Could you please make it native with a simple script like:

    $topic_id = bbp_get_topic_id();
    $user_id = bbp_get_topic_author_id(  $topic_id );
    mycred_add( 'upvote', $user_id, 1, 'upvote' );
    • This topic was modified 8 months ago by tejt99.
    • This topic was modified 8 months ago by tejt99.
Viewing 1 replies (of 1 total)
  • Plugin Author natekinkead

    (@natekinkead)

    I just released a new version that includes a hook into the function that saves the vote to write custom code.

    This hook fires after a new vote has been saved.

    add_action( 'bbp_voting_voted', 'my_function_on_bbp_vote', 10, 3 );
    function my_function_on_bbp_vote( $post_id, $direction, $score ) {
        $user_id = bbp_get_topic_author_id( $post_id );
        mycred_add( 'upvote', $user_id, 1, 'upvote' );
    }
Viewing 1 replies (of 1 total)
  • The topic ‘A bit annoying when editing’ is closed to new replies.