Bug fix for [post-link]
-
Your 1.0.1 version has 2 bugs in one statement.
The line
$patternData['[post-link]'] = 'topic' !== $post->post_type ? bbp_get_reply_url( $post_id ) : get_the_permalink($post_id);
will work MUCH better if you use:
patternData['[post-link]'] = bbp_get_reply_url( bbp_get_reply_id( $post->ID ) );
This makes mentions from both topics and replies give the correct link. The fix comes from bbPress’s subscription code. Before, topics was generating a link to the page where the topic form was, which is not really correct in many cases.
And although with my fix it is not relevant, I think you must have meant $post->ID instead of $post_id in your original.
Users of my forum pointed out the problem.
- The topic ‘Bug fix for [post-link]’ is closed to new replies.