Wrong bbp_get_reply_url() when paging with reverse order
-
Hi.
I’m showing my replies as a timestream, meaning I display the newest replies above the oldest one. Like this:function custom_bbp_reorder_replies($args) { $args['order'] = 'DESC'; // 'ASC' (Ascending, Default), 'DESC' (Descending) return $args; } add_filter('bbp_before_has_replies_parse_args', 'custom_bbp_reorder_replies' );
Well, in My Replies Created I’m showing a list of replies with a link to corresponding thread like this:
<a href=" <?php echo bbp_get_reply_url() ?>" class="bbp-topic-edit-link">...</a>
But that is not working because bbp_get_reply_url() is considering default order instead of reverse. So, when doing this it returns the wrong page:
$reply_page = ceil( (int) bbp_get_reply_position( $reply_id, $topic_id ) / (int) bbp_get_replies_per_page() );
(that code is in includes/replies/template.php, line 487)
Maybe a hook around there would help.
By now I’m not sure how to solve it for myself.
- You must be logged in to reply to this topic.