AndyHenderson (@andyhenderson)

Forum Replies Created

Viewing 1 replies (of 1 total)

  • AndyHenderson
    Participant

    @andyhenderson

    Thanks for spotting that. I’d assumed it was something I had done to disrupt BBPress but I hadn’t spotted the page was being refreshed and that it cleared the Javascript error from the console.

    Until the issue is fixed, a better work-around is to add a filter to functions.php rather than modify the BBPress code directly. That way the fix should survive a BBPress update. I used…

    // Prevent reply button in forums from executing a refresh of the page
    add_filter('bbp_get_reply_to_link', 'ctcFixReplyToLink', 10, 3);
      function ctcFixReplyToLink( $link, $r, $args ) {
        return str_ireplace( '"return addReply', '"event.preventDefault(); return addReply', $link );
      }
Viewing 1 replies (of 1 total)